一、GNSS定位

卫星导航系统由空间段、地面段和用户段三部分组成,可在全球范围内全天候、全天时为各类用户提供高精度、高可靠定位、导航、授时服务,并且具备短报文通信能力,已经初步具备区域导航、定位和授时能力,定位精度为分米、厘米级别,测速精度0.2米/秒,授时精度10纳秒。

GNSS误差因素

  • 与卫星有关

    • 卫星轨道误差
    • 卫星钟差
    • 相对论效应
  • 与传播途径相关
    • 电离层(折射)延迟
    • 对流程(折射)延迟
    • 多路径效应
  • 与接收设备有关
    • 接收机天线相位中心的偏移和变化
    • 接收机钟差
    • 接收机内部噪声
  • 其他影响
    • 地球潮汐
    • 负荷潮

二、原理解析

2.1 RTK差分定位

在利用GPS进行定位时,会受到各种各样因素的影响,为了消除这些误差源,必须使用两台以上的GPS接收机同步工作。GPS静态测量的方法是各个接收机独立观测,然后用后处理软件进行差分解算。那么对于RTK测量来说,仍然是差分解算,只不过是实时的差分计算。

实时动态差分法(Real-time kinematic,RTK,载波相位差分技术):基准站通过数据链将其载波观测量及站坐标信息一同传送给用户站。用户站接收GPS卫星的载波相位与来自基准站的载波相位,组成相位差分观测值进行处理,计算后给出厘米级的定位结果。

RTK系统主要由三部分组成:

  • 基准站(差分源)
  • 差分数据通信链(网络,电台,3G/4G等)
  • 用户站(终端)

RTK精度影响:

  • 移动站和基站观测到的共同卫星数:RTK精确定位要求要求移动站与基站观测到5颗以上同样的多频段卫星才能实现RTK固定解,观测到越多的卫星就能越快速的得到RTK固定解。
  • 移动站和基站距离:移动站与基站之间的距离有要求,低纬度地区的基站有效覆盖距离小,高纬度地区的距离远;随着移动站与基站的距离增加,误差会越来越大。

RTK解的形式

  • 单点解:是RTK在工作的时候移动站和基准站互相不能联系,接收机未使用任何差分改正信息计算的3D坐标

  • 差分解:是有信号,但由于各种原因,比如卫星数量太少或移动站位置太差,导致交汇数据精确度非常低,一般偏差有几米或者十几二十米

  • 浮点解:精度相对高一点,但其精度一般是不可靠的,定位精度可接近于固定解或到达20-30cm,在城市中获取的一般是浮点解

  • 固定解:是最精确的数据,精度一般在3-5cm

2.2 Ntrip协议

  • ntrip server:通过某种途径获得到RTK差分信息,然后传送给 Ntrip Caster
  • Ntrip Caster:接收Ntrip Server的差分数据,给ntrip client发送GPS差分数据
  • ntrip client: 向Ntrip Caster申请GPS差分数据,最终实现RTK定位

2.3 NMEA 0183协议

NMEA 0183是美国国家海洋电子协会(National Marine Electronics Association )为海用电子设备制定的标准格式。目前已成了GPS导航设备统一的RTCM(Radio Technical Commission for Maritime services)标准协议。

序号 命令 说明 最大帧长
1 $GPGGA 输出定位的时间、位置与相关的定位数据 72
2 $GPGSA 输出接收机工作模式,参与定位的卫星及 DOP 值等信息 65
3 $GPGSV 输出各卫星系统可见卫星数、PRN 编号及其仰角、方位角和信噪比等信息 210
4 $GPRMC 输出最简导航传输数据, 70
5 $GPVTG 输出航向和地速 34
6 $GPGLL 大地坐标信息
7 $GPZDA UTC时间和日期
  • 发送次序:$GPZDA;$GPGGA;$GPGLL;$GPVTG;$GPGSA;$GPGSV*3;$GPRMC

  • 协议采用ASCII码,其串行通信默认参数为:波特率4800bps,数据位8bit,开始位1bit,停止位1bit,无奇偶校验。

三、坐标系

GIS处理的是空间信息,而所有对空间信息的量算都是基于某个坐标系统的,因此GIS中坐标系统的定义是GIS系统的基础,正确理解GIS中的坐标系统就变得尤为重要。

坐标系统又可分为两大类:地理坐标系统、投影坐标系统。

GIS中的坐标系定义由基准面和地图投影两组参数确定,而基准面的定义则由特定椭球体及其对应的转换参数确定,因此欲正确定义GIS系统坐标系,首先必须弄清地球椭球体(Ellipsoid),大地基准面(Datum)及地图投影(Projection)三者的基本概念及它们之间的关系。

详细参考:空间坐标与投影系统系列(一):空间坐标和地图投影

四、应用

计算机(联网)通过Ntrip获取基站的差分信号,然后通过串口喂给北斗板卡,北斗板卡根据接收到的差分信号解算出定位信息并上发,系统通过NMEA 0183协议解析。

4.1 RTKLIB

RTKLIB包含Ntrip协议,用于获取差分信号。

RTKLIB有部分参数在rtklib 2.4.3 b33才支持,win上有编译好的GUI版本,Lnux上有qt版本,但需要手动编译。

安装

apt安装,此处安装并非最新版本,部分参数不支持

sudo apt update
sudo apt install rtklib

源码安装

  • rtklib 2.4.3 p13 stable

    git clone https://github.com/tomojitakasu/RTKLIB.git
    cd RTKLIB/app
    sudo bash makeall.sh
    
  • rtklib 2.4.3 b33 beta

    原作者版本的编译生成cui没问题,生成文件在/usr/local/bin,可直接命令行调用,但qt的gui编译失败,更换JensReimann/rtklib_2.4.3版本,这一版本对qt部分内容进行了修正。

    • tomojitakasu版本(原始作者)

      sudo apt-get update
      sudo apt install build-essential
      sudo apt-get install libpng-dev
      sudo apt-get install qt5-default libqt5serialport5-devgit clone -b rtklib_2.4.3 https://github.com/tomojitakasu/RTKLIB.git
      cd RTKLIB/app
      sudo make makeall
      
    • JensReimann版本

      安装依赖库

      sudo apt-get update
      sudo apt install build-essential
      sudo apt-get install libpng-dev
      sudo apt-get install qt5-default libqt5serialport5-dev
      sudo apt-get install qtwebengine5-dev
      

      编译

      qmake
      make
      

      编译好后cui命令行调用的在/usr/local/bin下,GUI程序在对应qt目录下。

使用

Function GUI AP CUI AP
(a) AP Launcher RTKLAUNCH
(b) Real-Time Positioning RTKNAVI RTKRCV
© Communication Server STRSVR STR2STR
(d) Post-Processing Analysis RTKPOST RNX2RTKP
(e) RINEX Converter RTKCONV CONVBIN
(f) Plot Solutions and Obs Data RTKPLOT
(g) Downloder of GNSS Data RTKGET
(h) NTRIP Browser NTRIPSRCBROWS

http://www.rtklib.com/prog/manual_2.4.2.pdf P99,下面参数是rtklib 2.4.3 b33版本的,手册为旧版本说明,参数不全

str2str -in stream[#...] -out stream[#...] [-out stream[#...]...] [options] # 可以多个out,多路输出

OPTIONS

-in stream[#format] input stream path and format
-out stream[#format] output stream path and format

stream path

serial       : serial://port[:brate[:bsize[:parity[:stopb[:fctr]]]]]
tcp server   : tcpsvr://:port
tcp client   : tcpcli://addr[:port]
ntrip client : ntrip://[user[:passwd]@]addr[:port][/mntpnt]
ntrip server : ntrips://[:passwd@]addr[:port]/mntpnt[:str] (only out)
ntrip caster server: ntripc_s://[:passwd@][:port] (only in)
ntrip caster client: ntripc_c://[user:passwd@][:port]/mntpnt (only out)
file         : [file://]path[::T][::+start][::xseppd][::S=swap]

format

rtcm2        : RTCM 2 (only in)
rtcm3        : RTCM 3
nov          : NovAtel OEMV/4/6,OEMStar (only in)
oem3         : NovAtel OEM3 (only in)
ubx          : ublox LEA-4T/5T/6T (only in)
ss2          : NovAtel Superstar II (only in)
hemis        : Hemisphere Eclipse/Crescent (only in)
stq          : SkyTraq S1315F (only in)
gw10         : Furuno GW10 (only in)
javad        : Javad (only in)
nvs          : NVS BINR (only in)
binex        : BINEX (only in)
rt17         : Trimble RT17 (only in)
sbf          : Septentrio SBF (only in)
cmr          : CMR/CMR+ (only in)
tersus       : TERSUS (only in)

其余辅助命令

-msg \"type[(tint)][,type[(tint)]...]\"rtcm message types and output intervals (s)
-sta sta          station id
-opt opt          receiver dependent options
-s  msec          timeout time (ms) [10000]
-r  msec          reconnect interval (ms) [10000]
-n  msec          nmea request cycle (m) [0]
-f  sec           file swap margin (s) [30]
-c  file          input commands file [no]
-c1 file          output 1 commands file [no]
-c2 file          output 2 commands file [no]
-c3 file          output 3 commands file [no]
-c4 file          output 4 commands file [no]
-p  lat lon hgt   station position (latitude/longitude/height) (deg,m)
-px x y z         station position (x/y/z-ecef) (m)
-a  antinfo       antenna info (separated by ,)
-i  rcvinfo       receiver info (separated by ,)
-o  e n u         antenna offset (e,n,u) (m)
-l  local_dir     ftp/http local directory []
-x  proxy_addr    http/ntrip proxy address [no]
-b  str_no        relay back messages from output str to input str [no]
-t  level         trace level [0]
-ft file          ntrip souce table file []
-fl file          log file [str2str.trace]
-h                print help

4.2 ROS

消息格式

  • sensor_msgs/NavSatFix

    # Navigation Satellite fix for any Global Navigation Satellite System
    #
    # Specified using the WGS 84 reference ellipsoid# header.stamp specifies the ROS time for this measurement (the
    #        corresponding satellite time may be reported using the
    #        sensor_msgs/TimeReference message).
    #
    # 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 header# satellite fix status information
    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).
    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.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.uint8 COVARIANCE_TYPE_UNKNOWN = 0
    uint8 COVARIANCE_TYPE_APPROXIMATED = 1
    uint8 COVARIANCE_TYPE_DIAGONAL_KNOWN = 2
    uint8 COVARIANCE_TYPE_KNOWN = 3uint8 position_covariance_type
    
  • sensor_msgs/NavSatStatus

    # 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.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 augmentationint8 status# Bits defining which Global Navigation Satellite System signals were
    # used by the receiver.uint16 SERVICE_GPS =     1
    uint16 SERVICE_GLONASS = 2
    uint16 SERVICE_COMPASS = 4      # includes BeiDou.
    uint16 SERVICE_GALILEO = 8uint16 service
    

nmea_navsat_driver

解析NMEA协议输出ROS标准定位信息。

  • nmea_topic_serial_reader

    通过串口读入nmea数据,发布nmea_sentence (nmea_msgs/Sentence)

    ~port (string, default: /dev/ttyUSB0)
    The device path
    ~baud (int, default: 4800)
    The baud rate to receive NMEA data.
    ~frame_id (string, default: gps)
    The frame_id for the header of the nmea_msgs/Sentence and output message. Will be resolved with tf_prefix if defined.
    
  • nmea_topic_driver

    订阅nmea_sentence (nmea_msgs/Sentence),解析出GPS数据fix(sensor_msgs/NavSatFix)

    ~time_ref_source (string, default: <the value of ~frame_id>)
    The value to use as the source in the sensor_msgs/TimeReference.
    ~useRMC (bool, default: False)
    Whether to generate position fixes from GGA sentences or RMC sentences. If True, fixes will be generated from RMC. If False, fixes will be generated based on the GGA senten
    

    程序解析数据后输出GNSS的经纬度等,时间time_reference,速度vel,部分GGA数据因格式ROS数据格式原因不会解析上发,其中解析形式映射如下

    # GGA
    # -1,0  STATUS_NO_FIX
    # 1     STATUS_FIX
    # 2     STATUS_SBAS_FIX
    # 4,5,9 STATUS_GBAS_FIX
    
  • nmea_serial_driver

    在实际使用中nmea_serial_driver会因为上发的nmea数据不完整而报错并结束程序,分别独立进行读入和解析更好

    直接通过串口读取nmea数据解析发布GPS数据,相当于上面两个一起使用

    ~port (string, default: /dev/ttyUSB0)
    The device path
    ~baud (int, default: 4800)
    The baud rate to receive NMEA data.
    ~frame_id (string, default: gps)
    The frame_id for the header of the sensor_msgs/NavSatFix and geometry_msgs/TwistStamped output messages. Will be resolved with tf_prefix if defined.
    ~time_ref_source (string, default: <the value of ~frame_id>)
    The value to use as the source in the sensor_msgs/TimeReference.
    ~useRMC (bool, default: False)
    Whether to generate position fixes from GGA sentences or RMC sentences. If True, fixes will be generated from RMC. If False, fixes will be generated based on the GGA sentences. Using GGA sentences allows for approximated covariance output while RMC provides velocity information.
    

gps_common

utm_odometry_node

utm_odometry_node converts latitude-longitude readings into UTM odometry

  • Subscribed Topics

    fix (sensor_msgs/NavSatFix): GPS measurement and status

  • Published Topics

    odom (nav_msgs/Odometry): UTM-encoded position

  • Parameters

    ~rot_covariance (double, default: 99999): Variance (in meters) to specify for rotational measurements

    ~frame_id (string, default: Copy frame_id from fix message): Frame to specify in header of outgoing Odometry message

    ~child_frame_id (string): Child frame to specify in header of outgoing Odometry message

五、工程问题

5.1 GPS数据频率

GPS数据整体频率不高,无差分自动上发数据为10Hz左右,通过Ntrip获取的差分数据间隔一般在1-5s(一般设置为1Hz),差分数据用于修正定位误差,过快的频率没必要且会影响解算,但长时间无差分数据会影响定位精度。

5.2 速度获取

速度并不是通过获取两点距离除以时间获得,而是通过多普勒效应 。

The use of GPS in automotive testing is now well established, and Racelogic has been a market leader and innovator for over a decade. GPS systems have revolutionised the accuracy and convenience of testing, development, and validation within the industry. Why and how is it so effective?

There is a common misconception that speed measured via GPS is done so as a function of position against time. If this were the case, GPS velocity would be just about unusable, because GPS position relies on precise measurements of the distance from the receiver to the satellite, and therefore suffers from numerous effects - such as atmospheric interference - which delays the signal.

Fortunately, velocity isn’t measured like this: instead, the Doppler shift in the signals coming from the satellites is captured and this leads to an incredibly accurate measurement of speed.

If you are tracking seven satellites, then this is like having seven police radar guns aimed at you: the measurement is made by taking them all into account.

参考

ntrip协议

NMEA-0183协议详解

rtk 精确定位 简介

什么是RTK?GPS导航和RTK的基本原理有什么不同?

UBUNTU编译运行RTKLIB

nmea_navsat_driver

空间坐标与投影系统系列(一):空间坐标和地图投影

rtklib manual

rtklibexplorer

移动机器人传感器——GNSS相关推荐

  1. 多源传感器GNSS INS 视觉 LiDAR 组合导航与SLAM开源项目总结

    多源传感器GNSS INS 视觉 LiDAR 组合导航与SLAM开源项目总结 本文基于 吴桐wutong 微信公众号文章完善而来. 开源代码总览 名称 传感器类型 组合类型 滤波方法 备注 RTKLI ...

  2. 移动机器人传感器---IMU

    文章目录 1. IMU概念 2. IMU模块概述 2.1 MEMS传感器 2.2 三轴陀螺仪 3. IMU输出数据在移动机器人算法中的应用 1. IMU概念 惯性测量模块(IMU,Inertial M ...

  3. 移动机器人传感器外参标定综述

    文章目录 1lidar camera alignment 1.1target_based methods 1.2targetless_based methods 1.2.1 3D-3D alignme ...

  4. 移动机器人传感器——IMU

    IMU(Inertial Measurement Unit)惯性测量单元:加速度计,陀螺仪构成,输出加速度和角速度,并可以解算出姿态,结合加速度和角速度计可以获得较为准确的Roll和Pitch(旋转轴 ...

  5. 移动机器人传感器——激光雷达

    一.激光雷达简介 通过持续不断的发射激光束,激光束遇到障碍物会产生反射,部分反射会被激光雷达(Lidar)传感器再次接收到,通过测量激光束发送和返回传感器的耗时(Round Trip Time)可以获 ...

  6. 移动机器人设计与实践-基础概念汇总

    如下全文在关键词提示词等脚本交互下,由文图版本生成式人工智能在1分钟内创作完成. AI自动生成文章评分已经远超大部分博文评分值. 人类社会经历过农业时代(最强代表汉唐)-工业时代(最强代表日不落帝国) ...

  7. CARLA传感器详细文档介绍+python实例(持续更新ing)

    CARLA中有两种类型的传感器:每帧都工作的传感器(相机,点云等)和只有特定环境下才接收数据的传感器(触发检测).都属于carla.Sensor类,从carla.BlueprintLibrary类中实 ...

  8. 【移动机器人】考纲复习

    文末有考试技巧与考试说明 文章目录 智能移动机器人核心关键技术 环境地图表示方法 智能机器人的运动机构及其优缺点,重点轮式和腿式机器人的优缺点 轮式 优点 缺点 腿式 优点 缺点 几种常见轮子类型,特 ...

  9. 浅谈四种常见的agv导航方式及各自的优缺点

    了解过AGV小车的朋友都知道,agv小车也叫作自动搬运车.搬运机器人等,agv小车主要是通过电磁.光学或其它自动导引装置,能够实现自主规划线路自动行驶的一个过程,是一种具有安全性高以及拥有各种搭载功能 ...

最新文章

  1. java自学语法_Java自学笔记(一):基础知识
  2. 漏洞战争软件漏洞分析精要 学习笔记
  3. 面向对象4.1~4.4
  4. 安装完成ubuntu系统后的基本的相关配置---Linux总结笔记
  5. 点乘叉乘坐标公式_点积与叉乘的运算与物理意义
  6. bash shell数组模拟队列queue和shell数组使用技巧
  7. [C++11]使用using和typedef给模板定义别名
  8. smarty二维foreach示例[顺代一维数组],再次加强版
  9. java连接access驱动_Java 连接Access
  10. 应用传送网络(ADN):率先架起“东数西算”的“高速公路”
  11. Confluence 6 配置索引语言
  12. egg风格 什么意思_egg框架学习笔记
  13. Java基础篇:如何使用圆括号
  14. 浅谈Kotlin(四):控制流
  15. 【Gym-101775 C】Traffic Light【思维】
  16. 海量图标矢量图免费下载【来自阿里】
  17. 微信小程序如何快速达到1000UV流量主开通要求
  18. 2021年3月30日百度笔试题
  19. 布局 - 收藏集 - 掘金
  20. Leetcode1160. 拼写单词(C语言)

热门文章

  1. 中国第一批程序员的“青春饭”已经恰完了,35+的程序员该何去何从?
  2. 大数据丨ClickHouse在京东能源管理平台的实践
  3. 基于深度学习的绘画风格迁移
  4. 国际期货和国内期货的区别带招商
  5. Java 利用hutool工具实现导出excel并合并单元格
  6. 使用Jetcache过程的bug之Buffer underflow
  7. 音乐flac格式如何快速简单的转换为mp3格式
  8. Java Cache 缓存方案详解及代码-Ehcache
  9. phpmyadmin的初始账号密码是多少
  10. CV各领域牛人及资源-有些网页已很久没更新