目录
编辑 第4章 判断两个观测数据是否属于同一个历元的时间容差参数(DTTOL)
5.1 、MAXDTOE_* 宏系列 —— 星历有效时间窗口
5.2 #define MAXGDOP 300.0 —— 最大几何精度因子容差
编辑 第7章 缓存容量、数组大小、数据字段限制等“最大限制量”参数
第9章 观测类型(observation type) 和 频率类型(frequency type) 的分类标志
第1章 各卫星系统的编号范围与卫星数量的设置核心
#define SNR_UNIT 0.001 /* SNR unit (dBHz) */
#define MINPRNGPS 1 /* min satellite PRN number of GPS */
#define MAXPRNGPS 32 /* max satellite PRN number of GPS */
#define NSATGPS (MAXPRNGPS-MINPRNGPS+1) /* number of GPS satellites */
#define NSYSGPS 1
#ifdef ENAGLO
#define MINPRNGLO 1 /* min satellite slot number of GLONASS */
#define MAXPRNGLO 27 /* max satellite slot number of GLONASS */
#define NSATGLO (MAXPRNGLO-MINPRNGLO+1) /* number of GLONASS satellites */
#define NSYSGLO 1
#else
#define MINPRNGLO 0
#define MAXPRNGLO 0
#define NSATGLO 0
#define NSYSGLO 0
#endif
#ifdef ENAGAL
#define MINPRNGAL 1 /* min satellite PRN number of Galileo */
#define MAXPRNGAL 36 /* max satellite PRN number of Galileo */
#define NSATGAL (MAXPRNGAL-MINPRNGAL+1) /* number of Galileo satellites */
#define NSYSGAL 1
#else
#define MINPRNGAL 0
#define MAXPRNGAL 0
#define NSATGAL 0
#define NSYSGAL 0
#endif
#ifdef ENAQZS
#define MINPRNQZS 193 /* min satellite PRN number of QZSS */
#define MAXPRNQZS 202 /* max satellite PRN number of QZSS */
#define MINPRNQZS_S 183 /* min satellite PRN number of QZSS L1S */
#define MAXPRNQZS_S 191 /* max satellite PRN number of QZSS L1S */
#define NSATQZS (MAXPRNQZS-MINPRNQZS+1) /* number of QZSS satellites */
#define NSYSQZS 1
#else
#define MINPRNQZS 0
#define MAXPRNQZS 0
#define MINPRNQZS_S 0
#define MAXPRNQZS_S 0
#define NSATQZS 0
#define NSYSQZS 0
#endif
#ifdef ENACMP
#define MINPRNCMP 1 /* min satellite sat number of BeiDou */
#define MAXPRNCMP 63 /* max satellite sat number of BeiDou */
#define NSATCMP (MAXPRNCMP-MINPRNCMP+1) /* number of BeiDou satellites */
#define NSYSCMP 1
#else
#define MINPRNCMP 0
#define MAXPRNCMP 0
#define NSATCMP 0
#define NSYSCMP 0
#endif
#ifdef ENAIRN
#define MINPRNIRN 1 /* min satellite sat number of IRNSS */
#define MAXPRNIRN 14 /* max satellite sat number of IRNSS */
#define NSATIRN (MAXPRNIRN-MINPRNIRN+1) /* number of IRNSS satellites */
#define NSYSIRN 1
#else
#define MINPRNIRN 0
#define MAXPRNIRN 0
#define NSATIRN 0
#define NSYSIRN 0
#endif
#ifdef ENALEO
#define MINPRNLEO 1 /* min satellite sat number of LEO */
#define MAXPRNLEO 10 /* max satellite sat number of LEO */
#define NSATLEO (MAXPRNLEO-MINPRNLEO+1) /* number of LEO satellites */
#define NSYSLEO 1
#else
#define MINPRNLEO 0
#define MAXPRNLEO 0
#define NSATLEO 0
#define NSYSLEO 0
#endif
#define NSYS (NSYSGPS+NSYSGLO+NSYSGAL+NSYSQZS+NSYSCMP+NSYSIRN+NSYSLEO) /* number of systems */
部分宏定义在 RTKLIB 中是 各卫星系统的编号范围与卫星数量的设置核心,用于:
-
卫星 PRN 范围设置;
-
支持系统数量统计;
-
给
obs_t,nav_t等结构体分配空间; -
在解析数据时识别所属系统。
#define SNR_UNIT 0.001
-
含义:信噪比单位,单位为 0.001 dBHz;
-
在
obsd_t结构中,SNR[NFREQ]是unsigned char类型(0–255),所以:
-
实际使用中通常会乘以 25 或 0.25(根据 RTCM 解码而定)重新归一化。
1.1 GPS 卫星编号范围设置
#define MINPRNGPS 1
#define MAXPRNGPS 32
#define NSATGPS (MAXPRNGPS - MINPRNGPS + 1) // = 32
#define NSYSGPS 1
-
表示 GPS 系统 PRN 范围是 1~32;
-
NSATGPS=32:支持 GPS 共 32 颗卫星; -
NSYSGPS=1:系统数量统计,用于NSYS汇总。
1.2 GLONASS
#ifdef ENAGLO
#define MINPRNGLO 1
#define MAXPRNGLO 27
#define NSATGLO 27
#define NSYSGLO 1
#else
#define NSATGLO 0
#define NSYSGLO 0
#endif
-
仅在定义
ENAGLO时才启用; -
表示 GLONASS slot ID 编号为 1~27;
-
共 27 个可用 slot(并不总是有 27 颗星);
-
与 GPS 区分的依据就是 PRN 范围。
1.3 Galileo
#ifdef ENAGAL
#define MINPRNGAL 1
#define MAXPRNGAL 36
#define NSATGAL 36
#define NSYSGAL 1
#else
...
-
Galileo PRN 编号:1~36;
-
实际部署卫星数 < 36,但保留了最大可能空间;
-
通常用于识别 E1/E5a/E5b/E6 信号。
1.4 QZSS(准天顶)
#ifdef ENAQZS
#define MINPRNQZS 193
#define MAXPRNQZS 202
#define NSATQZS 10
#define NSYSQZS 1
-
QZSS 的 PRN 编号为 193~202,符合 ICD 规定;
-
MINPRNQZS_S、MAXPRNQZS_S是用于 QZSS L1S 安全信号专用编号(183~191); -
NSATQZS = 10,表示最大支持 10 颗准天顶卫星; -
常用于日本地区的增强应用。
1.5 BeiDou(北斗)
#ifdef ENACMP
#define MINPRNCMP 1
#define MAXPRNCMP 63
#define NSATCMP 63
#define NSYSCMP 1
-
北斗卫星编号:1~63(包括 BDS-2、BDS-3);
-
支持的信号包括 B1I/B1C、B2I/B2b、B3;
-
在 GNSS 解算中应用非常广泛。
1.6 IRNSS(印度)
#ifdef ENAIRN
#define MINPRNIRN 1
#define MAXPRNIRN 14
#define NSATIRN 14
#define NSYSIRN 1
-
IRNSS 编号 1~14;
-
区域系统,目前星座数较少;
-
在印度及周边地区有效。
1..7 LEO(低轨)
#ifdef ENALEO
#define MINPRNLEO 1
#define MAXPRNLEO 10
#define NSATLEO 10
#define NSYSLEO 1
-
预留 LEO(如 Starlink、TLE仿真)支持;
-
实际 RTKLIB 中未完全实现 LEO 定位功能;
-
若开启
#define ENALEO,可启用对 LEO 卫星支持。
1.8 #define NSYS (...)
#define NSYS (NSYSGPS+NSYSGLO+NSYSGAL+NSYSQZS+NSYSCMP+NSYSIRN+NSYSLEO)
-
表示启用的导航系统总数;
-
该宏常用于给滤波器、矩阵或图形界面动态分配空间或标签。
-
例如,只启用了 GPS + GLO + BDS:

第2章 SBAS 卫星、总卫星数与站点数
#define MINPRNSBS 120 /* min satellite PRN number of SBAS */
#define MAXPRNSBS 158 /* max satellite PRN number of SBAS */
#define NSATSBS (MAXPRNSBS-MINPRNSBS+1) /* number of SBAS satellites */
#define MAXSAT (NSATGPS+NSATGLO+NSATGAL+NSATQZS+NSATCMP+NSATIRN+NSATSBS+NSATLEO)
/* max satellite number (1 to MAXSAT) */
#define MAXSTA 255
这部分宏定义继续补充了 RTKLIB 中用于管理 SBAS 卫星、总卫星数与站点数 的核心参数。它们直接决定了:
-
RTKLIB 所支持的最大卫星编号;
-
支持的 SBAS 编号范围;
-
接收机或参考站的最大数量。
#define MINPRNSBS 120 /* min satellite PRN number of SBAS */
#define MAXPRNSBS 158 /* max satellite PRN number of SBAS */
-
表示 SBAS(卫星增强系统)的卫星编号范围是 PRN 120 ~ 158;
-
符合 SBAS 编号规范,涵盖常见增强系统:
-
WAAS(美国)
-
EGNOS(欧洲)
-
MSAS(日本)
-
GAGAN(印度)
-
-
用于识别观测数据中是否为 SBAS 卫星;

最低0.47元/天 解锁文章
1553





