📄 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;
}
};
//....................以下为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 + -