Skip to content

Commit 31b50f6

Browse files
committed
GAMP 时间更新
1 parent 75081ef commit 31b50f6

13 files changed

+177
-2550
lines changed

01-RTKLIB源码阅读/09-RTKLIB源码阅读(九)相对定位 RTK、PPK、RTD.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ extern int rtkoutstat(rtk_t *rtk, char *buff)
773773

774774
### 4、rtkpos.c开头的宏函数
775775

776-
RTKLIB中常用很长的一维数组存信息,为方便找对应数据的数组下标,开头定义了几个宏函数
776+
RTKLIB中常用很长的一维数组存信息,为方便找对应数据的数组下标,开头定义了几个宏函数
777777

778778
* **NF**`define NF(opt) ((opt)->ionoopt==IONOOPT_IFLC?1:(opt)->nf)`,Iono-Free LC:频率数,电离层与双频的线性组合时为1,否则为设置的频率数
779779
* **NP**`define NP(opt) ((opt)->dynamics==0?3:9)`,位置参数数量,正常为3,dynamics动力学模式为9

02-GAMP源码阅读/01-GAMP源码阅读(上)主要类型、后处理流程.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ GAMP 全称 (**G**NSS **A**nalysis software for **M**ulti-constellation and mul
1414

1515
### 2、相较于 RTKLIB 的增强
1616

17-
* **非差非组合、UOFC 的 PPP 模型**
17+
* **非差非组合的 PPP 模型**
1818
* **钟跳修复**
1919
* **北斗多路径延迟改正**
2020
* **观测值信号量支持更多**

02-GAMP源码阅读/03-GAMP源码阅读(下)精密单点定位 PPP.md

Lines changed: 175 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## 一、PPP 模型
88

9-
9+
### 1、非差非组合 PPP
1010

1111

1212

@@ -58,6 +58,122 @@ $$
5858

5959

6060

61+
62+
63+
### 参数数量、下标宏定义
64+
65+
状态向量 $\mathbf{X}$ 包含接收机位置坐标增量、接收机钟差改正、天顶对流层湿延迟、倾斜电离层延迟以及 $\mathrm{L}_{1}$ 和 $\mathrm{L}_{2}$ 上的载波相位模糊度六类基本参数 $(n=5+3 m)$ ,即:
66+
$$
67+
\mathbf{X}=[\underbrace{\Delta x, \Delta y, \Delta z}_{\text {位置 }}, c d t_{r}, \underbrace{\mathrm{ZWD}^{2}}_{\text {天顶对流层延迟 }}, \overbrace{\mathrm{I}_{r, 1}^{1}, \cdots, \bar{I}_{r, 1}^{m}}^{L_{1} \text { 上的斜电离层延迟 }}, \underbrace{\bar{N}_{r, 1}^{1}, \cdots, \bar{N}_{r, 1}^{m},}_{L_{1} \text { 上的相位模糊度 }} \overbrace{\bar{N}_{r, 2}^{1}, \cdots, \bar{N}_{r, 2}^{m}}^{L_{2} \text { 上的相位模糊度 }}]^{T}
68+
$$
69+
在 gamp.h
70+
71+
N 开头的宏定义是参数数量:
72+
73+
* **NF****频率数量**:电离层与双频的线性组合时为 1,否则为设置的频率数
74+
75+
```cpp
76+
#define NF(opt) ((opt)->ionoopt==IONOOPT_IF12?1:(opt)->nf)
77+
```
78+
79+
* **NP****位置参数数量**:正常为 3( XYZ坐标),dynamics 动力学模式还有估计速度加速度为 9。
80+
81+
```cpp
82+
#define NP(opt) ((opt)->dynamics?9:3)
83+
```
84+
85+
* **NC****系统数量、钟差参数数量**:设为卫星系统数量,GPS 对应的是接收机钟差,其它系统对应的是与 GPS 之间的系统间偏差 ISB(包括系统间时间偏差和硬件延迟等)。
86+
87+
```cpp
88+
#define NC(opt) (NSYS)
89+
```
90+
91+
* **ND****接收机 DCB 参数数量**:如果频率数量 nf>=3,或者双频非差非组合,设为 1,否则为 0。
92+
93+
```cpp
94+
#define ND(opt) ((opt)->nf>=3||(opt)->ionoopt==IONOOPT_UC12?1:0)
95+
```
96+
97+
* **NICB****GLONASS 伪距频间偏差 ICB 数量**:不估计是为 0,线性模型为 1,二次多项式模型为 2,每颗卫星估计一个 GLONASS 卫星数 NSATGLO,否则是 13(13 是啥意思,没看懂)。
98+
99+
```cpp
100+
#define NICB(opt) ((opt)->gloicb==GLOICB_OFF?0:((opt)->gloicb==GLOICB_LNF?1:((opt)->gloicb==GLOICB_QUAD?2:((opt)->gloicb==GLOICB_1SAT?NSATGLO:13))))
101+
```
102+
103+
* **NT**:**对流层参数数量**:不估计对流层时为 0,`TROPOPT_EST`时为 1,`TROPOPT_ESTG`时为 3。
104+
105+
```cpp
106+
#define NT(opt) ((opt)->tropopt<TROPOPT_EST?0:((opt)->tropopt==TROPOPT_EST?1:3))
107+
```
108+
109+
* **NI**:**电离层参数数量**:非差非组合模式为最大卫星数 MAXSAT,否则为 0 不估计电离层。
110+
111+
```cpp
112+
#define NI(opt) ((opt)->ionoopt==IONOOPT_UC1||(opt)->ionoopt==IONOOPT_UC12?MAXSAT:0)
113+
```
114+
115+
* **NR****除模糊度之外的参数数量**:上面的几个相加。
116+
117+
```cpp
118+
#define NR(opt) (NP(opt)+NC(opt)+ND(opt)+NICB(opt)+NT(opt)+NI(opt))
119+
```
120+
121+
* **NB****模糊度参数数量**:频率数 NF 乘以卫星数 MAXSAT。
122+
123+
```cpp
124+
#define NB(opt) (NF(opt)*MAXSAT)
125+
```
126+
127+
* **NX****总参数数量**:除模糊度之外的参数数量 NR + 总参数数量 NX。
128+
129+
```cpp
130+
#define NX(opt) (NR(opt)+NB(opt))
131+
```
132+
133+
I 开头的宏定义是参数下标:
134+
135+
> 为啥直接从 IC 开始,没有 IP?因为位置参数在最前面,就是前 3 或者前 9,直接取就行。
136+
137+
* **IC****钟差、ISB 参数下标**
138+
139+
```cpp
140+
#define IC(s,opt) (NP(opt)+(s))
141+
```
142+
143+
* **ID**:**DCB 参数下标**:
144+
145+
```cpp
146+
#define ID(opt) (NP(opt)+NC(opt))
147+
```
148+
149+
* **IICB**:**GLONASS 伪距频间偏差 ICB 下标**:
150+
151+
```cpp
152+
#define IICB(s,opt) (NP(opt)+NC(opt)+ND(opt)+(s)-1)
153+
```
154+
155+
* **IT**:**对流层参数下标**:
156+
157+
```cpp
158+
#define IT(opt) (NP(opt)+NC(opt)+ND(opt)+NICB(opt))
159+
```
160+
161+
* **II**:**电离层参数下标**:
162+
163+
```cpp
164+
#define II(s,opt) (NP(opt)+NC(opt)+ND(opt)+NICB(opt)+NT(opt)+(s)-1)
165+
```
166+
167+
* **IB**:**模糊度参数下标**:
168+
169+
```cpp
170+
#define IB(s,f,opt) (NR(opt)+MAXSAT*(f)+(s)-1)
171+
```
172+
173+
174+
175+
176+
61177
## 一、pppos
62178

63179
![image-20231028182626796](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20231028182626796.png)
@@ -210,6 +326,56 @@ $$
210326
$$
211327
式中,$\mathbf{e}_{r}^{s}$ 表示卫星指向接收机的单位向量;$\mathbf{x}, \mathbf{y}$ 和 $\mathbf{x}^{\prime}, \mathbf{y}^{\prime}$ 分别表示接收机和卫星的两个有效偶极矢量;sign 表示符号函数。
212328
329+
```c
330+
static int model_phw(gtime_t time, int sat, const char *type, int opt,
331+
const double *rs, const double *rr, double *phw)
332+
{
333+
double exs[3],eys[3],ek[3],exr[3],eyr[3],eks[3],ekr[3],E[9];
334+
double dr[3],ds[3],drs[3],r[3],pos[3],cosp,ph;
335+
int i;
336+
337+
if (opt<=0) return 1; /* no phase windup */
338+
339+
// 首先调用 sat-yaw 函数,根据卫星的姿态模型计算出卫星本体坐标系 X,Y 方向的单位矢量exs、eys,即上面公式里的SX、SY
340+
/* satellite yaw attitude model */
341+
if (!sat_yaw(time,sat,type,opt,rs,exs,eys)) return 0;
342+
343+
// 计算卫星至接收机的单位矢量
344+
/* unit vector satellite to receiver */
345+
for (i=0;i<3;i++) r[i]=rr[i]-rs[i];
346+
if (!normv3(r,ek)) return 0;
347+
348+
// 计算接收机天线在当地坐标系的北向、西向单位矢量
349+
/* unit vectors of receiver antenna */
350+
ecef2pos(rr,pos);
351+
xyz2enu(pos,E);
352+
exr[0]= E[1]; exr[1]= E[4]; exr[2]= E[7]; /* x = north */
353+
eyr[0]=-E[0]; eyr[1]=-E[3]; eyr[2]=-E[6]; /* y = west */
354+
355+
// 根据公式以及前一次的相位缠绕误差计算当前时刻相位缠绕误差
356+
/* phase windup effect */
357+
cross3(ek,eys,eks);
358+
cross3(ek,eyr,ekr);
359+
for (i=0;i<3;i++) {
360+
ds[i]=exs[i]-ek[i]*dot(ek,exs,3)-eks[i];
361+
dr[i]=exr[i]-ek[i]*dot(ek,exr,3)+ekr[i];
362+
}
363+
cosp=dot(ds,dr,3)/norm(ds,3)/norm(dr,3);
364+
if (cosp<-1.0) cosp=-1.0;
365+
else if (cosp> 1.0) cosp= 1.0;
366+
ph=acos(cosp)/2.0/PI;
367+
cross3(ds,dr,drs);
368+
if (dot(ek,drs,3)<0.0) ph=-ph;
369+
370+
*phw=ph+floor(*phw-ph+0.5); /* in cycle */
371+
return 1;
372+
}
373+
```
374+
375+
#### sat_yaw():
376+
377+
378+
213379
214380
215381
### 4、tidedisp():潮汐改正
@@ -266,20 +432,26 @@ $$
266432
267433
268434
269-
### 四、ppp_res():残差计算、设计矩阵构建
270435
271436
272437
273438
274439
275440
441+
### 四、ppp_res():残差计算、设计矩阵构建
442+
443+
![image-20231102142834322](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20231102142834322.png)
444+
276445
277446
278447
279-
## 五、PPP 时间更新
280448
281449
282450
451+
## 五、PPP 时间更新
452+
453+
时间更新函数对理解 PPP 模型至关重要,
454+
283455
284456
285457
### 1、udstate_ppp():Kalman 滤波时间更新
-793 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)