Changes between Version 9 and Version 10 of expansion/gw16143


Ignore:
Timestamp:
11/11/2020 05:47:35 AM (4 years ago)
Author:
Bobby Jones
Comment:

Add software section

Legend:

Unmodified
Added
Removed
Modified
  • expansion/gw16143

    v9 v10  
    33[[Image(GW16143.PNG, width=200)]]
    44
    5 The GW16143 is a high precision GPS Mini-PCIe card designed to provide precise positioning to applications utilizing Gateworks single board computers. It provides centimeter-level (<2cm) accuracy via GNSS positioning with concurrent reception of GPS, GLONASS, Galileo and !BeiDou.
    6 
    7 This is a wiki page about how to use the GW16143. 
     5The GW16143 is a high precision GPS Mini-PCIe card designed to provide precise positioning to applications utilizing Gateworks single board computers. It provides centimeter-level (<2cm) accuracy via GNSS positioning with concurrent reception of GPS, GLONASS, Galileo and !BeiDou after receiving [https://en.wikipedia.org/wiki/Real-time_kinematic RTK] fix data.
     6
     7This is a wiki page about how to use the GW16143.
    88
    99''' Please view the actual product page on the Gateworks website here:
     
    9191
    9292= Software
    93 
    94 '''Coming Soon'''
    95  See u-blox ZED-F9P Evaluation Module Documentation for Software Examples [https://www.u-blox.com/en/docs/UBX-18055649 Link]'''
     93The goal of this section is to provide a surface level understanding of the software components related beginning development on the [https://www.gateworks.com/products/mini-pcie-expansion-cards/gw16143-high-precision-gps-mini-pcie-card/ GW16143]. The primary component on the GW16143 is the [https://www.u-blox.com/en/product/zed-f9p-module U-Blox ZED-F9P] high precision gps module, and is overall comparable to the [https://www.u-blox.com/en/product/c099-f9p-application-board C099-F9P application board] in a mini-PCIe form factor. Notable differences between the C099-F9P and the GW16143 would be the absence of the ODIN-W2 (networking) module and the the addition of an antenna supervisor circuit.
     94
     95== Quick Start
     96Viewing standard (<15m accuracy) GNSS data using the GW16143 is simple on a Gateworks board.
     97
     98Install prerequisite software:
     99{{{#!bash
     100apt-get install gpsd gpsd-debug gpsd-clients
     101}}}
     102
     103Make sure the {{{/dev/ttyACM*}}} device enumeration occurs with {{{gpsd}}} running.
     104
     105{{{#!bash
     106dmesg | grep ttyACM
     107gpsd /dev/ttyACM*
     108}}}
     109
     110Then after a fix is found (by default indicated by the blinking TIMEPULSE LED), use a {{{gpsd-client}}} program  like {{{cgps}}} to view fix data.
     111
     112{{{#!bash
     113cgps
     114}}}
     115
     116Or read raw data from the device.
     117
     118{{{#!bash
     119# Note if the device is also outputting binary data, directly reading the device as serial data can have unexpected behavior
     120cat /dev/ttyACM*
     121}}}
     122
     123See the following sections for information on setting up [wiki:gw16143#DPGS differential GPS] to achieve fix data with <2cm levels of accuracy.
     124
     125== Host Development
     126The development tools released by U-Blox are made for the Windows OS, but various Linux based OS alternatives also exist. Initial bring up and testing was done on Gateworks [wiki:newport Newport] and [wiki:venice Venice] boards running our [wiki:ubuntu Ubuntu Focal BSP]. Information on the Windows utilities are included as a reference.
     127
     128=== Windows
     129
     130The U-Blox software support for the C099-F9P (and the contained ZED-F9P) comes mainly in the form of the [https://www.u-blox.com/en/product/u-connectxpress u-connectxpress] and [https://www.u-blox.com/en/product/u-center u-center] software. The u-connectxpress software is responsible for the ODIN-W2, and is therefore not required for development with the GW16143. Instead the Gateworks baseboard itself takes the role of the network and communication channel to the ZED-F9P.
     131
     132The [https://www.u-blox.com/en/product/u-center u-center] evaluation software needs to be installed on a Windows machine, but it has the capability to do everything required for configuration and testing on the ZED-F9P. This includes configuration of control registers, RTK base station/rover set up, and viewing GNSS data.
     133
     134For more information on u-center usage see the relevant [https://www.u-blox.com/sites/default/files/u-center_Userguide_%28UBX-13005250%29.pdf user guide].
     135
     136=== Ubuntu
     137
     138While it is possible to use the companion U-Blox [https://www.u-blox.com/en/product/u-center u-center] GNSS evaluation software to interact in a windows virtualization environment, there are open source or otherwise widely available software solutions that can natively run in a headless Ubuntu environment. Specifically this allows for full control over the ZED-F9P on the GW16143 when connected to a Gateworks board.
     139
     140Therefore all of the following examples can be done on a running target board, or otherwise on a development machine with the GW16143 in a USB carrier. Code can then be cross compiled and delivered to units via whatever preferred method.
     141
     142All of the following examples require [https://gpsd.gitlab.io/gpsd/ GPSD] version {{{3.21}}} or greater. The release source tarball for which can be found [http://download-mirror.savannah.gnu.org/releases/gpsd/ here]. The [wiki:ubuntu Gateworks Ubuntu Focal 20.04.1] image at this time contains version {{{3.20}}} and therefore needs to be replaced, otherwise later operations involving {{{ubxtool}}} will fail in unexpected ways.
     143 {{{#!bash
     144# Remove current gpsd
     145systemctl stop gpsd.socket
     146systemctl stop gpsd
     147systemctl disable gpsd.socket
     148systemctl disable gpsd
     149apt purge gpsd
     150
     151# Build gpsd from release source
     152apt install gcc scons python-gi python-gi-cairo g++
     153apt install libncurses5-dev libtinfo-dev pps-tools
     154apt install python3-distutils
     155wget http://download.savannah.gnu.org/releases/gpsd/gpsd-3.21.tar.xz
     156tar xvf gpsd-3.21.tar.xz
     157cd gpsd-3.21
     158ln -s /usr/bin/python3 /usr/bin/python
     159scons && scons check && scons udev-install
     160}}}
     161
     162
     163[=#DPGS]
     164== Differential GPS set up using NTRIP
     165Networked Transport of RTCM via Internet Protocol, or [https://en.wikipedia.org/wiki/Networked_Transport_of_RTCM_via_Internet_Protocol NTRIP], is the protocol that allows us to transmit RTK data between the differential gps basestation which has a fixed known position to any number of GPS clients that can use the RTK correction data. The NTRIP standard is designed and published by [https://www.rtcm.org/ RTCM]. You can read more about the NTRIP protocol [https://igs.bkg.bund.de/root_ftp/NTRIP/documentation/NtripDocumentation.pdf here].
     166
     167Acquiring RTK correction data for high precision GPS with the GW16143 can be done either by pointing to a preexisting source such as ones posted to [http://www.rtk2go.com/ rtk2go], or setting up a source, server, and caster yourself. Keep in mind that RTK correction data effectiveness is diminished over larger distances. For more specifics, see this great [https://www.researchgate.net/publication/241755023_Exploring_GNSS_RTK_performance_benefits_with_GPS_and_virtual_galileo_measurements publication] of RTK experimental findings by Yanming Feng and Jinling Wang.
     168
     169There are a number of open source NTRIP utilities to use for setting up a differential GPS system. Some options and the required configuration steps of the GW16143 are described in the following sections.
     170
     171=== Source
     172The first step in the differential GPS system is the server outputting RTK data. In order to output meaningful RTK data, the source (a.k.a. basestation) needs to either be fed a well known coordinate, or in the case of the ZED-F9P told to execute a survey-in process before outputting the {{{RTCM3}}} messages required by our GW16143 NTRIP client.
     173
     174{{{#!bash
     175ubxtool -p MON-VER | grep PROT # find protocol version
     176export UBXOPTS="-P 27.11"
     177ubxtool -p RESET # factory reset
     178ubxtool -e BINARY # enable binary messages
     179ubxtool -d NMEA # disable NMEA messages
     180ubxtool -p NAV-SVIN # see current survey in status
     181ubxtool -e SURVEYIN3 # start survey, defaults to 5 minute survey, 50m or better accuracy
     182ubxtool -e RTCM3 # start outputting RTCM messages
     183}}}
     184
     185These {{{RTCM3}}} messages contain the RTK data required for offset calculations client side, and once the device has been configured to output them no additional register modifications are necessary.
     186
     187=== !Server/Caster
     188[http://www.rtklib.com/ RTKlib] has all the components necessary for creating a custom NTRIP server and caster (see the [wiki:expansion/gw16143#CustomSolutions custom solutions] for more info). However if you are looking for a preexisting solution you can use the [https://github.com/Stefal/rtkbase rtkbase] and [https://github.com/baidu/ntripcaster ntripcaster]. Both are open source, ZED-F9P supported, and use RTKlib as examples for further development.
     189{{{#!bash
     190# rtkbase
     191wget https://raw.githubusercontent.com/Stefal/rtkbase/2.1/tools/install.sh -O install.sh
     192chmod +x install.sh
     193./install.sh --all
     194
     195# ntripcaster
     196git clone https://github.com/baidu/ntripcaster
     197cd ntripcaster
     198./configure
     199make
     200make install # installs binary to /usr/local/ntripcaster/bin/ntripcaster
     201}}}
     202
     203See the github links above for configuration steps as they will be specific to your network and preferences. Once you've set up your caster, be sure to modify your caster table appropriately to reflect your settings. See the [https://gssc.esa.int/wp-content/uploads/2018/07/NtripDocumentation.pdf NTRIP documentation] Chapter 6 '''"Source Table"''' for a full table of the composing elements.
     204
     205=== Client
     206
     207The firmware that is loaded by default on the GW16143 will allow for an instance of {{{gpsd}}} to feed it RTK data and improve it's fix accuracy. However if you've fiddled with the configuration, or otherwise would like to make sure you're working with defaulted firmware, you can reset the device's configuration registers with {{{ubxtool}}}. Once again keep in mind you may need to run the polling operations of {{{ubxtool}}} more than once depending on asynchronous factors.
     208
     209{{{#!bash
     210# Set protocol and verbosity levels
     211export UBXOPTS="-P 27.11 -v 2"
     212
     213# test ubxtool communication with ZED-F9P
     214stty -F /dev/ttyACM0 raw
     215ubxtool
     216
     217# Execute factory reset of configuration registers
     218ubxtool -p RESET
     219}}}
     220
     221At this point make sure any default instances of {{{gpsd}}} are closed, then rerun with a valid NTRIP URI as an argument:
     222
     223{{{#!bash
     224# Running gpsd towards ntrip URI
     225gpsd -G ntrip://rover:address@rtk2go.com:2101/MSJO1 -D 4 -N -n -s 460800 /dev/ttyACM0
     226}}}
     227
     228At this point the fix provided by the GW16143/ZED-F9P is a result of RTK corrections.
     229
     230If you're client device is on a high speed object, take a look at [https://gpsd.io/ubxtool-examples.html#_dynamic_platform_model gpsd's ubxtool example page] and read the section on dynamic platform model. It covers necessary changes required to prevent automatic fix smoothing that is destructive at high speeds.
     231
     232== Custom Solutions
     233Implementing your own software solution will most likely involve the use of [http://www.rtklib.com/ rtklib].  Taken directly from their overview:
     234
     235{{{RTKLIB}}} is an open source program package for standard and precise positioning with GNSS (global navigation satellite system). {{{RTKLIB}}} consists of a portable program library and several APs (application programs) utilizing the library. The features of {{{RTKLIB}}} are:
     236
     2371. It supports standard and precise positioning algorithms with:
     238
     239 GPS, GLONASS, Galileo, QZSS, !BeiDou and SBAS
     240
     2412. It supports various positioning modes with GNSS for both real-time and post-processing:
     242
     243 Single, DGPS/DGNSS, Kinematic, Static, Moving-Baseline, Fixed, PPP-Kinematic, PPP-Staticand PPP-Fixed
     244
     2453. It supports many standard formats and protocols for GNSS:
     246
     247 RINEX 2.10, 2.11, 2.12 OBS/NAV/GNAV/HNAV/LNAV/QNAV, RINEX 3.00, 3.01, 3.02 OBS/NAV, RINEX 3.02 CLK, RTCM ver.2.3, RTCM ver.3.1 (with amendment 1-5), ver.3.2, BINEX, NTRIP 1.0, RTCA/DO-229C, NMEA 0183, SP3-c, ANTEX 1.4, IONEX 1.0, NGS PCV and EMS 2.0
     248
     2494. It supports several GNSS receivers' proprietary messages:
     250
     251 !NovAtel: OEM4/V/6, OEM3, OEMStar, Superstar II, Hemisphere: Eclipse, Crescent, u-blox: LEA-4T/5T/6T, !SkyTraq: S1315F, JAVAD: GRIL/GREIS, Furuno: GW-10 II/III and NVS NV08C BINR (refer the Manual for details)
     252
     2535. It supports external communication via:
     254
     255 Serial, TCP/IP, NTRIP, local log file (record and playback) and FTP/HTTP (automatic download)
     256
     2576. It provides many library functions and APIs for GNSS data processing:
     258 Satellite and navigation system functions, matrix and vector functions, time and string functions, coordinates transformation, input and output functions, debug trace functions, platform dependent functions, positioning models, atmosphere models, antenna models, earth tides models, geoid models, datum transformation, RINEX functions, ephemeris and clock functions, precise ephemeris and clock functions, receiver raw data functions, RTCM functions, solution functions, Google Earth KML converter, SBAS functions, options functions, stream data input and output functions, integer ambiguity resolution, standard positioning, precise positioning, post-processing positioning, stream server functions, RTK server functions, downloader functions
     259
     2607. It includes the following GUI and CUI APs:
     261 
     262 ||= Function =||= GUI AP =||= CUI AP =||
     263 || AP Launcher || RTKLAUNCH || - ||
     264 || Real-Time Positioning || RTKNAVI || RTKRCV ||
     265 || Communication Server || STRSVR || STR2STR ||
     266 || Post-Processing Analysis || RTKPOST || RNX2RTKP ||
     267 || RINEX Converter || RTKCONV || CONVBIN ||
     268 || Plot Solutions and Observation Data || RTKPLOT || - ||
     269 || Downloader of GNSS Data || RTKGET || - ||
     270 || NTRIP Browser || SRCTBLBROWS || - ||
     271
     2728. All of the executable binary APs for Windows are included in the package as well as whole source programs of the library and the APs.
     273
     274
     275== References
     276[https://gpsd.gitlab.io/gpsd/gpsd.html GPSD Home Page]
     277
     278[https://gpsd.io/ubxtool-examples.html Ubxtool Examples] 
     279
     280[https://www.u-blox.com/en/docs/UBX-18055649 C099-F9P User Guide]
     281
     282[http://www.rtklib.com/ rtklib]