📄 mystruct.h
字号:
///////////////////////////////////////////////
#include<string>
using namespace std;
# ifndef MYSTRUCT_H_H //防止头文件重复加载
# define MYSTRUCT_H_H
struct time_calendar //观测历元的日历时,也即信号接收时刻
{
double year, month,day,hour,minute; //要是用int,去除以一个数,结果也是int型的
double second;
public:
time_calendar(void)
//初始化
{
year=4;
month=5;
day=1;
hour=10;
minute=5;
second=15;
}
};
struct time_gps //gps时间结构体(my_obs结构会用到)
{
int num_week; //周数
double num_sec; //秒数
bool operator ==(time_gps &oResID2) //自定义operate==,运算符重载
{
{return(num_week==oResID2.num_week)&&(num_sec==oResID2.num_sec);};
}
double operator -(time_gps &Counter) //自定义operate-(结果为秒数)
{
time_gps tempG;
if(num_week>=Counter.num_week)
{
tempG.num_sec=num_sec-Counter.num_sec;
tempG.num_week=num_week-Counter.num_week;
tempG.num_sec+=tempG.num_week*604800;
}
else if (num_week<Counter.num_week)
{
int t;
t=Counter.num_week-num_week;
Counter.num_week-=t;
Counter.num_sec+=t*604800;
tempG.num_sec=Counter.num_sec-num_sec;
}
{return tempG.num_sec;};
}
public:
time_gps(void)
//初始化
{
num_sec=0;
num_week=0;
}
};
struct epoch_HedMesg
{
time_calendar t1;//日期calendar
int flag;//0正常,1电源故障,2天线移动。。。
int satNum;//卫星数目
string satList;//当前历元卫星PRN列表,先不考虑卫星数超过12颗的情况
double rcvrClkBias;//接收积钟差
public:
epoch_HedMesg(void)//初始化
{
flag=0;//time_calendar初始化了,先在不用了
satNum=0;
satList=" ";
rcvrClkBias=0;//需要字符转数值
}
};
struct complex_pseudo_obs//伪距观测值结构
{
double value; //伪距值f14.3
int LLI; //LLI值
int inten_sig; //信号强度
public:
complex_pseudo_obs(void)
{
value=0;
LLI=0;
inten_sig=0;
}
};
struct complex_phrase_obs//相位观测值结构
{
double value; //L1值
int LLI; //LLI值
int inten_sig; //信号强度
int slip; //周跳标记
public:
complex_phrase1_obs(void)
{
value=0;
LLI=0;
inten_sig=0;
slip=0;
}
};
struct complex_obs //包含某颗卫星某一历元所有观测值的自定义观测值(my_obs结构会用到)
{ //也就是一行的数据
complex_pseudo_obs pseudo_obs; // c/A伪距观测值
complex_phrase_obs phrase1_obs; //L1观测值
complex_phrase_obs phrase2_obs; //L2观测值
};
struct my_obs //含有卫星名、星历的自定义观测值
{ //包含以上。。。结构
time_gps tgps ; //历元,还没改成gps时间
int sat_num; //该历元的某卫星编号(以便和N文件对应)
complex_obs set_obs; //O文件提供的该历元该卫星的各类观测值,set一系列
string flag; //标示,用以表明缺失哪些类的观测值,如flag="c1"表明缺乏c码伪距
public:
my_obs(void) //初始化
{
sat_num=0;
flag="";
}
};
struct epoch_set //包含某历元全部卫星的my_obs值的自定义观测值(读取一个历元的全部数据)
{
time_gps gps_sat; //历元
int num_sat; //卫星个数
my_obs array_sat[24]; //一个历元的卫星不会超过24个
string list_sat; //卫星名列表
public:
epoch_set(void)
//初始化
{
num_sat=0;
list_sat=" ";
}
};
//....................以下为N文件中要用到................
struct pare_s_clock //卫星钟差三参数
{
time_gps TOC;//TOC
double a0;
double a1;
double a2;
public:
pare_s_clock(void)
{
a0=0;
a1=0;
a2=0;
}
};
struct nav_sat //卫星轨道参数(参照李征航书)
{
int PRN;
time_gps TOE; //分别在两个地方得到秒数和周数轨道3,秒;轨道4,周
pare_s_clock pare_clock;//卫星钟差三参数&TOC
double IODE;
double Crs;
double delta_n;
double M0;
double Cuc;
double e;
double Cus;
double sqrtA;
double Cic;
double OMEGA;
double Cis;
double i0;
double Crc;
double w;
double OMEGA_DOT;
double i_DOT;
double code_L2;//L2码
double mark_code_L2;//L2码数据标记
double pre_sat;//卫星精度
double hel_sat;//卫星健康状态
double TGD;
double IODC;//IODC钟的数据龄期
double time_sig_send;
public:
nav_sat(void)
{
PRN=0;
IODE=0;
Crs=0;
delta_n=0;
M0=0;
Cuc=0;
e=0;
Cus=0;
sqrtA=0;
Cic=0;
OMEGA=0;
Cis=0;
i0=0;
Crc=0;
w=0;
OMEGA_DOT=0;
i_DOT=0;
code_L2=0;
mark_code_L2=0;
pre_sat=0;
hel_sat=0;
TGD=0;
IODC=0;
time_sig_send=0;
}
};
//---------------------------------------
struct myCoord
{
double x;
double y;
double z;
double dts;
public:
myCoord(void)
{
x=0;
y=0;
z=0;
dts=0;
}
};
struct delta_cpp
{
double dx;
double dy;
double dz;
double dTr;
public:
delta_cpp(void)
{
dx=0;
dy=0;
dz=0;
dTr=0;
}
};
//...........站心直角坐标................(参照刘基余书P102)
struct sta_rectangular
{
double Xps;
double Yps;
double Zps;
public:
sta_rectangular()
{
Xps=0;
Yps=0;
Zps=0;
}
};
//...........站心极坐标................(参照刘基余书P102)
struct sta_polar
{
double Rp;
double Ap;
double Ep;
public:
sta_polar()
{
Rp=0;
Ap=0;
Ep=0;
}
};
# endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -