资源简介
包括
读取RENIX观测、导航文件
GPS,GLONASS,COMPASS的卫星位置计算程序
三种星座的联合差分定位
(代码附有详细注释)
代码片段和文件信息
// mix.cpp : 定义控制台应用程序的入口点。
//
#include “stdafx.h“
#include
#include
#include
#include
#include
#include
#include
#include
using namespace Eigen;
using namespace std;
const double c=299792458; //light speed
const double GM=3.9860044e14;
const double we=7.292115e-5; //地球自转速度
const double ae=6.378136e6; //PZ-90下地球长半轴
const double J2=1.0826257e-3;//重力第二谐系数
//-------------------------------------------------------------------
//民用时转化为GPS时
void gpstime(int yearint monthint dayint hour int minute double second int &week double &secofweek)
{
int ry[12]={312931303130313130313031}fry[12]={312831303130313130313031};
if(year > 80)
year = 1900 + year;
else
year = 2000 + year;
int z=0;
for(int i1=1980; i1 < year+1; i1++)
{
if(i1%4 == 0 && i1%400 != 0)
z++; //记闰年数
}
if(year%4 == 0 && year%100 != 0)
{
for(int i2 = 0; i2 < month-1; i2++)
day += ry[i2];
}
else
{
for(int i3=0; i3 < month-1; i3++)
day += fry[i3];
}
day += (year-1980)*365 + z - 5;
week = day/7;
secofweek= day%7*24*3600 + hour*3600 + minute*60 + second ;
}
//GPSBeidou星历文件类 .15N .15R
class ReadNavFile //星历文件类
{
public:
int svNum;//星历中的卫星个数
vector > ephlist;
ReadNavFile(string nfile) //构造函数
{
//--------------------------------------------------------------------
//用文件流读文件
ifstream in_n(nfile.c_str());
if(in_n)
cout<<“打开N文件成功“< else
cerr<<“未找到N文件“< string str;
//--------------------------------------------------------------------
//定位到数据头
while(str.find(“END OF HEADER“) == string::npos)
{
getline(in_nstr);
}
//计算文件的行数和段数
int count = 0;
while(in_n)
{
getline(in_n str);//从文件中读取一行
remove(str.begin() str.end() ‘ ‘);//这个算法函数在algorithm头文件中,删除一行中的空格
remove(str.begin() str.end() ‘\t‘);//删除一行中的制表符,因为制表符和空格都是空的
if (str.length() > 0)
{
//如果删除制表符和空格之后的一行数据还有其他字符就算有效行
count ++;
}
}
svNum =count/8;//卫星个数每个卫星8行数据
ephlist.resize(svNum);//用卫星个数定义星历的行数
//定位到文件头
ifstream in_n1(nfile.c_str());
//定位到数据头
while(str.find(“END OF HEADER“) == string::npos)
{
getline(in_n1str);
}
for(int i=0; i < svNum; i++)
{
ephlist[i].resize(38);//星历的列数=38
getline(in_n1str);
ephlist[i][0] = atoi(str.substr(02).c_str());
ephlist[i][1] = atoi(str.substr(32).c_str());
ephlist[i][2] = atoi(str.substr(71).c_str());
ephlist[i][3] = atoi(str.substr(101).c_str());
ephlist[i][4] = atoi(str.substr(131).c_str());
ephlist[i][5] = atoi(str.substr(152).c_str());
ephlist[i][6] = atof(str.substr(194).c_str());
ephlist[i][7] = atof(str.substr(2219).c_str());
ephlist[i][8] = atof(str.substr(4119).c_str());
ephlist[i][9] = atof(str.substr(6019).c_str());
for(int k = 0; k < svNum; k++)
sw
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 415744 2015-06-12 15:26 mix\Debug\mix.exe
文件 1558208 2015-06-12 15:26 mix\Debug\mix.ilk
文件 6228992 2015-06-12 15:26 mix\Debug\mix.pdb
文件 42418 2015-06-12 15:46 mix\GPSGLONASSCOMPASS联合.docx
文件 2359296 2015-06-12 14:40 mix\ipch\mix-858ddd72\mix-c13f649a.ipch
文件 45282 2015-06-09 16:33 mix\mix\ba
文件 15962 2015-06-09 16:33 mix\mix\ba
文件 15247584 2015-06-09 16:33 mix\mix\ba
文件 114458 2015-06-09 16:33 mix\mix\ba
文件 1498 2015-06-12 15:26 mix\mix\Debug\cl.command.1.tlog
文件 35698 2015-06-12 15:26 mix\mix\Debug\CL.read.1.tlog
文件 660 2015-06-12 15:26 mix\mix\Debug\CL.write.1.tlog
文件 2 2015-06-12 15:26 mix\mix\Debug\li
文件 2 2015-06-12 15:26 mix\mix\Debug\li
文件 2 2015-06-12 15:26 mix\mix\Debug\li
文件 2 2015-06-12 15:26 mix\mix\Debug\li
文件 2 2015-06-12 15:26 mix\mix\Debug\li
文件 2 2015-06-12 15:26 mix\mix\Debug\li
文件 2 2015-06-12 15:26 mix\mix\Debug\li
文件 2 2015-06-12 15:26 mix\mix\Debug\li
文件 2 2015-06-12 15:26 mix\mix\Debug\li
文件 2 2015-06-12 15:26 mix\mix\Debug\li
文件 1490 2015-06-12 15:26 mix\mix\Debug\li
文件 3158 2015-06-12 15:26 mix\mix\Debug\li
文件 722 2015-06-12 15:26 mix\mix\Debug\li
文件 406 2015-06-12 14:56 mix\mix\Debug\mix.exe.em
文件 472 2015-06-12 14:56 mix\mix\Debug\mix.exe.em
文件 381 2015-06-12 15:26 mix\mix\Debug\mix.exe.intermediate.manifest
文件 55 2015-06-12 15:26 mix\mix\Debug\mix.lastbuildstate
文件 2163 2015-06-12 15:26 mix\mix\Debug\mix.log
............此处省略40个文件信息
相关资源
- GPS定位以及调用百度地图显示
- gps中文icd文件
- gps的界面设计!!!!!!
- 基于stm32单片机的gps定位系统app端源码
- EC20状态机代码TCP传GPS数据
- AR GPS Location 3.3.0.unitypackage
- GPS接收机电路设计.pdf 黄智伟
- gps应用程序设计(pdf)
- Bernese 软件学习详细教程
- 基于stm32F103c8t6和GPS模块做的小玩意儿
- GPS载波相位定位技术的研究
- 英文版的GPS书高清的
- GPS 单点定位 N文件o文件读取
- STM32平台GPS定位器源码
- 利用地表观测的GPS/InSar形变资料反演
- GPS车辆智能管理系统
- AG35 AT指令
- GNSS Applications and Methods.pdf
- GPS的工作原理
- 《GPS应用程序设计》GPS程序源代码
- GPS原理与应用邱致和 王万义
- STM32 gps 上传云平台
- UBLOX官方手册,GPS设计必备
- 徕卡GPS模拟器
- A-GPS Assisted GPS- GNSS- and SBAS
- Global Navigation Satellite Systems Inertial N
- GPSQC-CORS选址数据分析软件
- 校车GPS定位视频监控系统介绍.ppt
- GPS导航原理与应用王惠南
- 运行多GPS软件的端口虚拟工具:GpsG
评论
共有 条评论