diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/00-RTKLIB \345\221\275\344\273\244\350\241\214\347\250\213\345\272\217\344\275\277\347\224\250\346\226\271\345\274\217\357\274\232rnx2rtkp\343\200\201rtkrcv\343\200\201str2str\343\200\201convbin\343\200\201pos2kml.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/00-RTKLIB \345\221\275\344\273\244\350\241\214\347\250\213\345\272\217\344\275\277\347\224\250\346\226\271\345\274\217\357\274\232rnx2rtkp\343\200\201rtkrcv\343\200\201str2str\343\200\201convbin\343\200\201pos2kml.md" index 724876c..3b5c18a 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/00-RTKLIB \345\221\275\344\273\244\350\241\214\347\250\213\345\272\217\344\275\277\347\224\250\346\226\271\345\274\217\357\274\232rnx2rtkp\343\200\201rtkrcv\343\200\201str2str\343\200\201convbin\343\200\201pos2kml.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/00-RTKLIB \345\221\275\344\273\244\350\241\214\347\250\213\345\272\217\344\275\277\347\224\250\346\226\271\345\274\217\357\274\232rnx2rtkp\343\200\201rtkrcv\343\200\201str2str\343\200\201convbin\343\200\201pos2kml.md" @@ -1,5 +1,3 @@ -> 原始 Markdown文档、Visio流程图、XMind思维导图见:https://github.com/LiZhengXiao99/Navigation-Learning - [TOC] ## 一、程序获取和编译 @@ -171,7 +169,7 @@ OPTIONS --- -## 四、rtknavi:实时定位解算 +## 四、rtkrcv:实时定位解算 ``` rtkrcv [-s][-p port|-d dev][-o file][-t level] diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/00-RTKLIB \347\225\214\351\235\242\347\250\213\345\272\217\344\275\277\347\224\250\346\226\271\345\274\217\357\274\232rtkget\343\200\201rtkconv\343\200\201rtkplot\343\200\201rtkpost\343\200\201rtknavi\343\200\201strsvr.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/00-RTKLIB \347\225\214\351\235\242\347\250\213\345\272\217\344\275\277\347\224\250\346\226\271\345\274\217\357\274\232rtkget\343\200\201rtkconv\343\200\201rtkplot\343\200\201rtkpost\343\200\201rtknavi\343\200\201strsvr.md" index 54434f2..a124480 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/00-RTKLIB \347\225\214\351\235\242\347\250\213\345\272\217\344\275\277\347\224\250\346\226\271\345\274\217\357\274\232rtkget\343\200\201rtkconv\343\200\201rtkplot\343\200\201rtkpost\343\200\201rtknavi\343\200\201strsvr.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/00-RTKLIB \347\225\214\351\235\242\347\250\213\345\272\217\344\275\277\347\224\250\346\226\271\345\274\217\357\274\232rtkget\343\200\201rtkconv\343\200\201rtkplot\343\200\201rtkpost\343\200\201rtknavi\343\200\201strsvr.md" @@ -2,6 +2,11 @@ [TOC] +> 推荐资料: +> +> * [RTKLIB2.4.3界面程序中文说明书.pdf](RTKLIB2.4.3界面程序中文说明书.pdf) +> * 比起苍白的图文介绍,看视频教程来学习界面程序更为清晰,推荐看B站[赵乐文](https://space.bilibili.com/479790048)和[欧阳明俊](https://space.bilibili.com/1394219706)老师的视频。 + ### 1、RTKGET 数据下载 > 不推荐用 RTKGET 下载数据,推荐使用周峰老师开源的 [GAMP-GOOD](https://github.com/zhouforme0318/GAMPII-GOOD) 和常春涛博士开源的 [FAST](https://github.com/ChangChuntao/FAST),都带有界面。 diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\200\357\274\211\347\250\213\345\272\217\344\273\213\347\273\215\343\200\201\347\274\226\350\257\221\350\260\203\350\257\225\343\200\201\346\240\270\345\277\203\344\273\243\347\240\201\345\272\223\343\200\201\345\255\246\344\271\240\345\273\272\350\256\256.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\200\357\274\211\347\250\213\345\272\217\344\273\213\347\273\215\343\200\201\347\274\226\350\257\221\350\260\203\350\257\225\343\200\201\346\240\270\345\277\203\344\273\243\347\240\201\345\272\223\343\200\201\345\255\246\344\271\240\345\273\272\350\256\256.md" index dbc1996..ca1992f 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\200\357\274\211\347\250\213\345\272\217\344\273\213\347\273\215\343\200\201\347\274\226\350\257\221\350\260\203\350\257\225\343\200\201\346\240\270\345\277\203\344\273\243\347\240\201\345\272\223\343\200\201\345\255\246\344\271\240\345\273\272\350\256\256.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\200\357\274\211\347\250\213\345\272\217\344\273\213\347\273\215\343\200\201\347\274\226\350\257\221\350\260\203\350\257\225\343\200\201\346\240\270\345\277\203\344\273\243\347\240\201\345\272\223\343\200\201\345\255\246\344\271\240\345\273\272\350\256\256.md" @@ -82,9 +82,9 @@ RTKLIB 可以初步实现以下功能,相对于商业软件,可靠性没那 #### 2. 支持功能 -* **支持六大 GNSS 系统**,包括 GPS,GLONASS,Beidou,Galileo,QZSS 和 SBAS。 +* **支持七大 GNSS 系统**,包括 GPS,GLONASS,Beidou,Galileo,QZSS、IRNSS 和 SBAS。 - > 但是不支持全频点,不支持印度 IRNSS 系统,多频算法不完善,对北斗的支持不好。 + > 但是不支持全频点,多频算法不完善,对北斗的支持不好。 * **支持 9 种 GNSS 实时和后处理定位模式**: @@ -124,14 +124,13 @@ RTKLIB 可以初步实现以下功能,相对于商业软件,可靠性没那 各种各样的都有,有对定位解算算法做增强的、有做组合导航的、有做服务端程序的、有做软件接收机的、做应用的。下面介绍几个我了解的: -* [RTKLIB-demo5](https://github.com/rtklibexplorer/RTKLIB):针对低成本接收机做了算法增强,下面的部分程序是基于 demo5 开发的。 +* [RTKLIB-demo5](https://github.com/rtklibexplorer/RTKLIB):针对低成本接收机做了算法增强。 * [rtklib-py](https://github.com/rtklibexplorer/rtklib-py): -* [GPSTK](https://github.com/SGL-UT/GPSTk): * [GAMP](https://geodesy.noaa.gov/gps-toolbox/GAMP.htm):山科大周峰写的双频浮点解 PPP,在 RTKLIB 基础上做精简和算法的增强,比原版 RTKLIB 简单,是入门学习 PPP 不错的选择。 * [Ginan](https://github.com/GeoscienceAustralia/ginan):澳大利亚,包括精密定位程序 PEA、定轨程序 POD,文档很详细,老师让我看,但我没看下去,代码比较难懂, * [GraphGNSSLib](https://github.com/weisongwen/GraphGNSSLib):港理工,支持图优化 SPP、RTK,作者在知乎很活跃,发过一些科普文章。 * [GLIO](https://github.com/XikunLiu-huskit/GLIO):在 GraphGNSSLib 基础上做的 GNSS-IMU-Lidar 图优化紧组合; -* [PPPLIB](https://geodesy.noaa.gov/gps-toolbox/PPPLib.htm):我老师在矿大读研的时候写的,支持三频 SPP、PPK、PPP 和松紧组合。 +* [PPPLIB](https://geodesy.noaa.gov/gps-toolbox/PPPLib.htm):我老师在矿大读研的时候写的,支持三频 SPP、PPK、PPP 和 IMU 组合。 * [GINAV](https://github.com/kaichen686/GINav):MATLAB 紧组合,文件名起的和 RTKLIB 函数名一模一样,虽说是组合导航,但也可以只用其中的 GNSS 部分,相比 goGPS 简单不少。 * [GICI-LIB](https://github.com/chichengcn/gici-open):上海交大池澄博士开源的 GNSS-IMU-Camera 图优化多源融合程序,以 GNSS 为主,实现了 RTK、PPP 的模糊度固定 * [PPP-AR](https://github.com/PrideLab/PRIDE-PPPAR):武大 GNSS 中心开源的后处理 PPP,使用配套的产品可以实现 PPP 模糊度固定,支持五频数据处理,使用了 rnx2rtkp 可执行程序计算测站初值坐标。 @@ -340,7 +339,7 @@ rtkrcv 无法直接在 Windows 下编译调试,因为它依赖了一些 Linux _WINSOCK_DEPRECATED_NO_WARNINGS ENAGLO ENACMP - DENAGAL + ENAGAL DLL WIN32 TRACE @@ -349,6 +348,8 @@ rtkrcv 无法直接在 Windows 下编译调试,因为它依赖了一些 Linux > * 尤其主要加 WIN32,好多博客都没加这一项,加了这一项后 RTKLIB 就不会用 Linux 下的 ,咱们项目要在 Windows 下编译运行的,不加会报 ”找不到 “ 的错。 > > * 不加 TRACE 没法输出 trace 文件。 + > + > * 4. 将常规中的目标文件名改为 rnx2rtkp 。 @@ -410,6 +411,12 @@ rnx2rtkp 的命令行参数很复杂,一不下心就会出错,这时候可 image-20240221191921119 +再比如文件路径中间如果出现空格,会被识别成两个不同的命令行参数,像下图所示的错误: + +![image-20241006133821435](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20241006133821435.png) + +> 每个人遇到的问题都不见得相同,我觉得最好不要一上来就问师兄或者老师,把自己能想到的方法都试试,"调试" 嘛,就是得多调多试,。 + --- ## 三、CMake+Linux 编译调试 @@ -531,8 +538,6 @@ RTKLIB APP 目录下有 5 个命令行程序 target_link_libraries(POS2KML rtklib) ``` - - --- ### 3、编译调试自己写的程序、链接 RTKLIB @@ -563,7 +568,7 @@ RTKLIB 提供许多代码库和 API,包括:卫星和导航系统函数、矩 头文件 rtklib.h 是库的核心 ,主要有四大部分:**宏定义**、**结构体定义**、**全局变量**、**函数定义** -> 需要注意并非所有函数都可以直接调用,只有加了 EXPORT 前缀,而且在 RTKLIB.h 中声明了才行;想用 static 前缀的函数也很简单,只需要把前缀改成 EXPORT,然后在 rtklib.h 中加上声明。 +> 需要注意并非所有函数都可以直接调用,只有加了 EXPORT 前缀,而且在 rtklib.h 中声明了才行。有些 static 小函数在 rtklib.h 没声明,只在 .c 源文件里定义了,在它定义的 .c 源文件以外不能直接调用;想调用它也很简单,只需要把前缀改成 EXPORT,然后在 rtklib.h 中加上声明。 ### 1、宏定义 @@ -909,8 +914,6 @@ RTKLIB 提供许多代码库和 API,包括:卫星和导航系统函数、矩 - - --- ### 10、代码库的使用总结 @@ -923,8 +926,6 @@ RTKLIB 提供许多代码库和 API,包括:卫星和导航系统函数、矩 * 用指针实现了顺序表, * 很多读文件的函数都有结尾带 t 和结尾不带 t 两种,带 t 表示要传入开始时间和结束时间的。 -* - diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/02-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\272\214\357\274\211\345\220\216\345\244\204\345\256\232\344\275\215\350\247\243\347\256\227\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232RTKPOS\343\200\201RNX2RTKP\343\200\201RTKPLOT\343\200\201RTKGET.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/02-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\272\214\357\274\211\345\220\216\345\244\204\345\256\232\344\275\215\350\247\243\347\256\227\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232RTKPOS\343\200\201RNX2RTKP\343\200\201RTKPLOT\343\200\201RTKGET.md" index 6b5709a..7e14442 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/02-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\272\214\357\274\211\345\220\216\345\244\204\345\256\232\344\275\215\350\247\243\347\256\227\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232RTKPOS\343\200\201RNX2RTKP\343\200\201RTKPLOT\343\200\201RTKGET.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/02-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\272\214\357\274\211\345\220\216\345\244\204\345\256\232\344\275\215\350\247\243\347\256\227\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232RTKPOS\343\200\201RNX2RTKP\343\200\201RTKPLOT\343\200\201RTKGET.md" @@ -1,22 +1,20 @@ - - [TOC] ## 一、后处理程序使用 -> 再次推荐一下 B 站赵老师的[视频讲解](https://space.bilibili.com/479790048?spm_id_from=333.337.search-card.all.click),看视频学软件操作更直观。我主要是用 RTKLIB 的代码库,自带的程序除了 rtkplot 之外我都没咋用过,下面写的内容是看赵老师视频的时候做的笔记。 +> 再次推荐一下 B 站赵老师的[视频讲解](https://space.bilibili.com/479790048?spm_id_from=333.337.search-card.all.click),看视频学软件操作更直观。我主要是用 RTKLIB 的代码库,自带的程序除了 rtkplot、rtkpost 之外我都没咋用过,下面写的内容很多都是看赵老师视频的时候做的笔记。 ### 1、常见后处理操作 -* 在进行解算前就可以用 RTKPLOT 可以对数据进行分析,最新的 b34 版本的 RTKPLOT 好像有 bug,可以去下载一个别的版本的。 +* 在进行解算前就可以用 RTKPLOT 可以对数据进行分析,最新的 b34 版本的 RTKPLOT 好像有 bug,可以去下载一个别的版本的,比如下载 rtklib-demo5。 * 通过 RTKGET 可以下载 IGS 观测数据和各种改正产品(我没咋用过)。 +### 2、后处理数据获取 -### 2、后处理数据获取 @@ -177,8 +175,6 @@ - - ## 二、后处理解算 ### 1、使用 rnx2rtkp 后处理解算 @@ -191,15 +187,17 @@ rnx2rtkp 全称 RINEX to RTK pos,通过原始 RINEX 文件,输出 RTKLIB 的 * 使用方式:`rnx2rtkp [option]... file file [...] ` -* 读取 RINEX:OBS/NAV/GNAV/HNAV/CLK, SP3, SBAS 等文件,计算接收机、流动站坐标,并输出结果。 +* 读取 RINEX:OBS/NAV/CLK/SP3/SBAS 等文件,计算接收机、流动站坐标,并输出结果。 -* 对于相对定位,第一个 OBS 观测值文件需含接收机、流动站观测值,第二个 OBS 文件需含基准站观测值。 +* 对于相对定位,第一个 OBS 观测值文件需含流动站观测值,第二个 OBS 文件需含基准站观测值。 -* 输入文件至少要有一个星历文件,RINEX NAV/GNAV/HNAV 。 +* 输入文件至少要有一个星历文件。 * 想用 SP3 精密星历文件,需提供 .sp3/.eph 文件的路径。 -* 输入文件路径可包含通配符 *,为了防止与命令行命令冲突,要用 `"..."` 括起带通配符符路径。 +* 输入文件路径可包含通配符 *,为了防止与命令行命令冲突,要用引号 `"..."` 括起带通配符符路径。 + +* 输入文件路径中如果有空格,也要用引号括起来,否则会被识别成两个不同的参数。 * 输命令行参数的几种方式: * **VS**: @@ -476,23 +474,17 @@ char *base I 基准站ID列表,空格隔开 ## 三、三种输出文件 -了解三种输出文件具体内容、默认路径、命名方式, - -看懂文件在哪个函数创建,哪个函数输出, - -知道怎么去拓展,输出些我们想要的其它信息 - - +> 学习要求: +> +> * 了解三种输出文件具体内容、默认路径、命名方式; +> * 看懂文件在哪个函数创建,哪个函数输出; +> * 知道怎么去拓展,输出些我们想要的其它信息; 后处理过程中,三种输出文件都在 execses() 函数中创建: ![image-20240222200316982](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20240222200316982.png) -Trace 信息都是直接输出,结果和中间结果先存在` rtk->sol`、`rtk->ssat` 结构体中,然后每个历元输出一次, - - - - +Trace 信息都是直接输出,结果和中间结果先存在` rtk->sol`、`rtk->ssat` 结构体中,然后每个历元算出一组结果就输出一次, @@ -506,40 +498,43 @@ Trace 信息都是直接输出,结果和中间结果先存在` rtk->sol`、`rt -,procpos() 函数 while循环中每次解算完调用 outsol() 输出结果, +procpos() 函数 while循环中每次解算完调用 outsol() 输出结果, ### 3、中间结果文件 +> 程序里把它起名叫 ”Solution Status“,所以我以前写文档把它称之为“结果状态”,其实更贴切的翻译应该是“中间结果”,以后会慢慢改过来。 -## 四、从 postpos 到 rtkpos 的函数调用过程 - +## 四、从 postpos 到 rtkpos 的函数调用过程 * **postpos()**:按解算时间分开处理,替换输入文件时间通配符,读取天线参数文件、大地水准面文件。 -* **execses_b()**:分基准站进行定位解算,替换输入文件基准站ID通配符。 - -* **execses_r()**:对每个流动站进行定位解算,替换输入文件流动站ID通配符。 +* **execses_b()**:分基准站进行处理,替换输入文件基准站ID通配符。 +* **execses_r()**:对每个流动站进行处理,替换输入文件流动站ID通配符。 * **execses()**:创建三种输出文件(Trace、结果文件、中间结果文件),读取 TEC、ERP、OBS、NAV、DCB、PCV、BLQ文件,计算基准站坐标,根据滤波解算顺序配置参数调用 procpos() 解算,释放读取的观测数据和星历数据。 * **procpos()**:先初始化` rtk_t`,然后进入 while 循环,每次循环都通过 `inputobs ()` 函数按滤波顺序读取一个历元的数据,调用 `satsys()` 排除禁用卫星,并调用 `rtkpos()` 函数对该历元的数据进行解算,调用 `outsol()` 输出解释结果。 -* ![请添加图片描述](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/25a7656c3b0148f0ba14f6365027cf0e.png) ![请添加图片描述](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/c782474785b24b44ab4de4fbd8999af9.png) ### 1、postpos() +![image-20241006135819519](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20241006135819519.png) + #### 1. 功能 -后处理定位的主入口函数,根据tu分计算时间段,调用调用`execses_b()`进行下一步解算 +后处理定位的主入口函数,根据 tu 分计算时间段,调用调用`execses_b()`进行下一步解算,输入文件包括观测文件、导航文件、精密星历文件等,postpos 在处理输入文件时有两种方法: + +* 一种是输入文件可以只包含替换,然后通过函数`reppath()`处理,将关键词用时间、基准站编号、流动站编号等代替; +* 另一种是直接调用输入文件的文件名, -输入文件包括观测文件、导航文件、精密星历文件等,postpos在处理输入文件时有两种方法,一种是输入文件可以只包含替换,然后通过函数`reppath()`处理,将关键词用时间、基准站编号、流动站编号等代替,另一种是直接调用输入文件的文件名,postpos主要是来判断是哪一种输入方式,然后调用相应函数。 +> postpos 冗长的代码段主要是来判断是哪一种输入方式,然后调用相应函数进行处理,一般不用看太仔细的去看。 #### 2. 输入参数: @@ -560,9 +555,9 @@ char *base I 基准站ID列表,空格隔开 #### 3. 返回值 -* 处理一切正常会接收execxes_b()的返回值,失败返回0,内存失败返回-1 -* execses_b()正常会接收execses_b()的返回值,失败返回0 -* execses_r()正常会接收execses()的返回值,失败返回0,aborts返回1 +* 处理一切正常会接收 execxes_b() 的返回值,失败返回 0,内存失败返回 -1 +* execses_b() 正常会接收 execses_b() 的返回值,失败返回 0 +* execses_r() 正常会接收 execses() 的返回值,失败返回 0,aborts 返回 1 #### 4. 执行流程 @@ -596,13 +591,13 @@ char *base I 基准站ID列表,空格隔开 * 调用`execses_b()`进行下一步解算。 - ②:**若`ts`不为0,`tu`为0或小于0** :就不考虑`te`、和`tu` + ②**若`ts`不为0,`tu`为0或小于0** :就不考虑`te`、和`tu` * 为`ifile[]`开辟空间,循环替换`infile[i]`的替换符到`ifile[i]`中。 * 调用`reppath`替换outfile的替换符,存到ofile中。 * 调用`execses_b()`进行下一步解算。 - ③:**若`ts`为0**:直接把把`infile[]`的下标`j`存到`index[]`中,调用`execses_b` 进行下一步解算 + ③**若`ts`为0**:直接把把`infile[]`的下标`j`存到`index[]`中,调用`execses_b` 进行下一步解算 4. 调用`closeses()`,释放`openses()`开辟的内存。 @@ -734,8 +729,6 @@ extern int postpos(gtime_t ts, gtime_t te, double ti, double tu, } ``` - - #### 5. 调用的函数 * **openses()**:开始解算进程,读取天线、大地水准面文件 @@ -900,13 +893,13 @@ extern int postpos(gtime_t ts, gtime_t te, double ti, double tu, } ``` - - ### 2、execses_b()、execses_r() +![image-20241006135943200](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20241006135943200.png) + #### 1. 功能 - execses_b()和execses_r()函数非常类似,execsec_b()会调用调用`readpreceph()`读取精密星历和SBAS数据,把传入`infile[]`文件中基准站替换符进行替换,之后调用`execses_r()`。`execses_r()`把传入`infile[]`文件中流动站站替换符进行替换,再调用`execses()` +execses_b() 和 execses_r() 函数非常类似,execsec_b()会调用调用`readpreceph()`读取精密星历和SBAS数据,把传入`infile[]`文件中基准站替换符进行替换,之后调用`execses_r()`。`execses_r()`把传入`infile[]`文件中流动站站替换符进行替换,再调用`execses()` #### 2. 输入参数 @@ -1151,10 +1144,10 @@ static int execses_r(gtime_t ts, gtime_t te, double ti, const prcopt_t *popt, } ``` - - ### 四、execses() +![image-20241006140111009](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20241006140111009.png) + #### 1. 功能 读取各种文件,并将文件中的内容赋值到程序的结构体内,获取基准站的位置,根据滤波方向调用procpos()进行下一步解算。.trace文件的生成、文件读取相关trace文件内容的生成,均在execses中 。 @@ -1559,8 +1552,8 @@ static int execses(gtime_t ts, gtime_t te, double ti, const prcopt_t *popt, * 判断静态模式,处理选项和结果选项都得为静态 * 开始大循环,i:从前到后,取前向滤波的结果 ,j:从后到前,取后向滤波的结果 ,判断前后向滤波结果的时间差 tt * 时间差大于DTTOL ,sols、rbs取时间早的结果,另一个结果的下标不变,进行下一次循环的判断 - * 时间差很小,solution status不同,sols、rbs取solution status小的结果 - * 时间差很小,solution status相同,进行结合 + * 时间差很小,solution status 不同,sols、rbs 取 solution status 小的结果 + * 时间差很小,solution status 相同,进行结合 * sols取前向滤波结果 ,时间取前后向时间的平均 * 相对定位模式,若结果为固定解,调用valcomb()检验,如果失败将fix降级为float * 赋值前后向协方差给Qf、Qb ,调用smoother()进行前后向滤波结果结合,位置存在sols.rr[],方差存在sols.qr[] @@ -1720,7 +1713,7 @@ static void combres(FILE *fp, const prcopt_t *popt, const solopt_t *sopt) } ``` -* **valcomb()**:判断combine结果的有效性,ok if in 4-sigma +* **valcomb()**:判断前后向滤波合并后结果的有效性( $4 \sigma$ 以内有效) ```c static int valcomb(const sol_t *solf, const sol_t *solb) @@ -1733,8 +1726,8 @@ static void combres(FILE *fp, const prcopt_t *popt, const solopt_t *sopt) /* compare forward and backward solution */ for (i=0;i<3;i++) { - dr[i]=solf->rr[i]-solb->rr[i]; //坐标值差dr为两坐标相减 - var[i]=solf->qr[i]+solb->qr[i]; //方差car为两相加 + dr[i]=solf->rr[i]-solb->rr[i]; // 坐标值差 dr 为两坐标相减 + var[i]=solf->qr[i]+solb->qr[i]; // 方差 car 为两相加 } //dr在限差4倍标准差之内,就合格return 1,否则return 0 for (i=0;i<3;i++) { @@ -1743,19 +1736,19 @@ static void combres(FILE *fp, const prcopt_t *popt, const solopt_t *sopt) time2str(solf->time,tstr,2); trace(2,"degrade fix to float: %s dr=%.3f %.3f %.3f std=%.3f %.3f %.3f\n", tstr+11,dr[0],dr[1],dr[2],SQRT(var[0]),SQRT(var[1]),SQRT(var[2])); - return 0; - } + return 0; } return 1; } ``` - ### 五、procpos() +![image-20241006140151333](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20241006140151333.png) + #### 1. 功能 -从这个函数开始正式整个流动站和基准站逐历元处理。每次循环都通过inputobs函数读取一个历元的数据,并调用rtkpos函数对该历元的数据进行解算。 +从这个函数开始正式整个流动站和基准站逐历元处理。每次循环都通过 `inputobs` 函数读取一个历元的数据,并调用 `rtkpos` 函数对该历元的数据进行解算。 #### 2. 传入参数 @@ -1769,12 +1762,12 @@ int mode I 0:forward/backward、1:combined #### 3. 执行流程 -* 判断结果是否为静态,处理选项和结果选项都为静态才算静态 -* 调用`rtkinit()` 初始化`rtk_t `,将popt结构体赋值给rtk的部分成员 -* while大循环,调用`inputobs()`,每次取一个历元的观测数据`obs[]` -* 排除禁用卫星的观测值 -* PPP中如果需要,调用`corr_phase_bias_ssr()`相位的小数轴偏差改正 -* 调用rtkpos()对当前历元进行解算 +* 判断结果是否为静态,处理选项和结果选项都为静态才算静态; +* 调用`rtkinit()` 初始化`rtk_t `,将 popt 结构体赋值给 rtk 的部分成员 ; +* while 大循环,调用`inputobs()`,每次取一个历元的观测数据`obs[]`; +* 排除禁用卫星的观测值; +* PPP 中如果需要,调用`corr_phase_bias_ssr()`相位的小数偏差改正(不完善); +* 调用 `rtkpos()` 对当前历元进行解算 * 根据模式,输出结果,记录当前历元时间 ```c @@ -2005,9 +1998,10 @@ static void procpos(FILE *fp, const prcopt_t *popt, const solopt_t *sopt, } rtk_t; ``` - ### 六、rtkpos() +![1918b61538bce6465f4ae19615ba81e6](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/1918b61538bce6465f4ae19615ba81e6.png) + #### 1. 功能: 根据观测数据和导航信息,计算接收机的位置、速度和钟差。 设置基准站位置,记录观测值数量。调用 pntpos 进行接收机单点定位。若为单点定位模式,输出,返回。若为 PPP 模式,调用 pppos 进行精密单点定位,输出,返回。若无基准站观测数据,输出,返回。若为移动基站模式,调用 pntpos 进行基站单点定位,并加以时间同步;否则只计算一下差分时间。调用 relpos 进行相对基站的接收机定位,输出,返回。相对定位模式在调用rtkpos之前应该先设置好基站位置,动基线模式除外。 @@ -2178,15 +2172,3 @@ extern int rtkpos(rtk_t *rtk, const obsd_t *obs, int n, const nav_t *nav) - - - - - - - - - - - - diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/03-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\211\357\274\211\346\225\260\346\215\256\346\265\201\346\223\215\344\275\234\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232STRSVR\343\200\201STR2STR\343\200\201RTKCONV\343\200\201CONVBIN.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/03-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\211\357\274\211\346\225\260\346\215\256\346\265\201\346\223\215\344\275\234\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232STRSVR\343\200\201STR2STR\343\200\201RTKCONV\343\200\201CONVBIN.md" index 556461a..71fd3a1 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/03-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\211\357\274\211\346\225\260\346\215\256\346\265\201\346\223\215\344\275\234\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232STRSVR\343\200\201STR2STR\343\200\201RTKCONV\343\200\201CONVBIN.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/03-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\211\357\274\211\346\225\260\346\215\256\346\265\201\346\223\215\344\275\234\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232STRSVR\343\200\201STR2STR\343\200\201RTKCONV\343\200\201CONVBIN.md" @@ -1,4 +1,4 @@ -> 原始 Markdown文档、Visio流程图、XMind思维导图见:https://github.com/LiZhengXiao99/Navigation-Learning + [TOC] diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/04-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\233\233\357\274\211\345\256\236\346\227\266\345\256\232\344\275\215\350\247\243\347\256\227\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232RTKNAVI\343\200\201RTKRCV.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/04-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\233\233\357\274\211\345\256\236\346\227\266\345\256\232\344\275\215\350\247\243\347\256\227\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232RTKNAVI\343\200\201RTKRCV.md" index 0f8aec8..85827ae 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/04-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\233\233\357\274\211\345\256\236\346\227\266\345\256\232\344\275\215\350\247\243\347\256\227\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232RTKNAVI\343\200\201RTKRCV.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/04-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\233\233\357\274\211\345\256\236\346\227\266\345\256\232\344\275\215\350\247\243\347\256\227\347\250\213\345\272\217\344\275\277\347\224\250\345\222\214\346\272\220\347\240\201\350\247\243\346\236\220\357\274\232RTKNAVI\343\200\201RTKRCV.md" @@ -1,21 +1,12 @@ -> 原始 Markdown文档、Visio流程图、XMind思维导图见:https://github.com/LiZhengXiao99/Navigation-Learning - [TOC] -## 一、 - - - -RTKRCV - - - -### 如何学着写实时定位解算程序? +## 一、如何学着写实时定位解算程序? -* RTKLIB 提供了界面程序 RTKNAVI、和命令行程序 RTKRCV 两个可以进行实时定位解算的程序;建议在看源码前,先学学这两个程序的使用先对实时定位解算有一些认识。 -* +* RTKLIB 提供了界面程序 RTKNAVI、和命令行程序 RTKRCV 两个可以进行实时定位解算的程序;建议在看源码前,先学学这两个程序的使用先对实时定位解算有一些认识。没用过程序,直接看代码很可能是一头雾水;比如你没用过板卡,很难想明白为什么要向数据源发命令;没用过 Cors 差分服务,很难理解为啥要向数据源发伪距单点定位解。 * 实时定位解算主要需要关注以下几方面: * 数据怎么读进来?如何将数据流中的数据存到内存中? - * 读进来的数据以什么形式组织?存到了哪些变量里?解算过的数据要不要丢弃? - * + * 读进来的数据以什么形式组织?存到了哪些变量里? + * 如果接受到数据存在缺失,应该如何处理? + * 解算过的数据要不要丢弃?之前历元的哪些数据需要保留? + * 解算结果用什么格式?怎么输出? diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/05-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\272\224\357\274\211\345\237\272\347\241\200\345\256\232\344\271\211\357\274\232\347\237\251\351\230\265\350\256\241\347\256\227\343\200\201\345\217\202\346\225\260\344\274\260\350\256\241\343\200\201\346\227\266\351\227\264\347\263\273\347\273\237\343\200\201\345\235\220\346\240\207\347\263\273\347\273\237\343\200\201\345\215\253\346\230\237\347\263\273\347\273\237\344\270\216\350\247\202\346\265\213\345\200\274\347\232\204\350\241\250\347\244\272.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/05-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\272\224\357\274\211\345\237\272\347\241\200\345\256\232\344\271\211\357\274\232\347\237\251\351\230\265\350\256\241\347\256\227\343\200\201\345\217\202\346\225\260\344\274\260\350\256\241\343\200\201\346\227\266\351\227\264\347\263\273\347\273\237\343\200\201\345\235\220\346\240\207\347\263\273\347\273\237\343\200\201\345\215\253\346\230\237\347\263\273\347\273\237\344\270\216\350\247\202\346\265\213\345\200\274\347\232\204\350\241\250\347\244\272.md" index a7884bc..69a5b11 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/05-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\272\224\357\274\211\345\237\272\347\241\200\345\256\232\344\271\211\357\274\232\347\237\251\351\230\265\350\256\241\347\256\227\343\200\201\345\217\202\346\225\260\344\274\260\350\256\241\343\200\201\346\227\266\351\227\264\347\263\273\347\273\237\343\200\201\345\235\220\346\240\207\347\263\273\347\273\237\343\200\201\345\215\253\346\230\237\347\263\273\347\273\237\344\270\216\350\247\202\346\265\213\345\200\274\347\232\204\350\241\250\347\244\272.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/05-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\272\224\357\274\211\345\237\272\347\241\200\345\256\232\344\271\211\357\274\232\347\237\251\351\230\265\350\256\241\347\256\227\343\200\201\345\217\202\346\225\260\344\274\260\350\256\241\343\200\201\346\227\266\351\227\264\347\263\273\347\273\237\343\200\201\345\235\220\346\240\207\347\263\273\347\273\237\343\200\201\345\215\253\346\230\237\347\263\273\347\273\237\344\270\216\350\247\202\346\265\213\345\200\274\347\232\204\350\241\250\347\244\272.md" @@ -1,11 +1,7 @@ -> 原始 Markdown文档、Visio流程图、XMind思维导图见:https://github.com/LiZhengXiao99/Navigation-Learning - 本篇介绍 RTKLIB 最最最基础的知识,时间系统、坐标系统、卫星系统、卫星、观测值定义。我用 RTKLIB 作为第三方库,这些东西频繁使用。 [TOC] - - ## 一、矩阵和向量计算 GNSS 处理的数据都是矩阵数据,RTKLIB 的 **rtkcmn.c** 中写了一些矩阵运算的函数。 @@ -277,8 +273,6 @@ RTKLIB 里的矩阵一般都是 double 类型的一数组,列优先顺序, ``` - - ## 二、最小二乘与Kalman滤波 1. **lsq()**:最小二乘估计 @@ -1103,7 +1097,6 @@ static double leaps[MAXLEAPS+1][7]={ /* leap seconds (y,m,d,h,m,s,utc-gpst) */ } ``` - ## 四、坐标系统 @@ -1466,12 +1459,11 @@ static double leaps[MAXLEAPS+1][7]={ /* leap seconds (y,m,d,h,m,s,utc-gpst) */ trace(5,"gmst=%.12f gast=%.12f\n",gmst_,gast); trace(5,"P=\n"); tracemat(5,P,3,3,15,12); trace(5,"N=\n"); tracemat(5,N,3,3,15,12); - trace(5,"W=\n"); tracemat(5,W,3,3,15,12); + trace(5,"W=\n"); tracemat(5,,3,3,15,12); trace(5,"U=\n"); tracemat(5,U,3,3,15,12); } ``` - ## 五、卫星系统与观测值的表示 diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/07-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\203\357\274\211\345\257\274\350\210\252\347\224\265\346\226\207\343\200\201\346\230\237\345\216\206\346\225\260\346\215\256\350\257\273\345\217\226\343\200\201\345\215\253\346\230\237\344\275\215\347\275\256\351\222\237\345\267\256\350\256\241\347\256\227.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/07-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\203\357\274\211\345\257\274\350\210\252\347\224\265\346\226\207\343\200\201\346\230\237\345\216\206\346\225\260\346\215\256\350\257\273\345\217\226\343\200\201\345\215\253\346\230\237\344\275\215\347\275\256\351\222\237\345\267\256\350\256\241\347\256\227.md" index 0fe66b4..8191a25 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/07-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\203\357\274\211\345\257\274\350\210\252\347\224\265\346\226\207\343\200\201\346\230\237\345\216\206\346\225\260\346\215\256\350\257\273\345\217\226\343\200\201\345\215\253\346\230\237\344\275\215\347\275\256\351\222\237\345\267\256\350\256\241\347\256\227.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/07-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\270\203\357\274\211\345\257\274\350\210\252\347\224\265\346\226\207\343\200\201\346\230\237\345\216\206\346\225\260\346\215\256\350\257\273\345\217\226\343\200\201\345\215\253\346\230\237\344\275\215\347\275\256\351\222\237\345\267\256\350\256\241\347\256\227.md" @@ -1,5 +1,3 @@ -> 原始 Markdown文档、Visio流程图、XMind思维导图见:https://github.com/LiZhengXiao99/Navigation-Learning - [TOC] ## 一、导航电文 diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/08-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\205\253\357\274\211\351\205\215\347\275\256\351\200\211\351\241\271\350\257\273\345\217\226\343\200\201Trace \350\276\223\345\207\272\343\200\201\347\273\223\346\236\234\350\276\223\345\207\272.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/08-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\205\253\357\274\211\351\205\215\347\275\256\351\200\211\351\241\271\350\257\273\345\217\226\343\200\201Trace \350\276\223\345\207\272\343\200\201\347\273\223\346\236\234\350\276\223\345\207\272.md" index f6422b9..114377c 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/08-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\205\253\357\274\211\351\205\215\347\275\256\351\200\211\351\241\271\350\257\273\345\217\226\343\200\201Trace \350\276\223\345\207\272\343\200\201\347\273\223\346\236\234\350\276\223\345\207\272.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/08-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\205\253\357\274\211\351\205\215\347\275\256\351\200\211\351\241\271\350\257\273\345\217\226\343\200\201Trace \350\276\223\345\207\272\343\200\201\347\273\223\346\236\234\350\276\223\345\207\272.md" @@ -1,1676 +1,18 @@ -> 原始 Markdown文档、Visio流程图、XMind思维导图见:https://github.com/LiZhengXiao99/Navigation-Learning - [TOC] -## 一、后处理执行流程 - -### 1、 - - - -### 2、postpos() - - - -#### 1. 功能 - -后处理定位的主入口函数,根据 tu 拆分计算时间段,调用调用`execses_b()`进行下一步解算。输入文件包括观测文件、导航文件、精密星历文件等,postpos在处理输入文件时有两种方法,一种是输入文件可以只包含替换,然后通过函数`reppath()`处理,将关键词用时间、基准站编号、流动站编号等代替,另一种是直接调用输入文件的文件名,postpos主要是来判断是哪一种输入方式,然后调用相应函数。 - -#### 2. 输入参数 - -```c -gtime_t ts I 处理的起始时间,写0表示不限制 -gtime_t te I 处理的起始时间,写0表示不限制 -double ti I 处理的间隔时间 (s),写0表示不限制,全处理 -double tu I 处理的单元时间(s),写0表示全部做一个单元处理 -prcopt_t *popt I 处理选项结构体 -solopt_t *sopt I 结果选项结构体 -filopt_t *fopt I 文件选项结构体 -char **infile I 传入文件路径数组首地址 -int n I 传入文件数量 -char *outfile I 输出文件的路径,写0表示stdout终端 -char *rov I 流动站ID列表,空格隔开 -char *base I 基准站ID列表,空格隔开 -``` - -#### 3. 返回值 - -* 处理一切正常会接收 execxes_b() 的返回值,失败返回 0,内存失败返回-1 -* execses_b() 正常会接收 execses_b() 的返回值,失败返回 0 -* execses_r() 正常会接收 execses() 的返回值,失败返回 0,aborts 返回 1 - -#### 4. 执行流程 - -1. 变量定义,`stat`默认为0,`flag`默认为1。 - -2. 调用`openses()`,开始解算进程,读取天线、大地水准面文件。 - -3. 判断起始解算时间`ts`、结束解算时间`te`、解算时间单元`tu`,有三种情况: - - > * 为何要判断:拆分时间段解算需要tu值有效、调用reppath需要ts有效,调用reppaths需要ts和te有效。 - > * ifile[]、ofile[]作用:infile[]、ofile[]里的路径替换处理后存到ifile[]、ofile[],传入`execses_b()`进行之后的解算。 - > * index[]的作用:会传给`execses_b()`,再传给`execses_r()`,再传给`execses()`,再传给`readobsnav() `。如果不需要根据tu分时间段解算,index存的就是0~n,如果需要分时间段解算,index存的是对应时间段内文件的下标。 - - ①:**若`ts`、`te`不为0,`tu`大于等于0**: - - * 判断`te`早于`ts`,return - - * 为`ifile[]`数组空间 - - * 处理解算时间单元`tu`,0或者时间大于100天,设为100天 - - * 循环处理每个时间单元`tts`到`tte`: - - * 计算解算时间单元的开始`tts`、结束`tte`,判断`ttste`设为`te` - - * 流动站、基准站名赋空值 - - * 遍历遍历infile[],`strrchr`找文件后缀名,`strcmp`判断后缀名 : - - * rtcm3:直接把`infile[j]`中路径赋值到`ifile[]`中 - * 星历文件:精密星历`ttte=tte+一小时`、广播星历`ttte=tte+两小时`,根据`tts`、`ttte`调用`reppaths()`将infile[j]中路径展开到`ifile[nf]`中。 - - 之后把`infile[]`的下标`j`存到`index[]`中。 - - * 调用`reppath()`替换`outfile`的替换符,存到ofile中。 - - * 调用`execses_b()`进行下一步解算。 - - ②:**若`ts`不为0,`tu`为0或小于0** :就不考虑`te`、和`tu` - - * 为`ifile[]`开辟空间,循环替换`infile[i]`的替换符到`ifile[i]`中。 - * 调用`reppath`替换outfile的替换符,存到ofile中。 - * 调用`execses_b()`进行下一步解算。 - - ③:**若`ts`为0**:直接把把`infile[]`的下标`j`存到`index[]`中,调用`execses_b` 进行下一步解算 - -4. 调用`closeses()`,释放`openses()`开辟的内存。 - -```c -extern int postpos(gtime_t ts, gtime_t te, double ti, double tu, - const prcopt_t *popt, const solopt_t *sopt, - const filopt_t *fopt, char **infile, int n, char *outfile, - const char *rov, const char *base) -{ - gtime_t tts, //解算单元的开始时间 - tte, //解算单元的结束时间 - ttte; //读取星历文件的结束时间 - double tunit, // - tss; // - int i,j,k, //循环和数组下标控制 - nf, //文件路径数组下标控制 - stat=0, //接收返回状态值,为1 - week, //用于存GPST的周 - flag=1, - index[MAXINFILE]={0}; - char *ifile[MAXINFILE], - ofile[1024], - *ext; - - trace(3,"postpos : ti=%.0f tu=%.0f n=%d outfile=%s\n",ti,tu,n,outfile); - - /* open processing session */ //开始处理,文件读取,赋值navs、pcvs、pcvsr - if (!openses(popt,sopt,fopt,&navs,&pcvss,&pcvsr)) return -1; - - if (ts.time!=0&&te.time!=0&&tu>=0.0) { //判断起始时间ts、te、处理单位时间是否大于0 - if (timediff(te,ts)<0.0) { //结束时间早于开始时间 - showmsg("error : no period"); - closeses(&navs,&pcvss,&pcvsr); //不合理则关闭处理,释放navs、pcvs、pcvsr - return 0; - } - for (i=0;i=0;i--) free(ifile[i]); //开辟失败则释放已开辟的空间,关闭处理释放navs、pcvs、pcvsr - closeses(&navs,&pcvss,&pcvsr); - return -1; - } - } - if (tu==0.0||tu>86400.0*MAXPRCDAYS) tu=86400.0*MAXPRCDAYS; //解算处理时间单元处理,0或者时间大于100天,设为100天 - settspan(ts,te); //设置时间跨度,好像是空函数,需要自己实现 - - tunit=tu<86400.0?tu:86400.0; //tunit:如果tu小于一天就为tu;否则为一天 - tss=tunit*(int)floor(time2gpst(ts,&week)/tunit); // - - //根据解算时间单元,分时间段循环处理,算出来tts>te或过程有错误,结束循环 - //很多时候解算单元时间直接设0.0,只循环一次,tts=ts,tte=te - for (i=0;;i++) { /* for each periods */ - tts=gpst2time(week,tss+i*tu); //解算单元开始时间,每次循环加上一个i个tu? - tte=timeadd(tts,tu-DTTOL); //解算结束时间tte=tu-DTTOL - if (timediff(tts,te)>0.0) break; //算出来tts>te结束循环 - if (timediff(tts,ts)<0.0) tts=ts; //分时间段后tts若早于ts,设为ts - if (timediff(tte,te)>0.0) tte=te; //分时间段后tte若早于te,设为te - - strcpy(proc_rov ,""); //流动站、基准站值赋空 - strcpy(proc_base,""); - if (checkbrk("reading : %s",time_str(tts,0))) { - stat=1; - break; - } - for (j=k=nf=0;j=MAXINFILE) { - trace(2,"too many input files. trancated\n"); - break; - } - } - if (!reppath(outfile,ofile,tts,"","")&&i>0) flag=0; - - /* execute processing session */ - stat=execses_b(tts,tte,ti,popt,sopt,fopt,flag,ifile,index,nf,ofile, - rov,base); - - if (stat==1) break; - } - - for (i=0;i=0;i--) free(ifile[i]); - return -1; - } - reppath(infile[i],ifile[i],ts,"",""); - index[i]=i; - } - reppath(outfile,ofile,ts,"",""); - - /* execute processing session */ - stat=execses_b(ts,te,ti,popt,sopt,fopt,1,ifile,index,n,ofile,rov, - base); - - for (i=0;isatantp&&!(readpcv(fopt->satantp,pcvs))) { - showmsg("error : no sat ant pcv in %s",fopt->satantp); - trace(1,"sat antenna pcv read error: %s\n",fopt->satantp); - return 0; - } - /* read receiver antenna parameters */ - if (*fopt->rcvantp&&!(readpcv(fopt->rcvantp,pcvr))) { - showmsg("error : no rec ant pcv in %s",fopt->rcvantp); - trace(1,"rec antenna pcv read error: %s\n",fopt->rcvantp); - return 0; - } - /* open geoid data */ - if (sopt->geoid>0&&*fopt->geoid) { - if (!opengeoid(sopt->geoid,fopt->geoid)) { - showmsg("error : no geoid data %s",fopt->geoid); - trace(2,"no geoid data %s\n",fopt->geoid); - } - } - return 1; - } - ``` - - - -* **closeses()**:结束解算程序,释放天线、geoid、erp、trace、fp_stat 。会调用closegeoid() 、rtkclosestat() 、traceclose() 。 - - ```c - static void closeses(nav_t *nav, pcvs_t *pcvs, pcvs_t *pcvr) - { - trace(3,"closeses:\n"); - - /* free antenna parameters */ - free(pcvs->pcv); pcvs->pcv=NULL; pcvs->n=pcvs->nmax=0; - free(pcvr->pcv); pcvr->pcv=NULL; pcvr->n=pcvr->nmax=0; - - /* close geoid data */ - closegeoid(); - - /* free erp data */ - free(nav->erp.data); nav->erp.data=NULL; nav->erp.n=nav->erp.nmax=0; - - /* close solution statistics and debug trace */ - rtkclosestat(); - traceclose(); - } - ``` - - - -* **reppaths()**:根据ts、te分时间段,循环调用reppath(),替换path[]中的替换符,存到repath[]中,返回文件数量 - - **reppath()**:如果输入文件(file)中,含有替换符,则 reppath函数的目的就是将文件名中的替换符调用repstr() 进行替换,保存到rpath中 。替换符如下: - - > reppaths()需要ts和te、而reppath只用ts - - ```c - %Y -> yyyy : year (4 digits) (1900-2099) - %y -> yy : year (2 digits) (00-99) - %m -> mm : month (01-12) - %d -> dd : day of month (01-31) - %h -> hh : hours (00-23) - %M -> mm : minutes (00-59) - %S -> ss : seconds (00-59) - %n -> ddd : day of year (001-366) - %W -> wwww : gps week (0001-9999) - %D -> d : day of gps week (0-6) - %H -> h : hour code (a=0,b=1,c=2,...,x=23) - %ha-> hh : 3 hours (00,03,06,...,21) - %hb-> hh : 6 hours (00,06,12,18) - %hc-> hh : 12 hours (00,12) - %t -> mm : 15 minutes (00,15,30,45) - %r -> rrrr : rover id - %b -> bbbb : base station id - ``` - - ```c - extern int reppath(const char *path, char *rpath, gtime_t time, const char *rov, - const char *base) - { - double ep[6],ep0[6]={2000,1,1,0,0,0}; - int week,dow,doy,stat=0; - char rep[64]; - - strcpy(rpath,path); - - if (!strstr(rpath,"%")) return 0; //找不到%号直接结束 - if (*rov ) stat|=repstr(rpath,"%r",rov ); //如果有,替换基准站、流动站名 - if (*base) stat|=repstr(rpath,"%b",base); - if (time.time!=0) { - //把时间从gtime_t转为ep数组、DOW、DOY - time2epoch(time,ep); - ep0[0]=ep[0]; - dow=(int)floor(time2gpst(time,&week)/86400.0); - doy=(int)floor(timediff(time,epoch2time(ep0))/86400.0)+1; - //把要替换的内容存到rep中,再用rep替换 - sprintf(rep,"%02d", ((int)ep[3]/3)*3); stat|=repstr(rpath,"%ha",rep); - sprintf(rep,"%02d", ((int)ep[3]/6)*6); stat|=repstr(rpath,"%hb",rep); - sprintf(rep,"%02d", ((int)ep[3]/12)*12); stat|=repstr(rpath,"%hc",rep); - sprintf(rep,"%04.0f",ep[0]); stat|=repstr(rpath,"%Y",rep); - sprintf(rep,"%02.0f",fmod(ep[0],100.0)); stat|=repstr(rpath,"%y",rep); - sprintf(rep,"%02.0f",ep[1]); stat|=repstr(rpath,"%m",rep); - sprintf(rep,"%02.0f",ep[2]); stat|=repstr(rpath,"%d",rep); - sprintf(rep,"%02.0f",ep[3]); stat|=repstr(rpath,"%h",rep); - sprintf(rep,"%02.0f",ep[4]); stat|=repstr(rpath,"%M",rep); - sprintf(rep,"%02.0f",floor(ep[5])); stat|=repstr(rpath,"%S",rep); - sprintf(rep,"%03d", doy); stat|=repstr(rpath,"%n",rep); - sprintf(rep,"%04d", week); stat|=repstr(rpath,"%W",rep); - sprintf(rep,"%d", dow); stat|=repstr(rpath,"%D",rep); - sprintf(rep,"%c", 'a'+(int)ep[3]); stat|=repstr(rpath,"%H",rep); - sprintf(rep,"%02d", ((int)ep[4]/15)*15); stat|=repstr(rpath,"%t",rep); - } - else if (strstr(rpath,"%ha")||strstr(rpath,"%hb")||strstr(rpath,"%hc")|| - strstr(rpath,"%Y" )||strstr(rpath,"%y" )||strstr(rpath,"%m" )|| - strstr(rpath,"%d" )||strstr(rpath,"%h" )||strstr(rpath,"%M" )|| - strstr(rpath,"%S" )||strstr(rpath,"%n" )||strstr(rpath,"%W" )|| - strstr(rpath,"%D" )||strstr(rpath,"%H" )||strstr(rpath,"%t" )) { - return -1; /* no valid time */ - } - return stat; - } - ``` - - ```c - extern int reppaths(const char *path, char *rpath[], int nmax, gtime_t ts, - gtime_t te, const char *rov, const char *base) - { - gtime_t time; - double tow,tint=86400.0; - int i,n=0,week; - - trace(3,"reppaths: path =%s nmax=%d rov=%s base=%s\n",path,nmax,rov,base); - - if (ts.time==0||te.time==0||timediff(ts,te)>0.0) return 0; //如果起止时间为0,或ts>te,直接return - - if (strstr(path,"%S")||strstr(path,"%M")||strstr(path,"%t")) tint=900.0; //15分钟 - else if (strstr(path,"%h")||strstr(path,"%H")) tint=3600.0; //一小时 - - tow=time2gpst(ts,&week); - time=gpst2time(week,floor(tow/tint)*tint); - - while (timediff(time,te)<=0.0&&ntrace>0) { - if (*outfile) { - strcpy(tracefile,outfile); - strcat(tracefile,".trace"); - } - else { - strcpy(tracefile,fopt->trace); - } - traceclose(); - traceopen(tracefile); - tracelevel(sopt->trace); - } - ``` - - ```c - if (flag&&sopt->sstat>0) { - strcpy(statfile,outfile); - strcat(statfile,".stat"); - rtkclosestat(); - rtkopenstat(statfile,sopt->sstat); - } - /* write header to output file */ //写输出结果文件的文件头 - if (flag&&!outhead(outfile,infile,n,&popt_,sopt)) { - freeobsnav(&obss,&navs); - return 0; - } - ``` - - - -#### 3. 执行流程 - -1. 调用`readpreceph()`读取精密星历和SBAS数据。 -2. 遍历`infile[]`,寻找基准站替换符%b: - * 找不到基准站ID的替换符,直接调用`execses_r()`进行下一步解算 。 - * 找到了`infile[i]`含有基准站ID的替换符,遍历基准站: - * 将基准站ID赋值给`proc_base`。 - * 循环替换`infile[i]`里的基准站ID的替换符到`ifile[i] `。 - * 替换`outfile`里的基准站ID替换符到ofile。 - * 调用`execses_r()`进行下一步解算 。 -3. 调用`freepreceph()`,释放`readpreceph()`开辟的空间。 - -```c -static int execses_b(gtime_t ts, gtime_t te, double ti, const prcopt_t *popt, - const solopt_t *sopt, const filopt_t *fopt, int flag, - char **infile, const int *index, int n, char *outfile, - const char *rov, const char *base) -{ - gtime_t t0={0}; - int i,stat=0; - char *ifile[MAXINFILE],ofile[1024], *base_,*p,*q,s[64]; - - trace(3,"execses_b: n=%d outfile=%s\n",n,outfile); - - /* read prec ephemeris and sbas data */ - readpreceph(infile,n,popt,&navs,&sbss); //读取精密星历和SBAS数据 - - //%b:基准站ID的替换符 - for (i=0;i=0;i--) free(ifile[i]); - freepreceph(&navs,&sbss); - return 0; - } - } - //遍历base_基准站字符串 - for (p=base_;;p=q+1) { /* for each base station */ - if ((q=strchr(p,' '))) *q='\0'; //拆出一个基准站 - - if (*p) { - strcpy(proc_base,p); //把基准站名赋值给proc_base - if (ts.time) time2str(ts,s,0); else *s='\0'; - if (checkbrk("reading : %s",s)) { - stat=1; - break; - } - //循环替换infile[i]里的基准站ID的替换符到ifile[i] - for (i=0;i=0;i--) free(ifile[i]); - return 0; - } - } - for (p=rov_;;p=q+1) { /* for each rover */ - if ((q=strchr(p,' '))) *q='\0'; - - if (*p) { - strcpy(proc_rov,p); - if (ts.time) time2str(ts,s,0); else *s='\0'; - if (checkbrk("reading : %s",s)) { - stat=1; - break; - } - for (i=0;ine=nav->nemax=0; - nav->nc=nav->ncmax=0; - sbs->n =sbs->nmax =0; - - /* read precise ephemeris files */ //读精密星历sp3 - for (i=0;isbassatsel,sbs); - } - /* allocate sbas ephemeris */ //为nav->seph开辟空间 - nav->ns=nav->nsmax=NSATSBS*2; - if (!(nav->seph=(seph_t *)malloc(sizeof(seph_t)*nav->ns))) { - showmsg("error : sbas ephem memory allocation"); - trace(1,"error : sbas ephem memory allocation"); - return; - } - for (i=0;ins;i++) nav->seph[i]=seph0; - - /* set rtcm file and initialize rtcm struct */ - rtcm_file[0]=rtcm_path[0]='\0'; fp_rtcm=NULL; - - //遍历ifile,将后缀为RTCM3的路径赋值到rtcm_file,初始化rtcm控制结构体 - for (i=0;i 前向滤波和后向滤波调用procpos函数传参相同,两者区别在于procpos函数内会调用inputobs函数,针对不同的滤波解算类型,inputobs函数内读取文件数据的顺序不同。 - > - > revs:0:forward;1:backward - > - > iobsu:当前流动站观测数据下标 - > - > iobsr:当前参考站观测数据下标 - > - > isbs:当前sbas数据下标 - - * forward 前向滤波:iobsu=iobsr=isbs=revs 0,直接调用`procpos()`。 - * backward 后向滤波:res=1,iobsu=iobsr=obss.n-1 ,isbs=sbss.n-1 ,再调用`procpos()`。 - * combined :先算前向滤波的结果,设置revs、iobsu、iobsr、isbs值之后再算后向滤波的结果,最后调用combress()结合。 - -13. 调用`freeobsnav()`释放obs->data 、nav->eph 、nav->geph 、nav->seph - -```c -static int execses(gtime_t ts, gtime_t te, double ti, const prcopt_t *popt, - const solopt_t *sopt, const filopt_t *fopt, int flag, - char **infile, const int *index, int n, char *outfile) -{ - FILE *fp; - prcopt_t popt_=*popt; - char tracefile[1024],statfile[1024],path[1024],*ext; - - trace(3,"execses : n=%d outfile=%s\n",n,outfile); - - /* open debug trace */ //打开trace文件,并设置trace等级 - if (flag&&sopt->trace>0) { - if (*outfile) { - strcpy(tracefile,outfile); - strcat(tracefile,".trace"); - } - else { - strcpy(tracefile,fopt->trace); - } - traceclose(); - traceopen(tracefile); - tracelevel(sopt->trace); - } - /* read ionosphere data file */ //读取电离层TEC文件 - if (*fopt->iono&&(ext=strrchr(fopt->iono,'.'))) { - if (strlen(ext)==4&&(ext[3]=='i'||ext[3]=='I')) { - reppath(fopt->iono,path,ts,"",""); - readtec(path,&navs,1); //TEC:Total electronic content 总电子含量 - } - } - /* read erp data */ //读取地球自转参数ERP文件 - if (*fopt->eop) { - free(navs.erp.data); navs.erp.data=NULL; navs.erp.n=navs.erp.nmax=0; - reppath(fopt->eop,path,ts,"",""); - if (!readerp(path,&navs.erp)) { - showmsg("error : no erp data %s",path); - trace(2,"no erp data %s\n",path); - } - } - /* read obs and nav data */ //读取OBS和NAV文件 - if (!readobsnav(ts,te,ti,infile,index,n,&popt_,&obss,&navs,stas)) return 0; - - /* read dcb parameters */ //读取差分码偏差DCB参数,一种硬件误差 - if (*fopt->dcb) { - reppath(fopt->dcb,path,ts,"",""); - readdcb(path,&navs,stas); - } - /* set antenna paramters */ //读取天线参数,PCV:天线相位中心变化 - if (popt_.mode!=PMODE_SINGLE) { - setpcv(obss.n>0?obss.data[0].time:timeget(),&popt_,&navs,&pcvss,&pcvsr, - stas); - } - /* read ocean tide loading parameters */ //读取潮汐参数 - if (popt_.mode>PMODE_SINGLE&&*fopt->blq) { - readotl(&popt_,fopt->blq,stas); - } - /* rover/reference fixed position */ //FIXED模式,调用antpos()得到流动站坐标 - if (popt_.mode==PMODE_FIXED) { - if (!antpos(&popt_,1,&obss,&navs,stas,fopt->stapos)) { - freeobsnav(&obss,&navs); - return 0; - } - } - else if (PMODE_DGPS<=popt_.mode&&popt_.mode<=PMODE_STATIC) { //DGPS、KINEMA、STATIC模式,调用antpos()得到基准站坐标 - if (!antpos(&popt_,2,&obss,&navs,stas,fopt->stapos)) { - freeobsnav(&obss,&navs); - return 0; - } - } - /* open solution statistics */ //打开结果统计文件 - if (flag&&sopt->sstat>0) { - strcpy(statfile,outfile); - strcat(statfile,".stat"); - rtkclosestat(); - rtkopenstat(statfile,sopt->sstat); - } - /* write header to output file */ //写输出结果文件的文件头 - if (flag&&!outhead(outfile,infile,n,&popt_,sopt)) { - freeobsnav(&obss,&navs); - return 0; - } - iobsu=iobsr=isbs=revs=aborts=0; - - if (popt_.mode==PMODE_SINGLE||popt_.soltype==0) { - if ((fp=openfile(outfile))) { - procpos(fp,&popt_,sopt,0); /* forward */ //前向滤波 - fclose(fp); - } - } - else if (popt_.soltype==1) { - if ((fp=openfile(outfile))) { - revs=1; iobsu=iobsr=obss.n-1; isbs=sbss.n-1; - procpos(fp,&popt_,sopt,0); /* backward */ //后向滤波 - fclose(fp); - } - } - else { /* combined */ - //开辟内存空间 - solf=(sol_t *)malloc(sizeof(sol_t)*nepoch); //前向结果 - solb=(sol_t *)malloc(sizeof(sol_t)*nepoch); //后向结果 - rbf=(double *)malloc(sizeof(double)*nepoch*3); //前向基准站坐标 - rbb=(double *)malloc(sizeof(double)*nepoch*3); //后向基准站坐标 - - if (solf&&solb) { //判断内存开辟成功 - isolf=isolb=0; - procpos(NULL,&popt_,sopt,1); /* forward */ //前向滤波 - revs=1; iobsu=iobsr=obss.n-1; isbs=sbss.n-1; - procpos(NULL,&popt_,sopt,1); /* backward */ //后向滤波 - - //虽然前向滤波和后向滤波调用procpos函数的源代码相同(如下所示), - //但是两者最主要的一个区别就是由于procpos函数内会调用inputobs函数, - //然而针对不同的滤波解算类型,inputobs函数内读取文件数据的顺序不同 - /* combine forward/backward solutions */ - if (!aborts&&(fp=openfile(outfile))) { - combres(fp,&popt_,sopt); - fclose(fp); - } - } - else showmsg("error : memory allocation"); - free(solf); - free(solb); - free(rbf); - free(rbb); - } - /* free obs and nav data */ - freeobsnav(&obss,&navs); - - return aborts?1:0; -} -``` - -#### 4. 调用的函数 - -* **antpos()**:得到坐标,参2`rcvno`传1得到流动站坐标,传0得到基准站坐标 - - * postype=POSOPT_SINGLE :调用`avepos()`利用基准站的观测文件计算其SPP定位结果作为基准站的坐标 。 - - * postype=POSOPT_FILE :调用`getstapos()`从pos文件读取基准站坐标 。 - - * postype=POSOPT_RINEX :从rinex头文件中获取测站经过相位中心改正的位置数据。头文件中的测站数据经过读取后已存到stas中。 - - ```c - static sta_t stas[MAXRCV]; /* station infomation */ - ``` - - ```c - typedef struct { /* station parameter type */ - char name [MAXANT]; /* marker name */ - char marker [MAXANT]; /* marker number */ - char antdes [MAXANT]; /* antenna descriptor */ - char antsno [MAXANT]; /* antenna serial number */ - char rectype[MAXANT]; /* receiver type descriptor */ - char recver [MAXANT]; /* receiver firmware version */ - char recsno [MAXANT]; /* receiver serial number */ - int antsetup; /* antenna setup id */ - int itrf; /* ITRF realization year */ - int deltype; /* antenna delta type (0:enu,1:xyz) */ - double pos[3]; /* station position (ecef) (m) */ - double del[3]; /* antenna position delta (e/n/u or x/y/z) (m) */ - double hgt; /* antenna height (m) */ - int glo_cp_align; /* GLONASS code-phase alignment (0:no,1:yes) */ - double glo_cp_bias[4]; /* GLONASS code-phase biases {1C,1P,2C,2P} (m) */ - } sta_t; - ``` - - ```c - static int antpos(prcopt_t *opt, int rcvno, const obs_t *obs, const nav_t *nav, - const sta_t *sta, const char *posfile) - { - double *rr=rcvno==1?opt->ru:opt->rb, - del[3],pos[3],dr[3]={0}; - int i, - postype=rcvno==1?opt->rovpos:opt->refpos; - char *name; - - trace(3,"antpos : rcvno=%d\n",rcvno); - - if (postype==POSOPT_SINGLE) { /* average of single position */ //利用基准站的观测文件计算其SPP定位结果作为基准站的坐标 - if (!avepos(rr,rcvno,obs,nav,opt)) { - showmsg("error : station pos computation"); - return 0; - } - } - else if (postype==POSOPT_FILE) { /* read from position file */ //从pos文件读取基准站坐标 - name=stas[rcvno==1?0:1].name; - if (!getstapos(posfile,name,rr)) { - showmsg("error : no position of %s in %s",name,posfile); - return 0; - } - } - else if (postype==POSOPT_RINEX) { /* get from rinex header */ //从基准站的OBS观测文件的文件头部分读取基准站坐标 - if (norm(stas[rcvno==1?0:1].pos,3)<=0.0) { //如果没有坐标数据,报错 - showmsg("error : no position in rinex header"); - trace(1,"no position position in rinex header\n"); - return 0; - } - //天线相位中心偏差改正 - /* antenna delta */ - if (stas[rcvno==1?0:1].deltype==0) { /* enu */ - for (i=0;i<3;i++) del[i]=stas[rcvno==1?0:1].del[i]; - del[2]+=stas[rcvno==1?0:1].hgt; - ecef2pos(stas[rcvno==1?0:1].pos,pos); - enu2ecef(pos,del,dr); - } - else { /* xyz */ - for (i=0;i<3;i++) dr[i]=stas[rcvno==1?0:1].del[i]; - } - for (i=0;i<3;i++) rr[i]=stas[rcvno==1?0:1].pos[i]+dr[i]; - } - return 1; - } - ``` - -* **avepos()**:通过nav和多个obs单点定位计算位置,存到ra[]中 - - ```c - static int avepos(double *ra, int rcv, const obs_t *obs, const nav_t *nav, - const prcopt_t *opt) - { - obsd_t data[MAXOBS]; - gtime_t ts={0}; - sol_t sol={{0}}; - int i,j,n=0,m,iobs; - char msg[128]; - - trace(3,"avepos: rcv=%d obs.n=%d\n",rcv,obs->n); - - for (i=0;i<3;i++) ra[i]=0.0; - - //遍历obs - for (iobs=0;(m=nextobsf(obs,&iobs,rcv))>0;iobs+=m) { - - for (i=j=0;idata[iobs+i]; - if ((satsys(data[j].sat,NULL)&opt->navsys)&& - opt->exsats[data[j].sat-1]!=1) j++; - } - if (j<=0||!screent(data[0].time,ts,ts,1.0)) continue; /* only 1 hz */ - - //单点定位,结果存到sol,再加到ra[] - if (!pntpos(data,j,nav,opt,&sol,NULL,NULL,msg)) continue; - for (i=0;i<3;i++) ra[i]+=sol.rr[i]; - n++; - } - if (n<=0) { - trace(1,"no average of base station position\n"); - return 0; - } - for (i=0;i<3;i++) ra[i]/=n; // ra/=obs数,得到平均位置 - return 1; - } - ``` - -* **getstapos()**:从pos文件读取基准站坐标 - - ```c - static int getstapos(const char *file, char *name, double *r) - { - FILE *fp; - char buff[256],sname[256],*p,*q; - double pos[3]; - - trace(3,"getstapos: file=%s name=%s\n",file,name); - - if (!(fp=fopen(file,"r"))) { //以读的方式打开file - trace(1,"station position file open error: %s\n",file); - return 0; - } - //循环读取,每次读一行数据,到\n或者256位结束 - while (fgets(buff,sizeof(buff),fp)) { - //如果在行中找到%,截断,赋值\0 - if ((p=strchr(buff,'%'))) *p='\0'; - //格式化读取,测站位置存到pos[3],测站名存到sname - if (sscanf(buff,"%lf %lf %lf %s",pos,pos+1,pos+2,sname)<4) continue; - //逐字符转大写比较name、sname - for (p=sname,q=name;*p&&*q;p++,q++) { - if (toupper((int)*p)!=toupper((int)*q)) break; - } - if (!*p) { - pos[0]*=D2R; - pos[1]*=D2R; - pos2ecef(pos,r); - fclose(fp); - return 1; - } - } - fclose(fp); - trace(1,"no station position: %s %s\n",name,file); - return 0; - } - ``` - -* **outhead()**:创建输出结果文件,写入文件头 - - ```c - static int outhead(const char *outfile, char **infile, int n, - const prcopt_t *popt, const solopt_t *sopt) - { - FILE *fp=stdout; //fp默认初始为stdout - - trace(3,"outhead: outfile=%s n=%d\n",outfile,n); - - if (*outfile) { - createdir(outfile); //递归的创建文件夹 - - if (!(fp=fopen(outfile,"wb"))) { //wb:以写的方式打开二进制文件 - showmsg("error : open output file %s",outfile); - return 0; - } - } - /* output header */ - outheader(fp,infile,n,popt,sopt); - - if (*outfile) fclose(fp); - - return 1; - } - ``` - -* **openfile()**:以追加的方式打开结果文件,返回文件描述符 - - ```c - static FILE *openfile(const char *outfile) - { - trace(3,"openfile: outfile=%s\n",outfile); - - return !*outfile?stdout:fopen(outfile,"ab"); //ab:以追加的方式打开二进制文件 - } - ``` - -* **combres()**:调用smoother()结合前后向滤波的结果 - - $Q_s=(Q_f^{-1}+Q_b^{-1})^{-1} $ $ X_s=Q_s*(Q_f^{-1}*X_f+Qb^{-1}*X_b) $ - - 执行流程: - - * 判断静态模式,处理选项和结果选项都得为静态 - * 开始大循环,i:从前到后,取前向滤波的结果 ,j:从后到前,取后向滤波的结果 ,判断前后向滤波结果的时间差 tt - * 时间差大于DTTOL ,sols、rbs取时间早的结果,另一个结果的下标不变,进行下一次循环的判断 - * 时间差很小,solution status不同,sols、rbs取solution status小的结果 - * 时间差很小,solution status相同,进行结合 - * sols取前向滤波结果 ,时间取前后向时间的平均 - * 相对定位模式,若结果为固定解,调用valcomb()检验,如果失败将fix降级为float - * 赋值前后向协方差给Qf、Qb ,调用smoother()进行前后向滤波结果结合,位置存在sols.rr[],方差存在sols.qr[] - * 同样的方式,对速度进行结合,位置存在sols.rr[],方差存在sols.qv[] - - > * 结果状态的#define: - > - > ```c - > #define SOLQ_NONE 0 /* solution status: no solution */ - > #define SOLQ_FIX 1 /* solution status: fix */ - > #define SOLQ_FLOAT 2 /* solution status: float */ - > #define SOLQ_SBAS 3 /* solution status: SBAS */ - > #define SOLQ_DGPS 4 /* solution status: DGPS/DGNSS */ - > #define SOLQ_SINGLE 5 /* solution status: single */ - > #define SOLQ_PPP 6 /* solution status: PPP */ - > #define SOLQ_DR 7 /* solution status: dead reconing */ - > #define MAXSOLQ 7 /* max number of solution status */ - > ``` - > - > * sol_t结构体: - > - > > 因为协方差矩阵是对称的,qr、qv都只用6个元素就可存协方差矩阵,但计算的时候得转成3*3矩阵才行。 - > - > ```c - > typedef struct { /* solution type */ - > gtime_t time; /* time (GPST) */ - > double rr[6]; /* position/velocity (m|m/s) */ - > /* {x,y,z,vx,vy,vz} or {e,n,u,ve,vn,vu} */ - > float qr[6]; /* position variance/covariance (m^2) */ - > /* {c_xx,c_yy,c_zz,c_xy,c_yz,c_zx} or */ - > /* {c_ee,c_nn,c_uu,c_en,c_nu,c_ue} */ - > float qv[6]; /* velocity variance/covariance (m^2/s^2) */ - > double dtr[6]; /* receiver clock bias to time systems (s) */ - > uint8_t type; /* type (0:xyz-ecef,1:enu-baseline) */ - > uint8_t stat; /* solution status (SOLQ_???) */ - > uint8_t ns; /* number of valid satellites */ - > float age; /* age of differential (s) */ - > float ratio; /* AR ratio factor for valiation */ - > float thres; /* AR ratio threshold for valiation */ - > } sol_t; - > ``` - -```c -static void combres(FILE *fp, const prcopt_t *popt, const solopt_t *sopt) -{ - gtime_t time={0}; - sol_t sols={{0}},sol={{0}}; - double tt,Qf[9],Qb[9],Qs[9],rbs[3]={0},rb[3]={0},rr_f[3],rr_b[3],rr_s[3]; - int i,j,k,solstatic,pri[]={0,1,2,3,4,5,1,6}; - - trace(3,"combres : isolf=%d isolb=%d\n",isolf,isolb); - - //判断静态模式,处理选项和结果选项都得为静态 - solstatic=sopt->solstatic&& - (popt->mode==PMODE_STATIC||popt->mode==PMODE_PPP_STATIC); - - //i:从前到后,取前向滤波的结果 - //j:从后到前,取后向滤波的结果 - for (i=0,j=isolb-1;i=0;i++,j--) { - //判断前后向滤波结果的时间差,时间差大于DTTOL, - //sols、rbs取时间早的结果,另一个结果的下标不变,进行下一次循环的判断 - if ((tt=timediff(solf[i].time,solb[j].time))<-DTTOL) { //如果前向时间迟于后向时间 - sols=solf[i]; - for (k=0;k<3;k++) rbs[k]=rbf[k+i*3]; //把前向基站坐标赋值给rbs[] - j++; //j不变 - } - else if (tt>DTTOL) { //如果前向时间早于后向时间 - sols=solb[j]; - for (k=0;k<3;k++) rbs[k]=rbb[k+j*3]; //把后向基站坐标赋值给rbs[] - i--; //i不变 - } - //时间差很小,solution status不同,sols、rbs取solution status小的结果 - else if (solf[i].statsolb[j].stat) { - sols=solb[j]; - for (k=0;k<3;k++) rbs[k]=rbb[k+j*3]; - } - //时间差很小,solution status相同 - else { - sols=solf[i]; //sols取前向滤波结果 - sols.time=timeadd(sols.time,-tt/2.0); //时间取前后向时间的平均 - //相对定位模式,若结果为固定解,调用valcomb()检验,如果失败将fix降级为float - if ((popt->mode==PMODE_KINEMA||popt->mode==PMODE_MOVEB)&& - sols.stat==SOLQ_FIX) { - /* degrade fix to float if validation failed */ - if (!valcomb(solf+i,solb+j)) sols.stat=SOLQ_FLOAT; - } - //赋值前后向协方差给Qf、Qb, - for (k=0;k<3;k++) { //k+k*3是取对角线元素 - Qf[k+k*3]=solf[i].qr[k]; - Qb[k+k*3]=solb[j].qr[k]; - } - Qf[1]=Qf[3]=solf[i].qr[3]; //赋值非对角线元素 - Qf[5]=Qf[7]=solf[i].qr[4]; - Qf[2]=Qf[6]=solf[i].qr[5]; - Qb[1]=Qb[3]=solb[j].qr[3]; - Qb[5]=Qb[7]=solb[j].qr[4]; - Qb[2]=Qb[6]=solb[j].qr[5]; - - //调用smoother()进行前后向滤波结果结合,位置存在sols.rr[],方差存在sols.qr[] - if (popt->mode==PMODE_MOVEB) { //如果是移动基线模式 - for (k=0;k<3;k++) rr_f[k]=solf[i].rr[k]-rbf[k+i*3]; //流动站坐标-基准站坐标得到基线 - for (k=0;k<3;k++) rr_b[k]=solb[j].rr[k]-rbb[k+j*3]; - if (smoother(rr_f,Qf,rr_b,Qb,3,rr_s,Qs)) continue; - for (k=0;k<3;k++) sols.rr[k]=rbs[k]+rr_s[k]; - } - else { - if (smoother(solf[i].rr,Qf,solb[j].rr,Qb,3,sols.rr,Qs)) continue; - } - sols.qr[0]=(float)Qs[0]; - sols.qr[1]=(float)Qs[4]; - sols.qr[2]=(float)Qs[8]; - sols.qr[3]=(float)Qs[1]; - sols.qr[4]=(float)Qs[5]; - sols.qr[5]=(float)Qs[2]; - - /* smoother for velocity solution */ - if (popt->dynamics) { - for (k=0;k<3;k++) { - Qf[k+k*3]=solf[i].qv[k]; - Qb[k+k*3]=solb[j].qv[k]; - } - Qf[1]=Qf[3]=solf[i].qv[3]; - Qf[5]=Qf[7]=solf[i].qv[4]; - Qf[2]=Qf[6]=solf[i].qv[5]; - Qb[1]=Qb[3]=solb[j].qv[3]; - Qb[5]=Qb[7]=solb[j].qv[4]; - Qb[2]=Qb[6]=solb[j].qv[5]; - if (smoother(solf[i].rr+3,Qf,solb[j].rr+3,Qb,3,sols.rr+3,Qs)) continue; - sols.qv[0]=(float)Qs[0]; - sols.qv[1]=(float)Qs[4]; - sols.qv[2]=(float)Qs[8]; - sols.qv[3]=(float)Qs[1]; - sols.qv[4]=(float)Qs[5]; - sols.qv[5]=(float)Qs[2]; - } - } - if (!solstatic) { - outsol(fp,&sols,rbs,sopt); - } - else if (time.time==0||pri[sols.stat]<=pri[sol.stat]) { - sol=sols; - for (k=0;k<3;k++) rb[k]=rbs[k]; - if (time.time==0||timediff(sols.time,time)<0.0) { - time=sols.time; - } - } - } - //循环处理完之后,如果是静态模式且时间存在,调用outsol()输出结果 - if (solstatic&&time.time!=0.0) { - sol.time=time; - outsol(fp,&sol,rb,sopt); - } -} -``` - -* **valcomb()**:判断combine结果的有效性,ok if in 4-sigma - - ```c - static int valcomb(const sol_t *solf, const sol_t *solb) - { - double dr[3],var[3]; - int i; - char tstr[32]; - - trace(3,"valcomb :\n"); - - /* compare forward and backward solution */ - for (i=0;i<3;i++) { - dr[i]=solf->rr[i]-solb->rr[i]; //坐标值差dr为两坐标相减 - var[i]=solf->qr[i]+solb->qr[i]; //方差car为两相加 - } - //dr在限差4倍标准差之内,就合格return 1,否则return 0 - for (i=0;i<3;i++) { - if (dr[i]*dr[i]<=16.0*var[i]) continue; /* ok if in 4-sigma */ - - time2str(solf->time,tstr,2); - trace(2,"degrade fix to float: %s dr=%.3f %.3f %.3f std=%.3f %.3f %.3f\n", - tstr+11,dr[0],dr[1],dr[2],SQRT(var[0]),SQRT(var[1]),SQRT(var[2])); - return 0; - } - return 1; - } - ``` - - - -### 5、procpos() - -#### 1. 功能 - -从这个函数开始正式整个流动站和基准站逐历元处理。每次循环都通过inputobs函数读取一个历元的数据,并调用 rtkpos 函数对该历元的数据进行解算。 - -#### 2. 传入参数 - -```c -FILE *fp I/O 输出结果文件指针 -const prcopt_t *popt I 处理选项结构体 -const solopt_t *sopt I 结果选项结构体 -const filopt_t *fopt I 文件选项结构体 -int mode I 0:forward/backward、1:combined -``` - -#### 3. 执行流程 - -* 判断结果是否为静态,处理选项和结果选项都为静态才算静态 -* 调用`rtkinit()` 初始化`rtk_t `,将popt结构体赋值给rtk的部分成员 -* while大循环,调用`inputobs()`,每次取一个历元的观测数据`obs[]` -* 排除禁用卫星的观测值 -* PPP中如果需要,调用`corr_phase_bias_ssr()`相位的小数轴偏差改正 -* 调用rtkpos()对当前历元进行解算 -* 根据模式,输出结果,记录当前历元时间 - -```c -static void procpos(FILE *fp, const prcopt_t *popt, const solopt_t *sopt, - int mode) -{ - gtime_t time={0}; - sol_t sol={{0}}; - rtk_t rtk; - obsd_t obs[MAXOBS*2]; /* for rover and base */ - double rb[3]={0}; - int i, - nobs, - n, - solstatic, - pri[]={6,1,2,3,4,5,1,6}; - - trace(3,"procpos : mode=%d\n",mode); - - solstatic=sopt->solstatic&& //先判断结果是否为静态,处理选项和结果选项都为静态才算静态 - (popt->mode==PMODE_STATIC||popt->mode==PMODE_PPP_STATIC); - - rtkinit(&rtk,popt); //初始化rtk_t,主要将popt结构体赋值给rtk的部分成员 - rtcm_path[0]='\0'; - //对每一个历元进行遍历求解和输出 - //获取当前历元观测值数nobs以及当前历元各观测记录obs[MAXOBS*2] - while ((nobs=inputobs(obs,rtk.sol.stat,popt))>=0) { - /* exclude satellites */ - for (i=n=0;inavsys)&& - popt->exsats[obs[i].sat-1]!=1) obs[n++]=obs[i]; //排除禁用卫星的观测值 - } - if (n<=0) continue; - //如果ppp模式设置了fractional cycle bias相位的小数轴偏差 - /* carrier-phase bias correction */ - if (!strstr(popt->pppopt,"-ENA_FCB")) { - corr_phase_bias_ssr(obs,n,&navs); - } - //调用rtkpos()进行解算 - if (!rtkpos(&rtk,obs,n,&navs)) continue; - - //单forward/backward模式 - if (mode==0) { /* forward/backward */ - if (!solstatic) { //不是静态模式就直接输出结果 - outsol(fp,&rtk.sol,rtk.rb,sopt); - } - else if (time.time==0||pri[rtk.sol.stat]<=pri[sol.stat]) { - sol=rtk.sol; - for (i=0;i<3;i++) rb[i]=rtk.rb[i]; - if (time.time==0||timediff(rtk.sol.time,time)<0.0) { - time=rtk.sol.time; //记录上一历元的时间 - } - } - } - else if (!revs) { /* combined-forward */ - if (isolf>=nepoch) return; - solf[isolf]=rtk.sol; - for (i=0;i<3;i++) rbf[i+isolf*3]=rtk.rb[i]; - isolf++; - } - else { /* combined-backward */ - if (isolb>=nepoch) return; - solb[isolb]=rtk.sol; - for (i=0;i<3;i++) rbb[i+isolb*3]=rtk.rb[i]; - isolb++; - } - } - if (mode==0&&solstatic&&time.time!=0.0) { - sol.time=time; - outsol(fp,&sol,rb,sopt); - } - rtkfree(&rtk); -} -``` - -#### 4. 调用的函数 - -* **inputobs()**:取一个历元基准站、流动站的观测数据到OBS数组中;如果需要,调用sbsupdatecorr()、update_rtcm_ssr()进行改正。 - - > **涉及的全局变量:** - > - > * iobsu :流动站当前历元索引 - > * iobsr :基准站当前历元索引 - > * isbs :SBAS信息索引 - > * revs :0:forward 1:backward - - > * **nextobsf()**:在obs中正向指定接收机查找下一个历元观测数据的下标 ,下标从 i 开始,连续 n 个,之间卫星不同。 - > - > ```c - > static int nextobsf(const obs_t *obs, int *i, int rcv) //正向查找下一个观测数据的下标 - > { - > double tt; - > int n; - > //obs->data的元素已经用sortobs(),根据time, rcv, sat 排序、去重了 - > //一直正向i++,直到obsd的rcv与传入接收机ID相等,找到传入接收机 - > for (;*in;(*i)++) if (obs->data[*i].rcv==rcv) break; - > //在i的基础上加n++,直到流动站变了或时间差大于DTTOL - > for (n=0;*i+nn;n++) { - > tt=timediff(obs->data[*i+n].time,obs->data[*i].time); //求i+n位数据与i数据的时间差tt - > if (obs->data[*i+n].rcv!=rcv||tt>DTTOL) break; //时间不同或rcv不同,则结束循环 - > } - > return n; //返回在i基础上加的n,n应该是同一接收机同一时间的OBS数,卫星不同,即n为卫星数 - > } - > ``` - > - > * **nextobsb()**:在obs反向查找指定接收机下一个历元观测数据的下标 - > - > ```c - > static int nextobsb(const obs_t *obs, int *i, int rcv) //反向查找下一个观测数据的下标 - > { - > double tt; - > int n; - > //一直反向--i,直到obsd的rcv与传入rcv流动站ID相等,找到传入的流动站 - > for (;*i>=0;(*i)--) if (obs->data[*i].rcv==rcv) break; - > //在i的基础上减n++,直到流动站变了或时间差小于DTTOL - > for (n=0;*i-n>=0;n++) { - > tt=timediff(obs->data[*i-n].time,obs->data[*i].time); - > if (obs->data[*i-n].rcv!=rcv||tt<-DTTOL) break; - > } - > return n; //返回在i基础上减的n - > } - > ``` - - ```c - static int inputobs(obsd_t *obs, int solq, const prcopt_t *popt) - { - gtime_t time={0}; - int i, - nu,nr, //nu、nr存同一流动站基准站相同历元的观测值个数,应该是卫星不同 - n=0; //obs数组下标 - - //iobsu :流动站当前历元索引 - //iobsr :基准站当前历元索引 - //isbs :SBAS信息索引 - //revs :0:forward 1:backward - - trace(3,"infunc : revs=%d iobsu=%d iobsr=%d isbs=%d\n",revs,iobsu,iobsr,isbs); - - if (0<=iobsu&&iobsuintpref) { - for (;(nr=nextobsf(&obss,&iobsr,2))>0;iobsr+=nr) - if (timediff(obss.data[iobsr].time,obss.data[iobsu].time)>-DTTOL) break; - } - else { - for (i=iobsr;(nr=nextobsf(&obss,&i,2))>0;iobsr=i,i+=nr) - if (timediff(obss.data[i].time,obss.data[iobsu].time)>DTTOL) break; - } - nr=nextobsf(&obss,&iobsr,2); - if (nr<=0) { - nr=nextobsf(&obss,&iobsr,2); - } - for (i=0;i-1.0-DTTOL) break; - isbs++; - } - /* update rtcm ssr corrections */ - if (*rtcm_file) { - update_rtcm_ssr(obs[0].time); - } - } - else { /* input backward data */ //后向滤波 - if ((nu=nextobsb(&obss,&iobsu,1))<=0) return -1; - if (popt->intpref) { - for (;(nr=nextobsb(&obss,&iobsr,2))>0;iobsr-=nr) - if (timediff(obss.data[iobsr].time,obss.data[iobsu].time)0;iobsr=i,i-=nr) - if (timediff(obss.data[i].time,obss.data[iobsu].time)<-DTTOL) break; - } - nr=nextobsb(&obss,&iobsr,2); - for (i=0;i=0) { - time=gpst2time(sbss.msgs[isbs].week,sbss.msgs[isbs].tow); - - if (getbitu(sbss.msgs[isbs].msg,8,6)!=9) { /* except for geo nav */ - sbsupdatecorr(sbss.msgs+isbs,&navs); - } - if (timediff(time,obs[0].time)<1.0+DTTOL) break; - isbs--; - } - } - return n; //返回n:此历元基准站、流动站观测值OBS总数 - } - ``` - - - -* **rtkinit()**:初始化rtk_t结构体, - - ```c - typedef struct { /* RTK control/result type */ - sol_t sol; /* RTK solution */ - double rb[6]; /* base position/velocity (ecef) (m|m/s) */ - int nx,na; /* number of float states/fixed states */ - double tt; /* time difference between current and previous (s) */ - double *x, *P; /* float states and their covariance */ - double *xa,*Pa; /* fixed states and their covariance */ - int nfix; /* number of continuous fixes of ambiguity */ - ambc_t ambc[MAXSAT]; /* ambibuity control */ - ssat_t ssat[MAXSAT]; /* satellite status */ - int neb; /* bytes in error message buffer */ - char errbuf[MAXERRMSG]; /* error message buffer */ - prcopt_t opt; /* processing options */ - } rtk_t; - ``` - - - -### 6、rtkpos() - -#### 1. 功能: - -根据观测数据和导航信息,计算接收机的位置、速度和钟差。 设置基准站位置,记录观测值数量。调用 pntpos 进行接收机单点定位。若为单点定位模式,输出,返回。若为 PPP 模式,调用 pppos 进行精密单点定位,输出,返回。若无基准站观测数据,输出,返回。若为移动基站模式,调用 pntpos 进行基站单点定位,并加以时间同步;否则只计算一下差分时间。调用 relpos 进行相对基站的接收机定位,输出,返回。相对定位模式在调用rtkpos之前应该先设置好基站位置,动基线模式除外。 - -#### 2. 传入参数 - -```c -rtk_t *rtk RTK控制结构体 -const obsd_t *obs 观测数据OBS -int n 观测数据数量 -const nav_t *nav 导航电文信息 -``` - -#### 3. 执行流程 - -```c -extern int rtkpos(rtk_t *rtk, const obsd_t *obs, int n, const nav_t *nav) -{ - prcopt_t *opt=&rtk->opt; //这里定义了一个prcopt_t用来储存传入的rtk_t中的prcopt_t - sol_t solb={{0}}; - gtime_t time; - int i,nu,nr; - char msg[128]=""; - - trace(3,"rtkpos : time=%s n=%d\n",time_str(obs[0].time,3),n); - trace(4,"obs=\n"); traceobs(4,obs,n); - - //设置rtk内基准站坐标,基准站坐标在execses函数内已经计算了,速度设为0.0 - //这里将配置结构体opt内基准站的坐标赋值给解算结构体rtk内基准站的坐标 - /* set base staion position */ - if (opt->refpos<=POSOPT_RINEX&&opt->mode!=PMODE_SINGLE&& - opt->mode!=PMODE_MOVEB) { - for (i=0;i<6;i++) rtk->rb[i]=i<3?opt->rb[i]:0.0; //opt内基准站坐标赋值给rtk->rb,速度设为0.0 - } - /* count rover/base station observations */ //统计基准站OBS个数nu,流动站OBS个数nr,可用于后面判断是否满足差分条件 - for (nu=0;nu sol.time; /* previous epoch */ - - //利用观测值及星历计算流动站的SPP定位结果,作为kalman滤波的近似坐标。需要注意, - //如果由于流动站SPP定位结果坐标误差过大等原因导致的SPP无解,则不进行rtk运算,当前历元无解。 - /* rover position by single point positioning */ - if (!pntpos(obs,nu,nav,&rtk->opt,&rtk->sol,NULL,rtk->ssat,msg)) { - errmsg(rtk,"point pos error (%s)\n",msg); - - if (!rtk->opt.dynamics) { - outsolstat(rtk); - return 0; - } - } - if (time.time!=0) rtk->tt=timediff(rtk->sol.time,time); - - /* single point positioning */ - if (opt->mode==PMODE_SINGLE) { //单点定位模式直接输出刚刚SPP算的坐标 - outsolstat(rtk); - return 1; - } - //如果不是单点模式,抑制单点解的输出, - /* suppress output of single solution */ - if (!opt->outsingle) { - rtk->sol.stat=SOLQ_NONE; - } - - /* precise point positioning */ //精密单点定位 - if (opt->mode>=PMODE_PPP_KINEMA) { - pppos(rtk,obs,nu,nav); - outsolstat(rtk); - return 1; - } - - //检查该历元流动站观测时间和基准站观测时间是否对应,若无基准站观测数据,return - /* check number of data of base station and age of differential */ - if (nr==0) { - errmsg(rtk,"no base station observation data for rtk\n"); - outsolstat(rtk); - return 1; - } - //动基线与其他差分定位方式,动基线的基站坐标需要随时间同步变化,所以需要计算出变化速率, - //解释了为什么第二步除了单点定位,动基线也不参与基站解算,动基线在这里单独解算 - if (opt->mode==PMODE_MOVEB) { /* moving baseline */ //若为移动基线模式 - - /* estimate position/velocity of base station */ //spp计算基准站位置 - if (!pntpos(obs+nu,nr,nav,&rtk->opt,&solb,NULL,NULL,msg)) { - errmsg(rtk,"base station position error (%s)\n",msg); - return 0; - } - rtk->sol.age=(float)timediff(rtk->sol.time,solb.time); //计算差分龄期rtk->sol.age - - if (fabs(rtk->sol.age)>TTOL_MOVEB) { - errmsg(rtk,"time sync error for moving-base (age=%.1f)\n",rtk->sol.age); - return 0; - } - for (i=0;i<6;i++) rtk->rb[i]=solb.rr[i]; //把solb.rr赋值给rtk->rb - - /* time-synchronized position of base station */ //时间同步 - for (i=0;i<3;i++) rtk->rb[i]+=rtk->rb[i+3]*rtk->sol.age; //位置+=对应速度*差分龄期 - } - else { - rtk->sol.age=(float)timediff(obs[0].time,obs[nu].time); - - if (fabs(rtk->sol.age)>opt->maxtdiff) { - errmsg(rtk,"age of differential error (age=%.1f)\n",rtk->sol.age); - outsolstat(rtk); - return 1; - } - } - - //上面的步骤只算了相对定位的差分时间和动基线坐标,这里进行相位定位,并输出最终结果,到这里定位步骤全部完成 - //相对定位算法的核心函数 - /* relative potitioning */ - relpos(rtk,obs,nu,nr,nav); - outsolstat(rtk); - - return 1; -} - - //检查该历元流动站观测时间和基准站观测时间是否对应,若无基准站观测数据,return - /* check number of data of base station and age of differential */ - if (nr==0) { - errmsg(rtk,"no base station observation data for rtk\n"); - outsolstat(rtk); - return 1; - } - //动基线与其他差分定位方式,动基线的基站坐标需要随时间同步变化,所以需要计算出变化速率, - //解释了为什么第二步除了单点定位,动基线也不参与基站解算,动基线在这里单独解算 - if (opt->mode==PMODE_MOVEB) { /* moving baseline */ //若为移动基线模式 - - /* estimate position/velocity of base station */ //spp计算基准站位置 - if (!pntpos(obs+nu,nr,nav,&rtk->opt,&solb,NULL,NULL,msg)) { - errmsg(rtk,"base station position error (%s)\n",msg); - return 0; - } - rtk->sol.age=(float)timediff(rtk->sol.time,solb.time); //计算差分龄期rtk->sol.age - - if (fabs(rtk->sol.age)>TTOL_MOVEB) { - errmsg(rtk,"time sync error for moving-base (age=%.1f)\n",rtk->sol.age); - return 0; - } - for (i=0;i<6;i++) rtk->rb[i]=solb.rr[i]; //把solb.rr赋值给rtk->rb - - /* time-synchronized position of base station */ //时间同步 - for (i=0;i<3;i++) rtk->rb[i]+=rtk->rb[i+3]*rtk->sol.age; //位置+=对应速度*差分龄期 - } - else { - rtk->sol.age=(float)timediff(obs[0].time,obs[nu].time); - - if (fabs(rtk->sol.age)>opt->maxtdiff) { - errmsg(rtk,"age of differential error (age=%.1f)\n",rtk->sol.age); - outsolstat(rtk); - return 1; - } - } - - //上面的步骤只算了相对定位的差分时间和动基线坐标,这里进行相位定位,并输出最终结果,到这里定位步骤全部完成 - //相对定位算法的核心函数 - /* relative potitioning */ - relpos(rtk,obs,nu,nr,nav); - outsolstat(rtk); - - return 1; -} -``` - - - - - -## 二、Option/Configuration文件读取 +## 一、配置文件读取 ![image-20231024152747192](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20231024152747192.png) ### 1、Option文件格式介绍 -* 配置文件包含了processing options、solution options、file options三大块,用于RTKNAVI、RTKPOST、RTKRCV、RNX2RTKP。 +* 配置文件包含了文件选项(filopt_t )、结果输出选项(solopt_t )、解算方式选项(prcopt_t )三大块,用于实时和后处理定位解算程序 RTKNAVI、RTKPOST、RTKRCV、RNX2RTKP。 -* 文件中都以**Keyword = Value**形式记录不同的配置项。 +* 文件中都以键值对 **Keyword = Value** 形式记录不同的配置项。 -* 对于枚举选项,可选值是选项序号(0,1,2,...) 或选项字符串(off, on, ...)。 +* 对于枚举选项,可选值是选项序号 (0,1,2,...) 或选项字符串 (off, on, ...)。 -* 以#开头的行和行中#之后的文本被视为注释。 +* 以 # 开头的行和行中#之后的文本被视为注释。 ### 2、存Option的类型 @@ -2492,8 +834,6 @@ extern void traceb(int level, const uint8_t *p, int n) - - ## 四、结果输出 ![image-20231024152344219](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20231024152344219.png) @@ -2577,8 +917,6 @@ typedef struct { /* solution status type */ - - ### 2、结果文件头输出 #### 1. outhead @@ -2654,20 +992,3 @@ extern void outsol(FILE *fp, const sol_t *sol, const double *rb, ``` `outsol()` 调用 `outsols()`,然后通过调用 `outpos()`、`outecef()`、`outenu()`、`outnmea_rmc()`、`outnmea_gga()` 来输出对应形式的结果 - - - - - -### 4、 - - - - - - - - - - - diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/09-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\271\235\357\274\211\350\247\202\346\265\213\345\200\274\350\257\257\345\267\256\346\224\271\346\255\243\357\274\232\347\224\265\347\246\273\345\261\202\343\200\201\345\257\271\346\265\201\345\261\202\343\200\201\345\244\251\347\272\277\347\233\270\344\275\215\344\270\255\345\277\203\343\200\201\347\233\270\344\275\215\347\274\240\347\273\225\343\200\201DCB.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/09-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\271\235\357\274\211\350\247\202\346\265\213\345\200\274\350\257\257\345\267\256\346\224\271\346\255\243\357\274\232\347\224\265\347\246\273\345\261\202\343\200\201\345\257\271\346\265\201\345\261\202\343\200\201\345\244\251\347\272\277\347\233\270\344\275\215\344\270\255\345\277\203\343\200\201\347\233\270\344\275\215\347\274\240\347\273\225\343\200\201DCB.md" index d2b2a2a..272d2fa 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/09-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\271\235\357\274\211\350\247\202\346\265\213\345\200\274\350\257\257\345\267\256\346\224\271\346\255\243\357\274\232\347\224\265\347\246\273\345\261\202\343\200\201\345\257\271\346\265\201\345\261\202\343\200\201\345\244\251\347\272\277\347\233\270\344\275\215\344\270\255\345\277\203\343\200\201\347\233\270\344\275\215\347\274\240\347\273\225\343\200\201DCB.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/09-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\344\271\235\357\274\211\350\247\202\346\265\213\345\200\274\350\257\257\345\267\256\346\224\271\346\255\243\357\274\232\347\224\265\347\246\273\345\261\202\343\200\201\345\257\271\346\265\201\345\261\202\343\200\201\345\244\251\347\272\277\347\233\270\344\275\215\344\270\255\345\277\203\343\200\201\347\233\270\344\275\215\347\274\240\347\273\225\343\200\201DCB.md" @@ -2,14 +2,6 @@ [TOC] - - - - - - - - ## 二、电离层处理 > 模型公式见 manual p151,我在代码的注释里标注了公式号 diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/10-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\357\274\211\344\274\252\350\267\235\345\215\225\347\202\271\345\256\232\344\275\215 SPP.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/10-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\357\274\211\344\274\252\350\267\235\345\215\225\347\202\271\345\256\232\344\275\215 SPP.md" index 29de8bf..a1366ec 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/10-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\357\274\211\344\274\252\350\267\235\345\215\225\347\202\271\345\256\232\344\275\215 SPP.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/10-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\357\274\211\344\274\252\350\267\235\345\215\225\347\202\271\345\256\232\344\275\215 SPP.md" @@ -1,11 +1,5 @@ [TOC] - - - - - - ## 一、伪距单点定位流程 diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/11-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\344\270\200\357\274\211\347\233\270\345\257\271\345\256\232\344\275\215 RTK\343\200\201PPK\343\200\201RTD.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/11-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\344\270\200\357\274\211\347\233\270\345\257\271\345\256\232\344\275\215 RTK\343\200\201PPK\343\200\201RTD.md" index f3a4c90..fa3154b 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/11-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\344\270\200\357\274\211\347\233\270\345\257\271\345\256\232\344\275\215 RTK\343\200\201PPK\343\200\201RTD.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/11-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\344\270\200\357\274\211\347\233\270\345\257\271\345\256\232\344\275\215 RTK\343\200\201PPK\343\200\201RTD.md" @@ -1,9 +1,5 @@ [TOC] -> 参考文章:[小白如何学习GNSS(三)-如何阅读rtklib源码](https://zhuanlan.zhihu.com/p/589140780)、[RTKlib相对定位学习笔记](https://zhuanlan.zhihu.com/p/585236517) - -![](C:/Users/李郑骁的spin5/Desktop/UWB/b32549479b194f7eb5f706b27b22e3c7.png) - ## 一、RTK算法数据类型 ### 1、rtk_t:rtk控制结构体 @@ -506,7 +502,7 @@ extern int rtkpos(rtk_t *rtk, const obsd_t *obs, int n, const nav_t *nav) } ``` -### 3、outsolstat():输出结果状态 +### 3、outsolstat():输出中间结果 #### 1.执行流程 @@ -581,7 +577,7 @@ static void swapsolstat(void) } ``` -#### 3.rtkoutstat():写结果状态到缓冲区buffer +#### 3.rtkoutstat():写中间结果到缓冲区buffer 内容包括: @@ -688,7 +684,7 @@ extern int rtkoutstat(rtk_t *rtk, char *buff) int i,j,week,est,nfreq,nf=NF(&rtk->opt); char id[32],*p=buff; - //如果结果状态为SOLQ_NONE,直接return 0 + //如果中间结果为SOLQ_NONE,直接return 0 if (rtk->sol.stat<=SOLQ_NONE) { return 0; } @@ -771,22 +767,27 @@ extern int rtkoutstat(rtk_t *rtk, char *buff) } ``` -### 4、rtkpos.c开头的宏函数 +### 4、rtkpos.c 开头的宏函数 RTKLIB中常用很长的一维数组存信息,为方便找对应数据的数组下标,开头定义了几个宏函数: -* **NF**:`define NF(opt) ((opt)->ionoopt==IONOOPT_IFLC?1:(opt)->nf)`,Iono-Free LC:频率数,电离层与双频的线性组合时为1,否则为设置的频率数 -* **NP**:`define NP(opt) ((opt)->dynamics==0?3:9)`,位置参数数量,正常为3,dynamics动力学模式为9 -* **NI**:`define NI(opt) ((opt)->ionoopt!=IONOOPT_EST?0:MAXSAT)`,Estimate STEC估算斜电子含量时为最大卫星数,否则为0 -* **NT**:`define NT(opt) ((opt)->tropopttropoptglomodear!=2?0:NFREQGLO)`,GLONASS AR模式,auto cal为0,其它为GLONASS的载波频率数2 -* **NB**:`define NB(opt) ((opt)->mode<=PMODE_DGPS?0:MAXSAT*NF(opt))`,模糊度参数,DGPS和单点定位模式为0,其它模式为最大卫星数MAXSAT乘频率数NF(opt) -* **NR**:`define NR(opt) (NP(opt)+NI(opt)+NT(opt)+NL(opt))`,位置参数NP(opt)+电离层估计参数NI(opt)+对流层参数NT(opt)+GLONASS AR参数NL(opt) -* **NX**:`define NX(opt) (NR(opt)+NB(opt))`,NR+NB -* **II**:`define II(s,opt) (NP(opt)+(s)-1)`,电离层参数下标,(s:satellite no) -* **IT**:`define IT(r,opt) (NP(opt)+NI(opt)+NT(opt)/2*(r))`,对流层参数下标(r:0=rov,1:ref) -* **IL**:`define IL(f,opt) (NP(opt)+NI(opt)+NT(opt)+(f))`,GLONASS receiver h/w bias -* **IB**:`define IB(s,f,opt) (NR(opt)+MAXSAT*(f)+(s)-1)`,整周模糊度参数下标,(s:satno,f:freq) +| 变量 | 定义 | 说明 | +| :----: | :----------------------------------------------------------: | :----------------------------------------------------------: | +| **NF** | `define NF(opt) ((opt)->ionoopt==IONOOPT_IFLC?1:(opt)->nf)` | 频率数,电离层与双频的线性组合时为1,否则为设置的频率数 | +| **NP** | `define NP(opt) ((opt)->dynamics==0?3:9)` | 位置参数数量,默认为 3,dynamics 动力学模式为 9 | +| **NI** | `define NI(opt) ((opt)->ionoopt!=IONOOPT_EST?0:MAXSAT)` | Estimate STEC 估算斜电子含量时为最大卫星数,否则为 0 | +| **NT** | `define NT(opt) ((opt)->tropopttropoptglomodear!=2?0:NFREQGLO)` | GLONASS AR 模式,auto cal为0,其它为 GLONASS 的载波频率数 2 | +| **NB** | `define NB(opt) ((opt)->mode<=PMODE_DGPS?0:MAXSAT*NF(opt))` | 模糊度参数,DGPS 和单点定位模式为 0,其它模式为最大卫星数MAXSAT 乘频率数 NF(opt) | +| **NR** | `define NR(opt) (NP(opt)+NI(opt)+NT(opt)+NL(opt))` | 非模糊度参数 = 位置参数 NP(opt)+电离层估计参数 NI(opt) +对流层参数NT(opt)+GLONASS AR 参数NL(opt) | +| **NX** | `define NX(opt) (NR(opt)+NB(opt))` | 总参数 = 非模糊度参数 NR+ 模糊度参数 NB | +| **II** | `define II(s,opt) (NP(opt)+(s)-1)` | 电离层参数下标 (s 是卫星编号) | +| **IT** | `define IT(r,opt) (NP(opt)+NI(opt)+NT(opt)/2*(r))` | 对流层参数下标 (r:流动站是 0、基准站是 1) | +| **IL** | `define IL(f,opt) (NP(opt)+NI(opt)+NT(opt)+(f))` | GLONASS 接收机 h/w 延迟 | +| **IB** | `define IB(s,f,opt) (NR(opt)+MAXSAT*(f)+(s)-1)` | 整周模糊度参数下标,(s 是卫星编号,f 是频率编号) | + +> * 为啥没有位置参数下标宏?因为在最前面,直接取值就行。 +> * 为啥没有钟差参数?因为双差基本消除了钟差,不用计算。 ## 三、relpos():相对定位算法入口函数 @@ -826,7 +827,7 @@ nav_t *nav I 导航数据 * 调用`resamb_LAMBDA()`,利用lambda算法**固定模糊度**。 * 模糊度解算成功,调用`zdres()`和`ddres()`根据固定结果计算残差和协方差,并进行调用`valpos()`校验 * 固定解验证有效,若为hold模式,需要存模糊度信息调用`holdamb()` -* **保存结果状态**,位置,速度,方差,到`sol.rr`、`sol.qr`、`sol.qv`,固定解数据在`rtk->xa`、`rtk->Pa`,浮点解数据在`rtk->x`、`rtk->P` +* **保存中间结果**,位置,速度,方差,到`sol.rr`、`sol.qr`、`sol.qv`,固定解数据在`rtk->xa`、`rtk->Pa`,浮点解数据在`rtk->x`、`rtk->P` * 循环,**存当前历元载波信息**`rtk->ssat[sat[i]-1].pt`存时间、rtk->ssat[sat[i]-1]`.ph`存载波相位观测值,供下次使用 * 循环,**存SNR**信噪比信息到`rtk->ssat[sat[i]-1].snr ` * 循环,存卫星的模糊度固定信息`rtk->ssat[i].fix[j]`及周跳信息,`rtk->ssat[i].slipc[j]` @@ -1059,7 +1060,7 @@ static int relpos(rtk_t *rtk, const obsd_t *obs, int nu, int nr, } ``` -## 四、zdres():计算非差残差 +## 四、zdres():计算非差残差![image-20241006144531175](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20241006144531175.png) 计算流动站(base=0)和基准站(base=1)的非差残差,即非差的相位/伪距残差(Zero-Difference Residuals) @@ -1525,6 +1526,8 @@ static int selsat(const obsd_t *obs, double *azel, int nu, int nr, ## 七、udstate():Kalman滤波时间更新 +![image-20241006144611825](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20241006144611825.png) + kalman滤波的时间更新,更新状态值`rtk->x`及其误差协方差`rtk->P` ### 1、传入参数 @@ -2257,7 +2260,11 @@ static void detslp_gf(rtk_t *rtk, const obsd_t *obs, int i, int j, ## 九、ddres():计算双差残差、设计矩阵、新息向量 -站星双差、矩阵v、双差设计矩阵`H`,双差协方差矩阵`R` +![image-20241006144647874](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/image-20241006144647874.png) + +站星双差、矩阵v、双差设计矩阵`H`,双差协方差矩阵 + +`R` ### 1、单差、双差的概念 diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/12-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\344\272\214\357\274\211\347\262\276\345\257\206\345\215\225\347\202\271\345\256\232\344\275\215 PPP.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/12-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\344\272\214\357\274\211\347\262\276\345\257\206\345\215\225\347\202\271\345\256\232\344\275\215 PPP.md" index de41222..1d54671 100644 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/12-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\344\272\214\357\274\211\347\262\276\345\257\206\345\215\225\347\202\271\345\256\232\344\275\215 PPP.md" +++ "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/12-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\344\272\214\357\274\211\347\262\276\345\257\206\345\215\225\347\202\271\345\256\232\344\275\215 PPP.md" @@ -1,5 +1,7 @@ [TOC] +![PPP 数据模型](https://pic-bed-1316053657.cos.ap-nanjing.myqcloud.com/img/PPP%2520%25E6%2595%25B0%25E6%258D%25AE%25E6%25A8%25A1%25E5%259E%258B.png) + ## 一、pppos():精密单点定位主入口函数 ### 1、函数调用流程图 @@ -360,5 +362,242 @@ I const nav_t *nav 星历 * 遍历各个卫星,给`P`矩阵加过程噪声 * 如果状态量无效,或有周跳发生,则用偏移值`bias`重置`rtk->x`,重置模糊度固定标志位`rtk->ambc[sat-1].flags[k]=0` -## 三、 + + + + + + +### 八、PPP-AR + +> ppp_ar.c 的内容在最新版的 RTKLIB 被删除了,这里介绍的是之前 2.4.2 版本的。 + +image-20240622165232083 + +### 1、pppamb():PPP 模糊度固定入口函数 + +双频的宽巷就是两频率求和,窄向就是两频率做差。宽巷组合具有较长的波长和非常小的载波方差,有利于模糊度的求解,但是放大了测量噪声;窄巷组合具有较小的距离方差,有利于基线矢量的精度,但是波长短,载波方差较大,不利于模糊度的求解。所以先固定较容易的宽巷模糊度,再固定窄向模糊度以获得更高的精度。 + + + + + +### 2、average_LC():计算平均线性组合 + +L_LC()、P_LC()、var_LC()、Lam_LC() 是进行线性组合的基本函数,分别用于计算组合(三频或双频)后的载波、伪距、方差、波长。 + + + + + + + + + +### 3、fix_amb_WL():均值取整法固定宽巷模糊度 + + + + + +### 4、fix_amb_ROUND():取整法固定窄巷模糊度 + +> 直接取整法不是很靠谱,容易导致模糊度固定错误,固定解可能还没有浮点解精度高。 + + + +### 5、fix_amb_ILS():整数最小二乘法固定窄向模糊度 + + + + + +### 6、lambda():最小二乘模糊度去相关法 + +**传入参数**: + +```c +int n I number of float parameters //浮点解数量 +int m I number of fixed solutions //固定解数量 +double *a I float parameters (n x 1) //浮点参数向量 +double *Q I covariance matrix of float parameters (n x n) //浮点参数协方差阵 +double *F O fixed solutions (n x m) //固定解 +double *s O sum of squared residulas of fixed solutions (1 x m) //总固定残差向量 +``` + +**执行流程**: + +- 调用`LD()`,首先对浮点协方差阵进行LD分解 +- 调用`reduction()`,lambda降相关性 +- z变换,将双差模糊度进行变换 +- 调用`search()`,mlambda search,结果存储在`E`和`s`中(整数解) +- 调用`solve()`,逆Z变换,将在新空间中固定的模糊度逆变换回双差模糊度空间中,存储在`F`中 + +```c +extern int lambda(int n, int m, const double *a, const double *Q, double *F, + double *s) +{ + int info; + double *L,*D,*Z,*z,*E; + + if (n<=0||m<=0) return -1; + L=zeros(n,n); D=mat(n,1); Z=eye(n); z=mat(n,1); E=mat(n,m); + + //调用LD(),首先对浮点协方差阵进行LD分解 + /* LD factorization */ + if (!(info=LD(n,Q,L,D))) { + + //调用reduction(),lambda降相关性 + /* lambda reduction */ + reduction(n,L,D,Z); + + // z变换,将双差模糊度进行变换 + matmul("TN",n,1,n,1.0,Z,a,0.0,z); /* z=Z'*a */ + + //调用search(),mlambda search,结果存储在E和s中(整数解) + /* mlambda search */ + if (!(info=search(n,m,L,D,z,E,s))) { + //逆Z变换,将在新空间中固定的模糊度逆变换回双差模糊度空间中,存储在F中 + info=solve("T",Z,E,n,m,F); /* F=Z'\E */ + } + } + free(L); free(D); free(Z); free(z); free(E); + return info; +} +``` + +#### 1. reduction():LAMBDA降相关 + +```c +static void reduction(int n, double *L, double *D, double *Z) +{ + int i,j,k; + double del; + + j=n-2; k=n-2; //调序变换 + + //对第0,1,...,k-1,k列进行降相关 + while (j>=0) { + if (j<=k) for (i=j+1;is[imax]) imax=nn; //若当前解的目标函数值比之前最大的目标函数值都大,那么更新imax使s[imax]指向当前解中具有的最大目标函数值 + for (i=0;i=LOOPMAX) { + fprintf(stderr,"%s : search loop count overflow\n",__FILE__); + return -1; + } + return 0; +} +``` + + diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/13-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\344\270\211\357\274\211SBAS\343\200\201SSR.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/13-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273\357\274\210\345\215\201\344\270\211\357\274\211SBAS\343\200\201SSR.md" deleted file mode 100644 index e69de29..0000000 diff --git "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/RTKLIB \344\271\213 ppp_ar \346\272\220\347\240\201\351\230\205\350\257\273.md" "b/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/RTKLIB \344\271\213 ppp_ar \346\272\220\347\240\201\351\230\205\350\257\273.md" deleted file mode 100644 index fea1c44..0000000 --- "a/01-RTKLIB\346\272\220\347\240\201\351\230\205\350\257\273/RTKLIB \344\271\213 ppp_ar \346\272\220\347\240\201\351\230\205\350\257\273.md" +++ /dev/null @@ -1,243 +0,0 @@ -> ppp_ar.c 的内容在最新版的 RTKLIB 被删除了。 - -[TOC] - - - -image-20240622165232083 - - - - - -## 二、pppamb():PPP 模糊度固定入口函数 - - - - - -双频的宽巷就是两频率求和,窄向就是两频率做差。宽巷组合具有较长的波长和非常小的载波方差,有利于模糊度的求解,但是放大了测量噪声;窄巷组合具有较小的距离方差,有利于基线矢量的精度,但是波长短,载波方差较大,不利于模糊度的求解。所以先固定较容易的宽巷模糊度,再固定窄向模糊度以获得更高的精度。 - - - - - -## 三、average_LC():计算平均线性组合 - -L_LC()、P_LC()、var_LC()、Lam_LC() 是进行线性组合的基本函数,分别用于计算组合(三频或双频)后的载波、伪距、方差、波长。 - - - - - - - - - -## 四、fix_amb_WL():均值取整法固定宽巷模糊度 - - - - - -## 五、fix_amb_ROUND():取整法固定窄巷模糊度 - - - - - -## 六、fix_amb_ILS():整数最小二乘法固定窄向模糊度 - - - - - -## 七、lambda():最小二乘模糊度去相关法 - -**传入参数**: - -```c -int n I number of float parameters //浮点解数量 -int m I number of fixed solutions //固定解数量 -double *a I float parameters (n x 1) //浮点参数向量 -double *Q I covariance matrix of float parameters (n x n) //浮点参数协方差阵 -double *F O fixed solutions (n x m) //固定解 -double *s O sum of squared residulas of fixed solutions (1 x m) //总固定残差向量 -``` - -**执行流程**: - -- 调用`LD()`,首先对浮点协方差阵进行LD分解 -- 调用`reduction()`,lambda降相关性 -- z变换,将双差模糊度进行变换 -- 调用`search()`,mlambda search,结果存储在`E`和`s`中(整数解) -- 调用`solve()`,逆Z变换,将在新空间中固定的模糊度逆变换回双差模糊度空间中,存储在`F`中 - -```c -extern int lambda(int n, int m, const double *a, const double *Q, double *F, - double *s) -{ - int info; - double *L,*D,*Z,*z,*E; - - if (n<=0||m<=0) return -1; - L=zeros(n,n); D=mat(n,1); Z=eye(n); z=mat(n,1); E=mat(n,m); - - //调用LD(),首先对浮点协方差阵进行LD分解 - /* LD factorization */ - if (!(info=LD(n,Q,L,D))) { - - //调用reduction(),lambda降相关性 - /* lambda reduction */ - reduction(n,L,D,Z); - - // z变换,将双差模糊度进行变换 - matmul("TN",n,1,n,1.0,Z,a,0.0,z); /* z=Z'*a */ - - //调用search(),mlambda search,结果存储在E和s中(整数解) - /* mlambda search */ - if (!(info=search(n,m,L,D,z,E,s))) { - //逆Z变换,将在新空间中固定的模糊度逆变换回双差模糊度空间中,存储在F中 - info=solve("T",Z,E,n,m,F); /* F=Z'\E */ - } - } - free(L); free(D); free(Z); free(z); free(E); - return info; -} -``` - -### 1、reduction():LAMBDA降相关 - -```c -static void reduction(int n, double *L, double *D, double *Z) -{ - int i,j,k; - double del; - - j=n-2; k=n-2; //调序变换 - - //对第0,1,...,k-1,k列进行降相关 - while (j>=0) { - if (j<=k) for (i=j+1;is[imax]) imax=nn; //若当前解的目标函数值比之前最大的目标函数值都大,那么更新imax使s[imax]指向当前解中具有的最大目标函数值 - for (i=0;i=LOOPMAX) { - fprintf(stderr,"%s : search loop count overflow\n",__FILE__); - return -1; - } - return 0; -} -``` - - - diff --git "a/03-GAMP-GOOD \345\217\212 GNSS \346\225\260\346\215\256\344\270\213\350\275\275/01-GAMP-GOOD \345\277\253\351\200\237\344\270\212\346\211\213\345\222\214\346\272\220\347\240\201\346\265\205\346\236\220.md" "b/03-GAMP-GOOD \345\217\212 GNSS \346\225\260\346\215\256\344\270\213\350\275\275/01-GAMP-GOOD \345\277\253\351\200\237\344\270\212\346\211\213\345\217\212\346\272\220\347\240\201\346\265\205\346\236\220.md" similarity index 99% rename from "03-GAMP-GOOD \345\217\212 GNSS \346\225\260\346\215\256\344\270\213\350\275\275/01-GAMP-GOOD \345\277\253\351\200\237\344\270\212\346\211\213\345\222\214\346\272\220\347\240\201\346\265\205\346\236\220.md" rename to "03-GAMP-GOOD \345\217\212 GNSS \346\225\260\346\215\256\344\270\213\350\275\275/01-GAMP-GOOD \345\277\253\351\200\237\344\270\212\346\211\213\345\217\212\346\272\220\347\240\201\346\265\205\346\236\220.md" index 3067ab8..e33bebc 100644 --- "a/03-GAMP-GOOD \345\217\212 GNSS \346\225\260\346\215\256\344\270\213\350\275\275/01-GAMP-GOOD \345\277\253\351\200\237\344\270\212\346\211\213\345\222\214\346\272\220\347\240\201\346\265\205\346\236\220.md" +++ "b/03-GAMP-GOOD \345\217\212 GNSS \346\225\260\346\215\256\344\270\213\350\275\275/01-GAMP-GOOD \345\277\253\351\200\237\344\270\212\346\211\213\345\217\212\346\272\220\347\240\201\346\265\205\346\236\220.md" @@ -411,7 +411,7 @@ getAtx: # ANTEX format antenna phase center correction 4. ATX 和 DCB 文件有时候下载很慢 - > * Atx.20 + > 4. grg 的 diff --git "a/04-Ginan\346\272\220\347\240\201\351\230\205\350\257\273/ginan PPP \347\256\227\346\263\225\346\226\207\346\241\243\347\277\273\350\257\221.md" "b/04-Ginan\346\272\220\347\240\201\351\230\205\350\257\273/ginan PPP \347\256\227\346\263\225\346\226\207\346\241\243\347\277\273\350\257\221.md" deleted file mode 100644 index a47d5d3..0000000 --- "a/04-Ginan\346\272\220\347\240\201\351\230\205\350\257\273/ginan PPP \347\256\227\346\263\225\346\226\207\346\241\243\347\277\273\350\257\221.md" +++ /dev/null @@ -1,77 +0,0 @@ -网址:https://geoscienceaustralia.github.io/ginan/page.html?c=on&p=science.index - -对应算法文档: - -* observations.md -* kalmanFilter.md -* rts.md -* orbits.md -* ionosphere.md -* ambiguities.md -* minimumConstraints.md -* conventions.md - -## 一、量测模型 - -### 1、观测方程 - -伪距和载波相位的观测方程: -$$ -\begin{alignat}{2} -\label{eq:code_UC_mea} -E(P_{r,f}^s) -&= \rho_{r}^s -+ c(dt_{r}^q - dt^s) -+ \tau_r^s -+ \mu_f I^s_r -+ d_{r,f}^q -+ d_{f}^s -\\ -\label{eq:phase_UC_mea} -E(L_{r,f}^s) -&= \rho_{r}^s -+ c(dt_{r}^q - dt^s) -+ \tau_r^s -- \mu_f I^s_r -+ b_{r,f}^q -- b_{f}^s -+ \lambda_{f} z_{r,f}^s -+ \phi^s_{r,f} -\end{alignat} -$$ - -* $P_{r,f}^S$:伪距观测值(m) -* $L_{r,f}^s$:载波相位观测值(m) -* $E()$:期望 -* $ \sigma() $:方差 -* $\rho_r^s$:站星几何距离 -* $c$:光速 -* - - - -想要准确定位,需要先计算出准确的几何距离 $\rho_r^s$,其它的误差项都要想办法消除。在 PPP 解算过程中,几何距离先由卫星位置和接收机近似位置,通过距离公式线性化求得: - -$$ -\rho_{r}^{s} = \sqrt{X^{s-} - X_r^-}+\Delta X^{s} - \Delta X_r -$$ - - - - - - -### 2、对流层模型 - -对流层延迟分为两部分:**干延迟**(hydrostatic delay 取决于温度、压力)、**湿延迟**(wet delay 取决于湿度)。每个部分都可以表示为天顶延迟和高度角投影的乘积: -$$ -\tau_r^s = m{H}(\theta{el,r}^s) \tau{ZHD,r} + m{W}(\theta{el,r}^s) \tau{ZWD,r} -$$ -在 Ginan 中,假定干延迟是确定的,天顶湿延迟可以 - -如果对湿延迟进行估计, - - - - - diff --git a/README.md b/README.md index b9cc8fd..8fc2b4f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ Static Badge -
@@ -132,11 +131,9 @@
- - | 类型 | 项目/网址 | | :----------------------------------------------------------: | :----------------------------------------------------------: | -| [**GNSS 数据处理**](导航定位建图开源项目记录.md#GNSS) | **[RTKLIB](https://www.rtklib.com/)**、[RTKLIB-Demo5](https://github.com/rtklibexplorer/RTKLIB)、[learning_rtklib](https://github.com/LiZhengXiao99/learning_rtklib)、[rtklib-py](https://github.com/rtklibexplorer/rtklib-py)、[pyrtklib](https://github.com/IPNL-POLYU/pyrtklib)、[GPS-RTKLIB-ARM-F407VG](https://github.com/ngochieu642/GPS-RTKLIB-ARM-F407VG)、[MALIB](https://github.com/JAXA-SNU/MALIB)、[MatRTKLIB](https://github.com/taroz/MatRTKLIB)、[Taroz-gsdc2023](https://github.com/taroz/gsdc2023)、[CSSRLib](https://github.com/hirokawa/cssrlib)、[rtklib_ros_bridge](https://github.com/MapIV/rtklib_ros_bridge)、[FiPPP](https://github.com/HuChao-gnss/FiPPP)、[rtkrcv_ros](https://github.com/ajbfinesc/rtkrcv_ros)、**[GAMP](https://geodesy.noaa.gov/gps-toolbox/GAMP.htm)**、[GAMPII-GOOD](https://github.com/zhouforme0318/GAMPII-GOOD)、**[Ginan](https://github.com/GeoscienceAustralia/ginan)**、**[goGPS](https://github.com/goGPS-Project/goGPS_MATLAB)**、[goGPS_Java](https://github.com/goGPS-Project/goGPS_Java)、[BNC](https://igs.bkg.bund.de/ntrip/bnc)、[GREAT-PVT](https://github.com/GREAT-WHU/GREAT-PVT)、[GFZRNX](https://dataservices.gfz-potsdam.de/panmetaworks/showshort.php?id=escidoc:1577894)、[GNSSLogger](https://github.com/google/gps-measurement-tools)、[georinex](https://github.com/geospace-code/georinex)、[GAMIT/GLOBK](http://geoweb.mit.edu/gg/)、[GraphGNSSLib](https://github.com/weisongwen/GraphGNSSLib)、[NavCodeMonitor](https://github.com/weisongwen/NavCodeMonitor)、[Net_Diff](https://github.com/YizeZhang/Net_Diff)、[laika](https://github.com/commaai/laika)、[CSRS-PPP](https://webapp.csrs-scrs.nrcan-rncan.gc.ca/geod/tools-outils/ppp.php)、[POSGO](https://github.com/lizhengnss/POSGO)、[Pride-PPPAR](https://github.com/PrideLab/PRIDE-PPPAR)、[PPPwizard](http://www.ppp-wizard.net/)、[GPSTk](https://github.com/SGL-UT/GPSTk)、[gnsstk](https://github.com/SGL-UT/gnsstk)、[gnsstk-apps](https://github.com/SGL-UT/gnsstk-apps)、[G-NUT/Anubis](https://www.pecny.cz/Joomla25/index.php/gnss/sw/anubis)、[Teqc](https://www.unavco.org/software/data-processing/teqc/teqc.html)、[RNXQCE](https://github.com/cuizilu/RNXQCE)、[Bernese](https://www.bernese.unibe.ch/)、[gLAB](https://github.com/valgur/gLAB?tab=readme-ov-file)、[Look4Sat](https://github.com/rt-bishop/Look4Sat)、[RobustGNSS](https://github.com/wvu-navLab/RobustGNSS)、[ntrip](https://github.com/sevensx/ntrip)、[rtcm](https://github.com/Node-NTRIP/rtcm)、[cors](https://github.com/Erensu/cors)、[VrsCaster](https://github.com/DoubleString/VrsCaster)、[gstream](https://github.com/Jin-Whu/gstream)、[ogrp](https://github.com/Fraunhofer-IIS/ogrp)、[centipede](https://github.com/CentipedeRTK/centipede)、[TouchRTKStation](https://github.com/taroz/TouchRTKStation)、[rtkbase](https://github.com/Stefal/rtkbase)、[GREAT-IFCB](https://github.com/GREAT-WHU/GREAT-IFCB)、[gnss_comm](https://github.com/HKUST-Aerial-Robotics/gnss_comm)、[PPP-BayesTree](https://github.com/wvu-navLab/PPP-BayesTree)、[gnsspy](https://github.com/GNSSpy-Project/gnsspy)、[gnssgo](https://github.com/FengXuebin/gnssgo)、[raPPPid](https://github.com/TUW-VieVS/raPPPid)、[gnss-compass-ros](https://github.com/MapIV/gnss_compass_ros)、[gnss-attitude](https://github.com/low-earth-orbit/gnss-attitude)、[FCB-FILES](https://github.com/FCB-SGG/FCB-FILES)、[MG_APP](https://github.com/XiaoGongWei/MG_APP)、[gps_amcl](https://github.com/midemig/gps_amcl)、[deep_gnss](https://github.com/Stanford-NavLab/deep_gnss)、[TSAnalyzer](https://github.com/wudingcheng/TSAnalyzer)、[GNSS-TimeSeries-Viewers](https://github.com/kmaterna/GNSS_TimeSeries_Viewers)、[RTKinGSS](https://github.com/shaolinbit/RTKinGSS)、[gnss_lib_py](https://github.com/Stanford-NavLab/gnss_lib_py)、[PNT-Integrity](https://github.com/cisagov/PNT-Integrity)、[GORS](https://github.com/lengyanyanjing/GORS)、[GDDS](https://geodesy.noaa.gov/gps-toolbox/gdds.shtml)、[FAST](https://github.com/ChangChuntao/FAST)、[QGOPDD](https://github.com/yhw605/QGOPDD)、[gnss-downloader](https://github.com/Mereithhh/gnss-downloader)、[groops](https://github.com/groops-devs/groops)、[georb](https://github.com/Thomas-Loudis/georb)、[madocalib](https://github.com/QZSS-Strategy-Office/madocalib)、[OREKIT](https://link.zhihu.com/?target=https%3A//www.orekit.org/)、[rt-clk-service](https://github.com/DoubleString/rt-clk-service)、[polaris](https://github.com/PointOneNav/polaris)、[gnss-tec](https://github.com/gnss-lab/gnss-tec)、[utm](https://github.com/sfegan/utm)、[PW-from-GPS](https://github.com/ZiskinZiv/PW_from_GPS)、[GNSS-Multipath-Analysis-Software](https://github.com/paarnes/GNSS_Multipath_Analysis_Software)、[gnss-multipath-detector](https://github.com/EvgeniiMunin/gnss-multipath-detector)、[GNSS-Shadowing](https://github.com/xaedes/GNSS-Shadowing)、[gnssIR-python](https://github.com/kristinemlarson/gnssIR_python)、[GARNO](https://github.com/geoios/GARNO)、[GPSPACE](https://github.com/CGS-GIS/GPSPACE)、[GNSSDataQC](https://github.com/GNSS-FUN/GNSSDataQC)、[gnssr-synth](https://github.com/purnelldj/gnssr_synth)、[gnssIR-matlab-v3](https://github.com/kristinemlarson/gnssIR_matlab_v3)、[gnssrefl](https://github.com/kristinemlarson/gnssrefl)、[gnss2tws-green](https://github.com/jzshhh/gnss2tws_green)、[gnssSNR](https://github.com/kristinemlarson/gnssSNR)、[mphw](https://github.com/fgnievinski/mphw)、[hgpt_model](https://github.com/pjmateus/hgpt_model)、[GNSSR_MERRByS](https://github.com/pjalesSSTL/GNSSR_MERRByS)、[PyGPSClient](https://github.com/semuconsulting/PyGPSClient)、[STM32Primer2-GNSS-Tracker](https://github.com/nemuisan/STM32Primer2_GNSS_Tracker)、[STM32-GNSS](https://github.com/SimpleMethod/STM32-GNSS)、[GNSSTimeServer](https://github.com/Montecri/GNSSTimeServer)、[GNSS_Clock](https://github.com/stevemarple/GNSS_Clock)、[AgOpenGPS](https://github.com/farmerbriantee/AgOpenGPS)、[nmea-msgs](https://github.com/ros-drivers/nmea_msgs)、[LilyGo-LoRa-Series](https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series)、[HASlib](https://github.com/nlsfi/HASlib)、[HASPPP](https://github.com/ZhangRunzhi20/HASPPP)、[OSNMA](https://github.com/Algafix/OSNMA)、[galileo-osnma](https://github.com/daniestevez/galileo-osnma)、[GNSSAMS](https://github.com/GanAHE/GNSSAMS)、[geodetic_utils](https://github.com/ethz-asl/geodetic_utils)、[ppp-tools](https://github.com/aewallin/ppp-tools)、[gpstest](https://github.com/barbeau/gpstest)、[iSniff-GPS](https://github.com/hubert3/iSniff-GPS)、[hypatia](https://github.com/snkas/hypatia)、[gps-measurement-tools](https://github.com/google/gps-measurement-tools)、[FE-GUT](https://github.com/zhaoqj23/FE-GUT)、[gnss-RX](https://github.com/HeryMwenegoha/gnss-RX)、[Pypredict](https://github.com/spel-uchile/Pypredict)、[novatel-gps-driver](https://github.com/swri-robotics/novatel_gps_driver)、[GNSSAMS](https://github.com/GanAHE/GNSSAMS)、[GNSS-Radar](https://github.com/taroz/GNSS-Radar)、[geodesy_modeling](https://github.com/kmaterna/geodesy_modeling)、[gnss-odometry](https://github.com/mgoar/gnss-odometry)、[Caster_Project](https://github.com/KOROyo123/Caster_Project)、[rviz_satellite](https://github.com/nobleo/rviz_satellite)、[gnatss](https://github.com/seafloor-geodesy/gnatss)、[gnssr_lowcost](https://github.com/purnelldj/gnssr_lowcost)、[satellite-position-calculation-mapping](https://github.com/egemengulpinar/satellite-position-calculation-mapping)、[SatellitePosition](https://github.com/LStudioLoren/SatellitePosition)、[GNSSTool](https://github.com/quectel-open-source/GNSSTool)、[pynex](https://github.com/swift-nav/pynex)、[pygnssutils](https://github.com/semuconsulting/pygnssutils)、[flipperzero-gps](https://github.com/ezod/flipperzero-gps)、[ROS-GPS](https://github.com/sigmaai/ROS-GPS)、[rtk-rs](https://github.com/rtk-rs)、[ge-gnss-visibility](https://github.com/taroz/ge-gnss-visibility)、[OpenRTK](https://github.com/AndreasArendt/OpenRTK)、[GNSS_RTK](https://github.com/SupakunZ/GNSS_RTK)、[LEOGPS](https://github.com/sammmlow/LEOGPS)、[GPSToolbox 投稿](https://geodesy.noaa.gov/gps-toolbox/exist.htm)、[barbeau-awesome-gnss 整理](https://github.com/barbeau/awesome-gnss)、[hdkarimi-awesome-gnss 整理](https://github.com/hdkarimi/awesome-gnss)、[mcraymer 整理](https://mcraymer.github.io/geodesy/index.html)、[Awesome-Geospatial 整理](https://github.com/sacridini/Awesome-Geospatial)、[GISResourcce 整理](https://gisresources.com/) | +| [**GNSS 数据处理**](导航定位建图开源项目记录.md#GNSS) | **[RTKLIB](https://www.rtklib.com/)**、[RTKLIB-Demo5](https://github.com/rtklibexplorer/RTKLIB)、[learning_rtklib](https://github.com/LiZhengXiao99/learning_rtklib)、[rtklib-py](https://github.com/rtklibexplorer/rtklib-py)、[pyrtklib](https://github.com/IPNL-POLYU/pyrtklib)、[GPS-RTKLIB-ARM-F407VG](https://github.com/ngochieu642/GPS-RTKLIB-ARM-F407VG)、[MALIB](https://github.com/JAXA-SNU/MALIB)、[MatRTKLIB](https://github.com/taroz/MatRTKLIB)、[Taroz-gsdc2023](https://github.com/taroz/gsdc2023)、[CSSRLib](https://github.com/hirokawa/cssrlib)、[rtklib_ros_bridge](https://github.com/MapIV/rtklib_ros_bridge)、[FiPPP](https://github.com/HuChao-gnss/FiPPP)、[rtkrcv_ros](https://github.com/ajbfinesc/rtkrcv_ros)、**[GAMP](https://geodesy.noaa.gov/gps-toolbox/GAMP.htm)**、[GAMPII-GOOD](https://github.com/zhouforme0318/GAMPII-GOOD)、**[Ginan](https://github.com/GeoscienceAustralia/ginan)**、**[goGPS](https://github.com/goGPS-Project/goGPS_MATLAB)**、[goGPS_Java](https://github.com/goGPS-Project/goGPS_Java)、[BNC](https://igs.bkg.bund.de/ntrip/bnc)、[GREAT-PVT](https://github.com/GREAT-WHU/GREAT-PVT)、[GFZRNX](https://dataservices.gfz-potsdam.de/panmetaworks/showshort.php?id=escidoc:1577894)、[GNSSLogger](https://github.com/google/gps-measurement-tools)、[georinex](https://github.com/geospace-code/georinex)、[GAMIT/GLOBK](http://geoweb.mit.edu/gg/)、[GraphGNSSLib](https://github.com/weisongwen/GraphGNSSLib)、[NavCodeMonitor](https://github.com/weisongwen/NavCodeMonitor)、[Net_Diff](https://github.com/YizeZhang/Net_Diff)、[laika](https://github.com/commaai/laika)、[CSRS-PPP](https://webapp.csrs-scrs.nrcan-rncan.gc.ca/geod/tools-outils/ppp.php)、[POSGO](https://github.com/lizhengnss/POSGO)、[Pride-PPPAR](https://github.com/PrideLab/PRIDE-PPPAR)、[PPPwizard](http://www.ppp-wizard.net/)、[GPSTk](https://github.com/SGL-UT/GPSTk)、[gnsstk](https://github.com/SGL-UT/gnsstk)、[gnsstk-apps](https://github.com/SGL-UT/gnsstk-apps)、[G-NUT/Anubis](https://www.pecny.cz/Joomla25/index.php/gnss/sw/anubis)、[Teqc](https://www.unavco.org/software/data-processing/teqc/teqc.html)、[RNXQCE](https://github.com/cuizilu/RNXQCE)、[Bernese](https://www.bernese.unibe.ch/)、[gLAB](https://github.com/valgur/gLAB?tab=readme-ov-file)、[Look4Sat](https://github.com/rt-bishop/Look4Sat)、[RobustGNSS](https://github.com/wvu-navLab/RobustGNSS)、[ntrip](https://github.com/sevensx/ntrip)、[rtcm](https://github.com/Node-NTRIP/rtcm)、[cors](https://github.com/Erensu/cors)、[VrsCaster](https://github.com/DoubleString/VrsCaster)、[gstream](https://github.com/Jin-Whu/gstream)、[ogrp](https://github.com/Fraunhofer-IIS/ogrp)、[centipede](https://github.com/CentipedeRTK/centipede)、[TouchRTKStation](https://github.com/taroz/TouchRTKStation)、[rtkbase](https://github.com/Stefal/rtkbase)、[GREAT-IFCB](https://github.com/GREAT-WHU/GREAT-IFCB)、[gnss_comm](https://github.com/HKUST-Aerial-Robotics/gnss_comm)、[PPP-BayesTree](https://github.com/wvu-navLab/PPP-BayesTree)、[gnsspy](https://github.com/GNSSpy-Project/gnsspy)、[gnssgo](https://github.com/FengXuebin/gnssgo)、[raPPPid](https://github.com/TUW-VieVS/raPPPid)、[gnss-compass-ros](https://github.com/MapIV/gnss_compass_ros)、[gnss-attitude](https://github.com/low-earth-orbit/gnss-attitude)、[FCB-FILES](https://github.com/FCB-SGG/FCB-FILES)、[MG_APP](https://github.com/XiaoGongWei/MG_APP)、[gps_amcl](https://github.com/midemig/gps_amcl)、[deep_gnss](https://github.com/Stanford-NavLab/deep_gnss)、[TSAnalyzer](https://github.com/wudingcheng/TSAnalyzer)、[GNSS-TimeSeries-Viewers](https://github.com/kmaterna/GNSS_TimeSeries_Viewers)、[RTKinGSS](https://github.com/shaolinbit/RTKinGSS)、[gnss_lib_py](https://github.com/Stanford-NavLab/gnss_lib_py)、[PNT-Integrity](https://github.com/cisagov/PNT-Integrity)、[GORS](https://github.com/lengyanyanjing/GORS)、[GDDS](https://geodesy.noaa.gov/gps-toolbox/gdds.shtml)、[FAST](https://github.com/ChangChuntao/FAST)、[QGOPDD](https://github.com/yhw605/QGOPDD)、[gnss-downloader](https://github.com/Mereithhh/gnss-downloader)、[groops](https://github.com/groops-devs/groops)、[georb](https://github.com/Thomas-Loudis/georb)、[madocalib](https://github.com/QZSS-Strategy-Office/madocalib)、[OREKIT](https://link.zhihu.com/?target=https%3A//www.orekit.org/)、[rt-clk-service](https://github.com/DoubleString/rt-clk-service)、[polaris](https://github.com/PointOneNav/polaris)、[gnss-tec](https://github.com/gnss-lab/gnss-tec)、[utm](https://github.com/sfegan/utm)、[PW-from-GPS](https://github.com/ZiskinZiv/PW_from_GPS)、[GNSS-Multipath-Analysis-Software](https://github.com/paarnes/GNSS_Multipath_Analysis_Software)、[gnss-multipath-detector](https://github.com/EvgeniiMunin/gnss-multipath-detector)、[GNSS-Shadowing](https://github.com/xaedes/GNSS-Shadowing)、[gnssIR-python](https://github.com/kristinemlarson/gnssIR_python)、[GARNO](https://github.com/geoios/GARNO)、[GPSPACE](https://github.com/CGS-GIS/GPSPACE)、[GNSSDataQC](https://github.com/GNSS-FUN/GNSSDataQC)、[gnssr-synth](https://github.com/purnelldj/gnssr_synth)、[gnssIR-matlab-v3](https://github.com/kristinemlarson/gnssIR_matlab_v3)、[gnssrefl](https://github.com/kristinemlarson/gnssrefl)、[gnss2tws-green](https://github.com/jzshhh/gnss2tws_green)、[gnssSNR](https://github.com/kristinemlarson/gnssSNR)、[mphw](https://github.com/fgnievinski/mphw)、[hgpt_model](https://github.com/pjmateus/hgpt_model)、[GNSSR_MERRByS](https://github.com/pjalesSSTL/GNSSR_MERRByS)、[PyGPSClient](https://github.com/semuconsulting/PyGPSClient)、[STM32Primer2-GNSS-Tracker](https://github.com/nemuisan/STM32Primer2_GNSS_Tracker)、[STM32-GNSS](https://github.com/SimpleMethod/STM32-GNSS)、[GNSSTimeServer](https://github.com/Montecri/GNSSTimeServer)、[GNSS_Clock](https://github.com/stevemarple/GNSS_Clock)、[AgOpenGPS](https://github.com/farmerbriantee/AgOpenGPS)、[nmea-msgs](https://github.com/ros-drivers/nmea_msgs)、[LilyGo-LoRa-Series](https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series)、[HASlib](https://github.com/nlsfi/HASlib)、[HASPPP](https://github.com/ZhangRunzhi20/HASPPP)、[NavDecoder](https://github.com/NavSesne/NavDecoder)、[OSNMA](https://github.com/Algafix/OSNMA)、[galileo-osnma](https://github.com/daniestevez/galileo-osnma)、[GNSSAMS](https://github.com/GanAHE/GNSSAMS)、[geodetic_utils](https://github.com/ethz-asl/geodetic_utils)、[ppp-tools](https://github.com/aewallin/ppp-tools)、[gpstest](https://github.com/barbeau/gpstest)、[iSniff-GPS](https://github.com/hubert3/iSniff-GPS)、[hypatia](https://github.com/snkas/hypatia)、[gps-measurement-tools](https://github.com/google/gps-measurement-tools)、[FE-GUT](https://github.com/zhaoqj23/FE-GUT)、[gnss-RX](https://github.com/HeryMwenegoha/gnss-RX)、[Pypredict](https://github.com/spel-uchile/Pypredict)、[novatel-gps-driver](https://github.com/swri-robotics/novatel_gps_driver)、[GNSSAMS](https://github.com/GanAHE/GNSSAMS)、[GNSS-Radar](https://github.com/taroz/GNSS-Radar)、[geodesy_modeling](https://github.com/kmaterna/geodesy_modeling)、[gnss-odometry](https://github.com/mgoar/gnss-odometry)、[Caster_Project](https://github.com/KOROyo123/Caster_Project)、[rviz_satellite](https://github.com/nobleo/rviz_satellite)、[gnatss](https://github.com/seafloor-geodesy/gnatss)、[gnssr_lowcost](https://github.com/purnelldj/gnssr_lowcost)、[satellite-position-calculation-mapping](https://github.com/egemengulpinar/satellite-position-calculation-mapping)、[SatellitePosition](https://github.com/LStudioLoren/SatellitePosition)、[GNSSTool](https://github.com/quectel-open-source/GNSSTool)、[pynex](https://github.com/swift-nav/pynex)、[pygnssutils](https://github.com/semuconsulting/pygnssutils)、[flipperzero-gps](https://github.com/ezod/flipperzero-gps)、[ROS-GPS](https://github.com/sigmaai/ROS-GPS)、[rtk-rs](https://github.com/rtk-rs)、[ge-gnss-visibility](https://github.com/taroz/ge-gnss-visibility)、[OpenRTK](https://github.com/AndreasArendt/OpenRTK)、[GNSS_RTK](https://github.com/SupakunZ/GNSS_RTK)、[LEOGPS](https://github.com/sammmlow/LEOGPS)、[GPSToolbox 投稿](https://geodesy.noaa.gov/gps-toolbox/exist.htm)、[barbeau-awesome-gnss 整理](https://github.com/barbeau/awesome-gnss)、[hdkarimi-awesome-gnss 整理](https://github.com/hdkarimi/awesome-gnss)、[mcraymer 整理](https://mcraymer.github.io/geodesy/index.html)、[Awesome-Geospatial 整理](https://github.com/sacridini/Awesome-Geospatial)、[GISResourcce 整理](https://gisresources.com/) | | **[GNSS 信号处理](导航定位建图开源项目记录.md#GNSS-Signal)** | **[GNSS-SDR](https://github.com/gnss-sdr/gnss-sdr)**、[gnss-sdr-monitor](https://github.com/acebrianjuan/gnss-sdr-monitor)、**[SoftGNSS](https://github.com/kristianpaul/SoftGNSS)**、[SoftGNSS-python](https://github.com/perrysou/SoftGNSS-python)、**[PocketSDR](https://github.com/tomojitakasu/PocketSDR)**、[GNSS-SDRLIB](https://github.com/taroz/GNSS-SDRLIB)、[nut2nt](https://github.com/amungo/nut2nt)、[Beagle_SDR_GPS](https://github.com/jks-prv/Beagle_SDR_GPS)、[KiwiSDR](https://forum.kiwisdr.com/)、[FlyDog-SDR-GPS](https://github.com/flydog-sdr/FlyDog_SDR_GPS)、[FlyCat-SDR-GPS](https://github.com/flydog-sdr/FlyCat_SDR_GPS)、[Full_Stack_GPS_Receiver](https://github.com/hamsternz/Full_Stack_GPS_Receiver)、[BDS-3-B1C-B2a-SDR-receiver](https://github.com/lyf8118/BDS-3-B1C-B2a-SDR-receiver)、[FGI-GSRx](https://github.com/nlsfi/FGI-GSRx)、[gypsum](https://github.com/codyd51/gypsum)、[sydr](https://github.com/aproposorg/sydr)、[NavLab-DPE-SDR](https://github.com/Stanford-NavLab/NavLab-DPE-SDR)、[multi-channel-gnss](https://github.com/dasdboot/multi-channel-gnss)、[GPUAcceleratedTracking](https://github.com/coezmaden/GPUAcceleratedTracking)、[GNSS-GPS-SDR](https://github.com/JiaoXianjun/GNSS-GPS-SDR)、[SDR-GPS-SPOOF](https://github.com/B44D3R/SDR-GPS-SPOOF)、[gps](https://github.com/psas/gps)、[SnapperGPS](https://snappergps.info/)、[snapshot-gnss-algorithms](https://github.com/JonasBchrt/snapshot-gnss-algorithms)、[gnss-sdr-1pps](https://github.com/oscimp/gnss-sdr-1pps)、[SatDump](https://github.com/SatDump/SatDump)、[gps-sdr-simulink](https://github.com/dmiralles2009/gps-sdr-simulink)、[gps-sdr-sim](https://github.com/osqzss/gps-sdr-sim)、[beidou-sdr-sim](https://github.com/yangfan852219770/beidou-sdr-sim)、[galileo-sdr-sim](https://github.com/harshadms/galileo-sdr-sim)、[gps-qzss-sdr-sim](https://github.com/iGNSS/gps-qzss-sdr-sim)、[multi-sdr-gps-sim](https://github.com/Mictronics/multi-sdr-gps-sim)、[pluto-gps-sim](https://github.com/Mictronics/pluto-gps-sim)、[SignalSim](https://github.com/globsky/SignalSim)、[Microsat-gps-sim](https://github.com/niklasknoell/Microsat-gps-sim)、[GPS_GAL_SSS](https://github.com/domonforyou/GPS_GAL_SSS)、[greta-oto](https://github.com/globsky/greta-oto)、[BD3_FPGA](https://github.com/whc2uestc/BD3_FPGA)、[GNSS-matlab](https://github.com/danipascual/GNSS-matlab)、[oresat-gps-software](https://github.com/oresat/oresat-gps-software)/[hardware](https://github.com/oresat/oresat-gps-hardware)、[MAX2769FT2232H](https://github.com/WKyleGilbertson/MAX2769FT2232H)、[SDR-GB-SAR](https://github.com/jmfriedt/SDR-GB-SAR)、[gps-rf-frontend-sim](https://github.com/iliasam/gps_rf_frontend_sim)、[GNSS-VHDL](https://github.com/danipascual/GNSS-VHDL)、[GNSS-Metadata-Standard](https://github.com/IonMetadataWorkingGroup/GNSS-Metadata-Standard)、[gnss-baseband](https://github.com/j-core/gnss-baseband)、[GPSMAXIM2769b-](https://github.com/vaidhyamookiah/GPSMAXIM2769b-)、[Analog-GPS-data-receiver](https://github.com/leaningktower/Analog-GPS-data-receiver)、[GNSS_Firehose](https://github.com/pmonta/GNSS_Firehose)、[GNSS-DSP-tools](https://github.com/pmonta/GNSS-DSP-tools)、[hard_sydr](https://github.com/aproposorg/hard_sydr)、[B1C-Signals-Simulation](https://github.com/pandaclover/B1C_Signals_Simulation)、[CU-SDR-Collection](https://github.com/gnsscusdr/CU-SDR-Collection)、[ESP32-SDR-GPS](https://github.com/iliasam/ESP32_SDR_GPS)、[STM32F4-SDR-GPS](https://github.com/iliasam/STM32F4_SDR_GPS)、[Fast-GNSS-ReceiverMATLAB](https://github.com/JohnBagshaw/Fast_GNSS_ReceiverMATLAB)、[gnss-sdr-rs](https://github.com/kewei/gnss-sdr-rs)、[sdr-beamforming](https://github.com/ADolbyB/sdr-beamforming)、[gr-gnMAX2769](https://github.com/wkazubski/gr-gnMAX2769)、[gps-sdr](https://github.com/gps-sdr/gps-sdr)、[GPSL1-DPEmodule](https://github.com/Sergio-Vicenzo/GPSL1-DPEmodule)、[esp2822_NMEA_sim](https://github.com/michalpelka/esp2822_NMEA_sim)、[BDS_SDR](https://github.com/nkyang/BDS_SDR) | | **[INS、组合导航](导航定位建图开源项目记录.md#INS)** | [INS_Course_Matlab](https://github.com/LiZhengXiao99/INS_Course_Matlab)、**[PSINS](http://www.psins.org.cn/)**、[Android-PSINSToolbox](https://gitee.com/tmrnic/android-psinstoolbox)、[PSINS-ROS](https://github.com/BohemianRhapsodyz/PSINS-ROS)、[PSINS-Develop-Group](https://github.com/Cattle521/PSINS-Develop-Group)、[PSINS_FIMU](https://github.com/georgenwpu/PSINS_FIMU)、**[KF-GINS](https://github.com/i2Nav-WHU/KF-GINS)**、[KF_GINS_GUI](https://github.com/Wang-Jie-Lucid-Sheep/KF_GINS_GUI)、[py_IMU](https://github.com/Dennissy23/py_IMU)、**[OB-GINS](https://github.com/i2Nav-WHU/OB_GINS)**、**[TGINS](https://github.com/heiwa0519/TGINS)**、[PPPLIB](https://geodesy.noaa.gov/gps-toolbox/PPPLib.htm)、[Compass](https://gitee.com/hw_cc/compass)、[GINAV](https://github.com/kaichen686/GINav)/[v2.0](https://github.com/kaichen686/GINav_v2.0-test)、[IGNAV](https://github.com/Erensu/ignav)、[MATLAB-Groves](https://github.com/zbai/MATLAB-Groves)、[GIOW-release](https://github.com/i2Nav-WHU/GIOW-release)、[imu_x_fusion](https://github.com/cggos/imu_x_fusion)、[OpenIMU](https://github.com/introlab/OpenIMU)、[ronin](https://github.com/Sachini/ronin)、[RINS-W](https://github.com/mbrossar/RINS-W)、[invensense-imu](https://github.com/bolderflight/invensense-imu)、[eagleye](https://github.com/MapIV/eagleye)、[ai-imu-dr](https://github.com/mbrossar/ai-imu-dr)、[NaveCodePro](https://github.com/zelanzou/NaveCodePro)、[InertialNav](https://github.com/priseborough/InertialNav)、[allan-variance-ros](https://github.com/ori-drs/allan_variance_ros)、[eskf_localization](https://github.com/Arcanain/eskf_localization)、[imu_gnss_eskf](https://github.com/zouyajing/imu_gnss_eskf)、[nav_matlab](https://github.com/yandld/nav_matlab)、[imu_zupt](https://github.com/Fixit-Davide/imu_zupt)、[IEZ](https://github.com/pajaraca/IEZ)、[ZUPT-aided-INS](https://github.com/hcarlsso/ZUPT-aided-INS)、[gnss-ins-zupt](https://github.com/wvu-navLab/gnss-ins-zupt)、[corenav-GP](https://github.com/wvu-navLab/corenav-GP)、[kalibr](https://github.com/ethz-asl/kalibr)、[kalibr_allan](https://github.com/rpng/kalibr_allan)、[allan_variance_ros](https://github.com/ori-drs/allan_variance_ros)、[allan_variance](https://github.com/GAVLab/allan_variance)、[imu_allan](https://github.com/alalagong/imu_allan)、[allan_ros2](https://github.com/CruxDevStuff/allan_ros2)、[AdevAnalysis](https://github.com/itsuhane/AdevAnalysis)、[imu-data-simulation](https://github.com/robosu12/imu_data_simulation)、[GPS_IMU_Kalman_Filter](https://github.com/karanchawla/GPS_IMU_Kalman_Filter)、[TightlyCoupledINSGNSS](https://github.com/benzenemo/TightlyCoupledINSGNSS)、[stm32f4_mpu9250](https://github.com/suhetao/stm32f4_mpu9250)、[mpu6050](https://github.com/libdriver/mpu6050)、[mpu9250](https://github.com/libdriver/mpu9250)、[FastIMU](https://github.com/LiquidCGS/FastIMU)、[Wheel-INS ](https://github.com/i2Nav-WHU/Wheel-INS)、[GNSS-INS](https://github.com/hitleeleo/GNSS-INS)、[pyshoe](https://github.com/utiasSTARS/pyshoe)、[imu_tools](https://github.com/CCNYRoboticsLab/imu_tools)、[IMUCalibration-Gesture](https://github.com/shenshikexmu/IMUCalibration-Gesture)、[ImuCalibration-Poistion](https://github.com/shenshikexmu/ImuCalibration-Poistion)、[imu_utils](https://github.com/gaowenliang/imu_utils)、[GyroAllan](https://github.com/XinLiGH/GyroAllan)、[gnss-ins-sim](https://github.com/Aceinna/gnss-ins-sim)、[MEMS-IMU-Denoising](https://github.com/ansfl/MEMS-IMU-Denoising)、[agrobot](https://github.com/nesl/agrobot)、[IBG_EKF_TC](https://github.com/Dennissy23/IBG_EKF_TC)、[ZCJ-GNSSINS-DeepIntegration](https://github.com/kongtian-SiBu/ZCJ_GNSSINS_DeepIntegration)、[Smartphone-IMU-GPS](https://github.com/alexschultze/Smartphone_IMU_GPS)、[INSTINCT](https://github.com/UniStuttgart-INS/INSTINCT)、[Gait-Tracking](https://github.com/xioTechnologies/Gait-Tracking)、[Machine-Learning-GNSS-IMU-Integration](https://github.com/Akpozi/Machine_Learning_GNSS_IMU_Integration)、[ImuCalibration-Poistion](https://github.com/shenshikexmu/ImuCalibration-Poistion)、[ ADIS16470-Arduino-Teensy](https://github.com/juchong/ADIS16470_Arduino_Teensy)、[Seeed_ADIS16470](https://github.com/Seeed-Studio/Seeed_ADIS16470)、[iXR_GNSS-IMU_TightlyCouplingProgram](https://github.com/kakusang2020/iXR_GNSS-IMU_TightlyCouplingProgram)、[KalmanFilter_Vehicle_GNSS_INS](https://github.com/alirezaahmadi/KalmanFilter-Vehicle-GNSS-INS)、[GPS_Milemeter_IMU_EKFLocation](https://github.com/gilbertz/GPS_Milemeter_IMU_EKFLocation)、[IMUNet](https://github.com/BehnamZeinali/IMUNet)、[SmartIMU](https://github.com/KitSprout/SmartIMU)、[IMUSensorModels](https://github.com/hanley6/IMUSensorModels)、[imu_gps_localization](https://github.com/ydsf16/imu_gps_localization)、[dcm-imu](https://github.com/hhyyti/dcm-imu)、[denoise_imu_gyro](https://github.com/mbrossar/denoise-imu-gyro)、[vectornav](https://github.com/dawonn/vectornav)、[OpenIMUFilter](https://github.com/hustcalm/OpenIMUFilter)、[9DOF_Razor_IMU](https://github.com/sparkfun/9DOF_Razor_IMU)、[IMU_Attitude_Estimator](https://github.com/gaochq/IMU_Attitude_Estimator)、[SparkFun_LSM9DS1_Arduino_Library](https://github.com/sparkfun/SparkFun_LSM9DS1_Arduino_Library)、[imu_pipeline](https://github.com/ros-perception/imu_pipeline)、[ESEKF_IMU](https://github.com/aipiano/ESEKF_IMU)、[IMA-estimation](https://github.com/QIJINCHEN/IMA-estimation)、[fusion](https://github.com/Guo-ziwei/fusion)、[Indirect_EKF_IMU_GPS](https://github.com/hgpvision/Indirect_EKF_IMU_GPS)、[gps_imu_fusion](https://github.com/Shelfcol/gps_imu_fusion)、[imu_ekf](https://github.com/mrsp/imu_ekf)、[x-IMU-GUI](https://github.com/xioTechnologies/x-IMU-GUI)、[ekf-imu-depth](https://github.com/SenZHANG-GitHub/ekf-imu-depth)、[imu_tk_matlab](https://github.com/JzHuai0108/imu_tk_matlab)、[imu_tk](https://github.com/Kyle-ak/imu_tk)、[IMU_Preintegration](https://github.com/ujasmandavia/IMU_Preintegration)、[RTIMULib2](https://github.com/HongshiTan/RTIMULib2)、[imu_to_odom](https://github.com/nadiawangberg/imu_to_odom)、[imu-human-pose-pytorch](https://github.com/CHUNYUWANG/imu-human-pose-pytorch)、[IMU-Array](https://github.com/i2Nav-WHU/IMU-Array)、[IMUPoser](https://github.com/FIGLAB/IMUPoser)、[IMUDB](https://github.com/KleinYuan/IMUDB)、[har_with_imu_transformer](https://github.com/yolish/har-with-imu-transformer)、[EyeMU](https://github.com/FIGLAB/EyeMU)、[Attitude-Estimation](https://github.com/pms67/Attitude-Estimation)、[Activity_Detection_using_IMU_sensor](https://github.com/mohan-mj/Activity-Detection-using-IMU-sensor)、[lwoi](https://github.com/CAOR-MINES-ParisTech/lwoi)、[InvariantEKF_GNSS_IMU](https://github.com/mfkiwl/InvariantEKF_GNSS_IMU)、[imu_veh_calib](https://github.com/smallsunsun1/imu_veh_calib)、[ImuMeanFilter](https://github.com/XinLiGH/ImuMeanFilter)、[kalman_filter_with_kitti](https://github.com/motokimura/kalman_filter_with_kitti)、[ImuGpsGuiding](https://github.com/JackJu-HIT/ImuGpsGuiding)、[OpenSimRT](https://github.com/mitkof6/OpenSimRT)、[RTD_phone](https://github.com/milkytipo/RTD_phone)、[ADIS16470_Demo](https://github.com/wmdscjhdpy/ADIS16470_Demo)、[odom_predictor](https://github.com/ethz-asl/odom_predictor)、[robot_pose_ekf](https://github.com/udacity/robot_pose_ekf)、[UKF](https://github.com/krishnasandeep09/UKF)、[gnss-sensor-fusion](https://github.com/betaBison/gnss-sensor-fusion)、[amsi](https://github.com/weisongwen/amsi)、[EgoLocate](https://github.com/Xinyu-Yi/EgoLocate)、[learned_inertial_model_odometry](https://github.com/uzh-rpg/learned_inertial_model_odometry)、[MadgwickAHRS](https://github.com/arduino-libraries/MadgwickAHRS)、[integrated-navigation](https://github.com/XDDz123/integrated-navigation)、[KGP-IAEKF-IGGIII](https://github.com/chi-qhsun/KGP-IAEKF-IGGIII)、[navfusion](https://github.com/nvpadron/navfusion)、[Madgwick_Filter](https://github.com/bjohnsonfl/Madgwick_Filter)、[UrbanRTK-INS-OutlierOpt](https://github.com/Azurehappen/UrbanRTK-INS-OutlierOpt)、[SCH63T_MINI_EVK](https://github.com/tomojitakasu/SCH63T_MINI_EVK)、[GPS_IMU_Kalman_Filter](https://github.com/karanchawla/GPS_IMU_Kalman_Filter)、[Location](https://github.com/yyccR/Location)、[waypoint_nav](https://github.com/nickcharron/waypoint_nav)、[GIOW-release](https://github.com/i2Nav-WHU/GIOW-release)、[pyins](https://github.com/nmayorov/pyins)、[GINS-Navi](https://github.com/lewis5499/GINS-Navi)、[GNSS_INS_Integrations_Comparisons](https://github.com/ZhengdaoLI0602/GNSS_INS_Integrations_Comparisons)、[KF-GINS-ECEF](https://github.com/akui1321/KF-GINS-ECEF)、[TDL-GNSS](https://github.com/ebhrz/TDL-GNSS) | | **[视觉 SLAM](导航定位建图开源项目记录.md#Vision)** | **[Vins-Mono](https://github.com/HKUST-Aerial-Robotics/VINS-Mono)/[Fusion](https://github.com/HKUST-Aerial-Robotics/VINS-Fusion)**、**[ORB-SLAM3](https://github.com/UZ-SLAMLab/ORB_SLAM3)**/[2](https://github.com/raulmur/ORB_SLAM2)/[1](https://github.com/raulmur/ORB_SLAM)、[OpenVINS](https://github.com/rpng/open_vins)、[Openvslam](https://github.com/xdspacelab/openvslam)、[svo](https://github.com/uzh-rpg/rpg_svo)、[svo_pro](https://github.com/uzh-rpg/rpg_svo_pro_open)、[msckf_vio](https://github.com/KumarRobotics/msckf_vio)、[okvis](https://github.com/ethz-asl/okvis)、[DM-VIO](https://github.com/lukasvst/dm-vio)、[DSO](https://github.com/JakobEngel/dso)、[DSOL](https://github.com/versatran01/dsol)、[wildnav](https://github.com/TIERS/wildnav)、[NeRF](https://github.com/bmild/nerf)、[H3](https://github.com/SYSU-STAR/H3-Mapping)/[H2-Mapping](https://github.com/SYSU-STAR/H2-Mapping)、[gaussian-splatting](https://github.com/graphdeco-inria/gaussian-splatting)、[2d-gaussian-splatting](https://github.com/hbb1/2d-gaussian-splatting)、[Elasticfusion](https://github.com/mp3guy/ElasticFusion)、[OpenMVG](https://github.com/openMVG/openMVG)、[Meshroom](https://github.com/alicevision/Meshroom)、[Kintinuous](https://github.com/mp3guy/Kintinuous)、[Mvision](https://github.com/Ewenwan/MVision)、[rgbdslam_v2](https://github.com/felixendres/rgbdslam_v2)、[camera_calibration](https://github.com/puzzlepaint/camera_calibration)、[crisp](https://github.com/hovren/crisp)、[VideoIMUCapture-Android](https://github.com/DavidGillsjo/VideoIMUCapture-Android)、[OpenImuCameraCalibrator](https://github.com/urbste/OpenImuCameraCalibrator)、[Structure-SLAM-PointLine](https://github.com/yanyan-li/Structure-SLAM-PointLine)、[SLAM_interface](https://github.com/Tompson11/SLAM_interface)、[Sync_Pola_IMU_ROS](https://github.com/BlanchonMarc/Sync_Pola_IMU_ROS)、[ViDAR](https://github.com/OpenDriveLab/ViDAR)、[BEVFormer](https://github.com/fundamentalvision/BEVFormer)、[aruco_ekf_slam](https://github.com/ydsf16/aruco_ekf_slam)、[ AVP-SLAM-SIM](https://github.com/TurtleZhong/AVP-SLAM-SIM)、[MSCKF_VIO_MONO](https://github.com/UMiNS/MSCKF_VIO_MONO)、[VIW-Fusion](https://github.com/TouchDeeper/VIW-Fusion)、[awesome-visual-slam 整理](https://github.com/tzutalin/awesome-visual-slam)、[Recent_SLAM_Research 整理](https://github.com/YiChenCityU/Recent_SLAM_Research)、[Awesome CV Works 整理](https://vincentqin.tech/posts/awesome-works/)、[Lee-SLAM-source 整理](https://github.com/AlbertSlam/Lee-SLAM-source)、[Awesome-SLAM 整理](https://github.com/SilenceOverflow/Awesome-SLAM)、[awesome-slam 整理](https://github.com/kanster/awesome-slam)、[Awesome_Dynamic_SLAM 整理](https://github.com/zhuhu00/Awesome_Dynamic_SLAM)、[awesome-NeRF 整理](https://github.com/awesome-NeRF/awesome-NeRF)、[visual-slam-roadmap 整理](https://github.com/changh95/visual-slam-roadmap)、[Visual_SLAM_Related_Research 整理](https://github.com/wuxiaolang/Visual_SLAM_Related_Research)、[vins-application 整理](https://github.com/engcang/vins-application)、[Recent-Stars-2024 整理](https://github.com/Vincentqyw/Recent-Stars-2024)、[Visual Navigation 整理](https://paperswithcode.com/task/visual-navigation)、[Awesome-Optical-Flow 整理](https://github.com/hzwer/Awesome-Optical-Flow)、[awesome-Implicit-NeRF-SLAM 整理](https://github.com/DoongLi/awesome-Implicit-NeRF-SLAM)、[awesome-computer-vision 整理](https://github.com/jbhuang0604/awesome-computer-vision)、[awesome-semantic-segmentation 整理](https://github.com/mrgloom/awesome-semantic-segmentation)、[awesome_3d_slam_resources 整理](https://github.com/qxiaofan/awesome_3d_slam_resources)、[awesome-road-environment-segmentation 整理](https://github.com/DaveLogs/awesome-road-environment-segmentation)、[Awesome-BEV-Perception-Multi-Cameras 整理](https://github.com/chaytonmin/Awesome-BEV-Perception-Multi-Cameras) |