資源簡介
附有一個實例導航文件 2.10 NAVIGATION DATA GPS(GPS) RINEX VERSION / TYPE
cnvtToRINEX 2.00.4 convertToRINEX OPR 26-Apr-10 08:24 UTC PGM / RUN BY / DATE
----------------------------------------------------------- COMMENT
0.1024D-07 0.1490D-07 -0.5960D-07 -0.1192D-06 ION ALPHA
0.8806D+05 0.3277D+05 -0.1966D+06 -0.1966D+06 ION BETA
0.186264514923D-08-0.621724893790D-14 405504 44 DELTA-UTC: A0,A1,T,W
15 LEAP SECONDS
END OF HEADER

代碼片段和文件信息
#include?“iostream.h“
#include?“stdio.h“
#include?“afx.h“
#include?“math.h“
void?readdata();//讀取導航文件數據
void?dealdata();//處理導航文件數據
typedef?struct?Navedata?//定義導航數據存儲結構
{
int?PRN;//衛星的PRn號
int?yearmonthdayhourminute;????//衛星鐘參考時刻
double?second;
double???a0a1a2;????//衛星鐘飄參數
double???IODECrsDeltNM0;????//數據星歷發布時間,在軌道徑向方向上周期改正正弦的振幅
double???CuceCussqrtA;???//軌道延跡方向上周期改正余弦振幅?、扁心率、軌道延跡方向上周期改正正弦振幅?、長半軸平方根?
double???ToeCicOMEGACis;???//星歷參考時刻、軌道傾角周期改正余弦項振幅、參考時刻升交點赤徑主項、軌道傾角周期改正正弦項振幅
double???i0CrcomegaOMEGADOT;??//參考時間軌道傾角、在軌道徑向方向上周期改正余余弦的振幅、近地點角距、升交點赤徑在赤道平面中的長期變化
double???IDOTL2CGPSWeekL2P;????////軌道傾角變化率、gps周等
????double???AccuracyofSatHealthofSatTGDIODC;???//衛星精度、衛星健康、電離層群遲改正數
double???eight1eight2eight3eight4;//導航數據第八行的參數(計算中不用)
};
typedef?struct?xyz
{
int?prn;
double?xyz;
};
#define?allstarnum?9?//導航文件中需要計算的衛星的個數
struct?Navedata?stars[allstarnum];//定義每個衛星數據的結構數組
struct?xyz?positions[allstarnum];?//每個衛星坐標的結構數組
void?readdata()//讀取數據文件
{
CStdioFile?fpt;
????CString?string;
BOOL?isend=fpt.Open(“50191100.10n“CFile::modeRead);//打開導航文件
if(!isend)
printf(“file?open?failed!“);
int?headlinenum=0;
????while?(isend)//讀取頭文件
????{
isend=fpt.ReadString(string);
????????headlinenum++;
int?headend=string.Find(“END?OF?HEADER“);
if?(-1!=headend)
break;
}
????fpt.SeekToBegin();//把指針指到文件的開頭
for?(int?i=0;i isend=fpt.ReadString(string);
for?(i=0;i {
//讀取數據部分的第一行prnyear等
isend=fpt.ReadString(string);
string.Replace(‘D‘‘e‘);
sscanf(string“%d?%d?%d?%d?%d?%d?%lf?%lf?%lf?%lf“?&stars[i].PRN&stars[i].year&stars[i].month&stars[i].day&stars[i].hour&stars[i].minute&stars[i].second?&stars[i].a0?&stars[i].a1?&stars[i].a2);
????????//讀取IDOTCrsdeltn,m0;
isend=fpt.ReadString(string);
string.Replace(‘D‘‘e‘);
sscanf(string“%lf?%lf?%lf?%lf“&stars[i].IDOT&stars[i].Crs&stars[i].DeltN&stars[i].M0);
????????//讀取cuc,e,cus,sqrta
isend=fpt.ReadString(string);
string.Replace(‘D‘‘e‘);
sscanf(string“%lf?%lf?%lf?%lf“&stars[i].Cuc?&stars[i].e?&stars[i].Cus?&stars[i].sqrtA);
????????//讀取toe,cic,omega,cis
isend=fpt.ReadString(string);
string.Replace(‘D‘‘e‘);
????????sscanf(string“%lf?%lf?%lf?%lf“&stars[i].Toe?&stars[i].Cic?&stars[i].OMEGA?&stars[i].Cis);
//讀取i0,crc,omega,omegadot
isend=fpt.ReadString(string);
string.Replace(‘D‘‘e‘);
sscanf(string“%lf?%lf?%lf?%lf“&stars[i].i0?&stars[i].Crc?&stars[i].omega?&stars[i].OMEGADOT);
????????//讀取idot,l2c,gpsweek,l2p
isend=fpt.ReadString(string);
string.Replace(‘D‘‘e‘);
sscanf(string“%lf?%lf?%lf?%lf“?&stars[i].IDOT?&stars[i].L2C?&stars[i].GPSWeek?&stars[i].L2P);
//讀取accracyofsat等
isend=fpt.ReadString(string);
string.Replace(‘D‘‘e‘);
sscanf(string“%lf?%lf?%lf?%lf“&stars[i].AccuracyofSat?&stars[i].HealthofSat?&stars[i].TGD?&stars[i].IODC);
????????//讀取eight等?
isend=fpt.ReadString(stri
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1355928??2010-05-30?23:00??Debug\2008302590115.exe
?????文件????1734032??2010-05-30?23:00??Debug\2008302590115.ilk
?????文件??????17027??2010-05-30?23:00??Debug\2008302590115.obj
?????文件????2626508??2010-05-30?14:19??Debug\2008302590115.pch
?????文件????2769920??2010-05-30?15:27??Debug\2008302590115.pdb
?????文件?????132096??2010-05-30?23:00??Debug\vc60.idb
?????文件??????69632??2010-05-30?15:27??Debug\vc60.pdb
?????文件???????6488??2010-04-26?16:24??50191100.10n
?????文件???????5286??2010-05-30?15:27??2008302590115.cpp
?????文件???????4146??2010-05-30?13:42??2008302590115.dsp
?????文件????????551??2010-05-30?09:11??2008302590115.dsw
?????文件??????41984??2010-05-30?23:01??2008302590115.ncb
?????文件??????54784??2010-05-30?23:01??2008302590115.opt
?????文件????????501??2010-05-30?23:00??2008302590115.plg
?????目錄??????????0??2010-05-30?15:27??Debug
-----------?---------??----------?-----??----
??????????????8818883????????????????????15
- 上一篇:數據結構 吳陳 科學出版社 課后答案
- 下一篇:遙感影像幾何糾正程序
評論
共有 條評論