这里写自定义目录标题
写在前面
自己的测试环境:
Ubuntu20.04, ROS-Noetic (本文对与ROS 的各个版本都适用)
这里主要是对 nmea_msgs/Sentence
sensor_msgs/NavSatFix
这两个话题类型含义进行解释.
一、话题类型 sensor_msgs/NavSatFix
各个数据含义解释
在已安装ROS-Noetic
的 电脑目录 /opt/ros/noetic/share/sensor_msgs/msg/NavSatFix.msg
中原 msg
定义如下:
(注意:下面的 satellite fix status information 是 卫星定位状态信息,这个状态标志的具体解释见: 二、话题类型 sensor_msgs/NavSatStatus
)
# Navigation Satellite fix for any Global Navigation Satellite System # 任何全球导航卫星系统的导航卫星定位
#
# Specified using the WGS 84 reference ellipsoid # 指定使用 WGS 84 参考椭球体
# header.stamp specifies the ROS time for this measurement (the
# corresponding satellite time may be reported using the
# sensor_msgs/TimeReference message).
# header.stamp 指定该测量的ROS时间(可以使用sensor_msgs/TimeReference消息来报告相应的卫星时间).
# header.frame_id is the frame of reference reported by the satellite
# receiver, usually the location of the antenna. This is a
# Euclidean frame relative to the vehicle, not a reference
# ellipsoid.
# header.frame_id 是卫星接收机报告的参考坐标系,通常是天线的位置. 这是相对于车辆的欧几里得坐标系,而不是参考椭球体.
Header header
# satellite fix status information # 卫星定位状态信息 (这个状态标志的具体解释见: 三、话题类型 `sensor_msgs/NavSatStatus` )
NavSatStatus status
# Latitude [degrees]. Positive is north of equator; negative is south.
# 纬度[度]. 赤道以北为正值;赤道以南为负值.
float64 latitude
# Longitude [degrees]. Positive is east of prime meridian; negative is west.
# 经度[度]. 本初子午线以东 为正值;本初子午线以西是负值.
float64 longitude
# Altitude [m]. Positive is above the WGS 84 ellipsoid
# (quiet NaN if no altitude is available).
# 海拔[m]. 正值为 WGS 84 椭球面上方 (如果没有可用的高度,则为安静的NaN).
float64 altitude
# Position covariance [m^2] defined relative to a tangential plane
# through the reported position. The components are East, North, and
# Up (ENU), in row-major order.
#
# Beware: this coordinate system exhibits singularities at the poles.
# 相对于报告的位置的切平面定义的位置协方差[m^2]. 组成部分包括东部、北部和向上(ENU),按行作为主要顺序进行排列. 注意:这个坐标系在极点处表现出奇异性.
float64[9] position_covariance
# If the covariance of the fix is known, fill it in completely. If the
# GPS receiver provides the variance of each measurement, put them
# along the diagonal. If only Dilution of Precision is available,
# estimate an approximate covariance from that.
# 如果定位的协方差是已知的,请将其完全填充. 如果GPS接收器提供了每次测量的方差,则将它们沿对角线放置. 如果只有“精度因子”可用,则根据该值估计近似协方差.
uint8 COVARIANCE_TYPE_UNKNOWN = 0 # 协方差类型: 未知
uint8 COVARIANCE_TYPE_APPROXIMATED = 1 # 协方差类型: 近似
uint8 COVARIANCE_TYPE_DIAGONAL_KNOWN = 2 # 协方差类型: 对角线已知
uint8 COVARIANCE_TYPE_KNOWN = 3 # 协方差类型: 已知
# 协方差类型
uint8 position_covariance_type
二、话题类型 sensor_msgs/NavSatStatus
在已安装 ROS-Noetic
的 电脑目录 /opt/ros/noetic/share/sensor_msgs/msg/NavSatFix.msg
中原 msg
定义如下:
# Navigation Satellite fix status for any Global Navigation Satellite System
# Whether to output an augmented fix is determined by both the fix
# type and the last time differential corrections were received. A
# fix is valid when status >= STATUS_FIX.
# 任何全球导航卫星系统的导航卫星定位状态
# 是否输出增强的定位由fix类型和上次接收差分校正的时间来确定。当 status>=status_fix 时,定位数据是有效的.
int8 STATUS_NO_FIX = -1 # unable to fix position # 无法固定位置
int8 STATUS_FIX = 0 # unaugmented fix # 未增强的定位
int8 STATUS_SBAS_FIX = 1 # with satellite-based augmentation # 基于星基的增强 (星基增强系统)
int8 STATUS_GBAS_FIX = 2 # with ground-based augmentation # 基于地基的增强 (地基增强系统)
int8 status
# Bits defining which Global Navigation Satellite System signals were
# used by the receiver.
# 定义接收器使用哪些全球导航卫星系统信号的 Bit。
uint16 SERVICE_GPS = 1 # 使用 美国的 全球定位系统系统 (GPS)
uint16 SERVICE_GLONASS = 2 # 使用 苏联/俄罗斯的 格洛纳斯卫星导航系统(GLONASS)
uint16 SERVICE_COMPASS = 4 # 使用 中国的 北斗卫星导航系统(COMPASS)# includes BeiDou.
uint16 SERVICE_GALILEO = 8 # 使用 欧盟的 伽利略卫星导航系统 (GALILEO)
uint16 service
三、NMEA 0183 数据协议中GPGGA
各个数据含义解释
GPGGA 数据格式解析
# 示例
$GPGGA,092153.40,4139.1959,N,12324.9720,E,4,20,0.9,48.08,M,10.30,M,01,3992*5D
序号 | 字段 | 解析 | 示例 |
---|---|---|---|
1 | $GPGGA | $GPGGA,数据头,表明该语句为 GGA 定位信息 | $GPGGA |
2 | utc | UTC 时间,hhmmss.sss,时分秒格式 | 092153.40 |
3 | lat | 纬度 (DDmm.mmmm) | 4139.1959 |
4 | lat dir | 纬度方向 (北纬 N = North, 南纬S = South) | N |
5 | lon | 经度ddmm.mmmm,度分格式(前导位数不足则补0) | 12324.9720 |
6 | lon dir | 经度方向 (东经E = East, 西经W = West) | E |
7 | quality | GPS质量指标。 不同品牌的接收机定义略有不同,这是里的含义分别来自novatel, trimble 的网站。 针对 novatel 接收机:0=未定位,1=单点定位,2=伪距/SBAS,3=未使用,4=RTK固定解,5=RTK浮动解 / 收敛的PPP ( 使用 TerraStar-C, TerraStar-C PRO, TerraStar-X 服务下),6=航位推算 (正在估算) , 7=手动输入模式(固定位置),8=模拟器模式,9=未使用 针对 trimble 接收机:0=未定位,1=GPS固定解(单点定位),2=差分GPS固定解/SBAS,3=未使用,4=RTK固定解,5=RTK浮动解, 6=INS航位推算 (正在估算) | 4 |
8 | sats | 正在使用的卫星数量。 | 20 |
9 | hdop | 水平精度因子 | 0.9 |
10 | alt | 相对于平均海平面的天线高度 | 48.08 |
11 | a-units | 天线高度单位(M = 米) | M |
12 | undulation | 起伏 - 大地水准面和 WGS84 椭球体之间的关系 (地球椭球面相对大地水准面的高度) | 10.30 |
13 | u-units | 起伏单位 (M = 米) | M, |
14 | age | 校正数据的年龄(以秒为单位),此处报告的最长年龄限制为 99 秒。 | 01 |
15 | stn ID | 差分基站 ID | 3992 |
16 | *xx | 校验和 | *5D |
17 | [CR][LF] | 语句终止符 | [CR][LF] |
参考链接
[1] 阿尼固. 星基增强系统与地基增强系统的概念和两者之间的区别 [EB/OL]. https://blog.csdn.net/embbls/article/details/104387627, 2020-02-19/2024-07-01.
[2] xw-何妨吟啸且徐行. GPGGA、GPRMC、GPGSV、GPGSA 数据格式定义 [EB/OL]. https://bbs.huaweicloud.com/blogs/313486, 2021-09-18/2024-07-01.
[3] novatel. GPGGA [EB/OL]. https://docs.novatel.com/OEM7/Content/Logs/GPGGA.htm, xxxx-xx-xx/2024-07-01.
[4] trimble. NMEA-0183 message: GGA [EB/OL]. https://receiverhelp.trimble.com/alloy-gnss/en-us/NMEA-0183messages_GGA.html, xxxx-xx-xx/2024-07-01.
[5] GPGGA [EB/OL]. https://wiki.blicube.com/grtk/zh/NMEA0183/#gpgga, xxxx-xx-xx/2024-07-01.