= GW16143 High Precision GNSS / GPS Mini-PCIe Card [[PageOutline]] [[Image(GW16143.PNG, width=200)]] 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 after receiving [https://en.wikipedia.org/wiki/Real-time_kinematic RTK] fix data. This is a wiki page about how to use the GW16143. ''' Please view the actual product page on the Gateworks website here: * [https://www.gateworks.com/products/mini-pcie-expansion-cards/gw16143-high-precision-gps-mini-pcie-card/ GW16143 Product Page] ''' Here are a list of features: * High Precision GNSS Mini-PCIe card * Concurrent reception of GPS, GLONASS, Galileo and !BeiDou * Centimeter-level (<2cm) Accuracy GNSS positioning * Integrated Multi-Band Real Time Kinematics (RTK) * High update rate for highly dynamic applications * Allows for “Base” and “Rover” Operation * Two UART headers for external correction messages * Timepulse (PPS) output header * Uses Standard NMEA, UBX, SPARTN and RTCM Message Format * USB to Serial Interface * Status LEDs * Rechargeable Lithium battery for faster cold start acquisition * RTCM 3.x, SSR, SBAS Corrections * <1.0m SBAS, <0.2m SSR, <0.03m RTCM 3.x * Supports L1 and L2/L5 Bands * -40°C to +85°C Operating Temperature * Made in USA Differential GNSS devices such as the GW16143 are starting to replace survey-grade equipment. Other radio cards such as the Gateworks GW16130 Iridium Satellite Modem or GW16132 CAT-M1 modem can provide communication links for the augmentation data. The GW16143 enables precision navigation and automation of moving machinery in industrial applications such as agriculture, mining, and field mapping. [[Image(https://trac.gateworks.com/raw-attachment/wiki/expansion/gw16143/gw_sat_drone.jpg, width=600px)]] ''' u-blox ZED-F9P Information * [https://www.u-blox.com/en/product/zed-f9p-module ZED-F9P Product Page] * [https://www.u-blox.com/en/product/zed-f9p-module#tab-documentation-resources Additional ZED-F9P Documentation] * [https://www.u-blox.com/sites/default/files/ZED-F9P_DataSheet_%28UBX-17051259%29.pdf ZED-F9P Data Sheet] * [https://www.u-blox.com/en/docs/UBX-18010802 ZED-F9P Integration Manual] * ZED F9P companion GNSS correction service, !PointPerfect * [https://developer.thingstream.io/guides/location-services/pointperfect-service-description] ''' == = Software The 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. == Quick Start The ZED-F9P modem will enumerate as a USB CDC ACM device: Communication Device CDC (ACM): Communication Device Class (Abstract Control Model) Viewing standard (<15m accuracy) GNSS data using the GW16143 is simple on a Gateworks board. {{{#!bash root@focal-venice:~# ls -l /dev/ttyACM* crw-rw---- 1 root dialout 166, 0 Oct 8 21:34 /dev/ttyACM0 root@focal-venice:~# cat /dev/ttyACM0 $GNRMC,214005.00,A,3515.48752,N,12040.13290,W,0.004,,081021,,,A,V*0A $GNVTG,,T,,M,0.004,N,0.007,K,A*3E $GNGGA,214005.00,3515.48752,N,12040.13290,W,1,12,0.55,32.0,M,-32.4,M,,*48 $GNGSA,A,3,10,21,22,31,32,01,03,04,26,,,,1.07,0.55,0.91,1*0C $GNGSA,A,3,79,78,80,70,69,,,,,,,,1.07,0.55,0.91,2*0D $GNGSA,A,3,01,04,36,11,09,31,05,,,,,,1.07,0.55,0.91,3*03 $GNGSA,A,3,20,32,29,37,35,19,,,,,,,1.07,0.55,0.91,4*08 $GPGSV,3,1,12,01,55,284,42,03,32,311,36,04,17,255,31,08,00,216,,1*67 $GPGSV,3,2,12,10,13,112,42,17,03,314,,21,57,242,47,22,54,320,45,1*65 }}} * Note if the device is also outputting binary data, directly reading the device as serial data can have unexpected behavior. You can also use {{{gpsd}}} to interact with the modem: - see [wiki:/gps#gpsd GPSD WIKI] See the following sections for information on setting up [wiki:gw16143#DPGS differential GPS] to achieve fix data with <2cm levels of accuracy. == Host Development The 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. The well-known alternative for configuration / visual GUI is PyGPSClient, an open source program that can be compared to u-center and also parses new NTRIP data formats such as SPARTN for high accuracy location data while also using little data. === Windows The 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. The [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. u-center is an evaluation software and is not recommended outside of development, but it can be powerful for intuitively configuring the communication to the ZED-F9P and getting a visual representation of data. One way of connecting to u-center is via TCP. {{{ gpsd -G -D 5 -F -n -N /var/run/gpsd.sock /dev/ttyACM0 cgps #sanity check GPS data is good }}} {{{ socat TCP-LISTEN:12101,reuseaddr,fork /dev/ttyACM0,raw,echo=0 #sends data over TCP:12101 }}} For 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]. [[Image(https://trac.gateworks.com/raw-attachment/wiki/expansion/gw16143/gw_ucenter.png,width=900px)]] === Ubuntu While 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. Therefore 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. Most of the following examples require [https://gpsd.gitlab.io/gpsd/ GPSD] version {{{3.21}}} or greater. Some newer NTRIP protocols such as SPARTN (which is used by the !PointPerfect service) may not be supported by GPSD, so pygnssutils in lieu of gpsd is an out-of-the-box solution. [=#DPGS] == Differential GPS set up using NTRIP Networked 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]. Acquiring RTK correction data for high precision GPS with the GW16143 can be done either by pointing to a preexisting source such as u-blox !PointPerfect, the 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. There 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. === Source The 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. {{{#!bash ubxtool -p MON-VER | grep PROT # find protocol version export UBXOPTS="-P 27.11" ubxtool -p RESET # factory reset ubxtool -e BINARY # enable binary messages ubxtool -d NMEA # disable NMEA messages ubxtool -p NAV-SVIN # see current survey in status ubxtool -e SURVEYIN3 # start survey, defaults to 5 minute survey, 50m or better accuracy ubxtool -e RTCM3 # start outputting RTCM messages }}} These {{{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. === !Server/Caster [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. {{{#!bash # rtkbase wget https://raw.githubusercontent.com/Stefal/rtkbase/2.1/tools/install.sh -O install.sh chmod +x install.sh ./install.sh --all # ntripcaster git clone https://github.com/baidu/ntripcaster cd ntripcaster ./configure make make install # installs binary to /usr/local/ntripcaster/bin/ntripcaster }}} See 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. === Client Note: For !PointPerfect/SPARTN NTRIP clients, gpsd/rtklib is not known to support SPARTN at this time; we recommend PyGNSSUtils at the time being for parsing the NTRIP data and having an abstraction layer between the end application and /dev/ttyACM0. Examples of getting <2cm accuracy from SPARTN data are in the !PointPerfect section below. The 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. {{{#!bash # Set protocol and verbosity levels export UBXOPTS="-P 27.11 -v 2" # test ubxtool communication with ZED-F9P stty -F /dev/ttyACM0 raw ubxtool # Execute factory reset of configuration registers ubxtool -p RESET }}} At this point make sure any default instances of {{{gpsd}}} are closed, then rerun with a valid NTRIP URI as an argument: {{{#!bash # Running gpsd towards ntrip URI gpsd -G ntrip://rover:address@rtk2go.com:2101/MSJO1 -D 4 -N -n -s 460800 /dev/ttyACM0 }}} At this point the fix provided by the GW16143/ZED-F9P is a result of RTK corrections. If 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. == Custom Solutions Implementing your own software solution will most likely involve the use of [http://www.rtklib.com/ rtklib]. Taken directly from their overview: {{{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: 1. It supports standard and precise positioning algorithms with: GPS, GLONASS, Galileo, QZSS, !BeiDou and SBAS 2. It supports various positioning modes with GNSS for both real-time and post-processing: Single, DGPS/DGNSS, Kinematic, Static, Moving-Baseline, Fixed, PPP-Kinematic, PPP-Staticand PPP-Fixed 3. It supports many standard formats and protocols for GNSS: 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 4. It supports several GNSS receivers' proprietary messages: !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) 5. It supports external communication via: Serial, TCP/IP, NTRIP, local log file (record and playback) and FTP/HTTP (automatic download) 6. It provides many library functions and APIs for GNSS data processing: 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 7. It includes the following GUI and CUI APs: ||= Function =||= GUI AP =||= CUI AP =|| || AP Launcher || RTKLAUNCH || - || || Real-Time Positioning || RTKNAVI || RTKRCV || || Communication Server || STRSVR || STR2STR || || Post-Processing Analysis || RTKPOST || RNX2RTKP || || RINEX Converter || RTKCONV || CONVBIN || || Plot Solutions and Observation Data || RTKPLOT || - || || Downloader of GNSS Data || RTKGET || - || || NTRIP Browser || SRCTBLBROWS || - || 8. 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. == Third Party RTK Solution: !PointPerfect U-blox also provides a GNSS augmentation service called !PointPerfect. It features the following: * 3-6 cm¹ accuracy and convergence within seconds * Uniform coverage on a continental scale, coverage map [https://www.u-blox.com/en/pointperfect-service-coverage here] * 99.9% uptime availability via internet and L-band satellite * Lower bandwidth to reduce user data costs * On Demand Pricing * Pre-integrated with u-blox F9 and D9 high precision GNSS modules [https://developer.thingstream.io/guides/location-services/pointperfect-getting-started Info Link] > Contact Gateworks Sales Department {{{sales@gateworks.com}}} to get a free 1-month access code! !PointPerfect can get extremely accurate positioning data extremely quickly with relatively low bandwidth (kilobytes / minute). Combined with the [https://www.gateworks.com/products/mini-pcie-expansion-cards/gw16132-mini-pcie-expansion-card/ GW16132] for LTE/Bluetooth, differential fixes can be easily received in hard-to-reach locations. The easiest way to use !PointPerfect with the ZED-F9P is through [https://github.com/semuconsulting/pygnssutils pygnssutils]. Our examples also leverage the GW16132 for cellular connectivity and were able to get very precise data in a moving vehicle, even with relatively low reception, though !PointPerfect has various delivery methods (NTRIP, MQTT, L-Band). For this example, the script works without too much configuration since Linux configures cellular modems to make connections work seamlessly. The bare-minimum python program for a NTRIP client with pygnssutils can be found on their [https://github.com/semuconsulting/pygnssutils/blob/main/examples/rtk_example.py git repo]. The data collected was output to a file containing location data over time, and then converted to KML format to be imported into Google Earth. !PointPerfect uses SPARTN in lieu of RTCM3.x data as it is claimed to be data-saving relative to other NTRIP protocol formats. After around an hour of using the NTRIP service there was only around 500kB of data usage while simultaneously getting centimeter-level accuracy in a moving vehicle (at 1 sample/second location data). [[Image(https://trac.gateworks.com/raw-attachment/wiki/expansion/gw16143/gw_gps_earth.png,width=800)]] Free-to-use rtk base stations (such as rtk2go.com) or your own base station can be used to get NTRIP corrections for high accuracy without a subscription, but !PointPerfect poses itself as a great solution given it's scalability, security, reliability, and simple integration. If you want to evaluate it for yourself, contact {{{sales@gateworks.com}}} for a 1 month free access code. [[Image(point.jpg, width=500)]] == = Hardware Headers & Pinouts == J1 Antenna Standard MMCX Connector (Molex 73415-2061) '''Note an active antenna is required by the ZED-F9P''' Recommended Antenna: * u-blox ANN-MB-00 Multi-band active GNSS antenna w/5m cable and SMA Male connector [https://www.u-blox.com/en/product/ann-mb-series Link] * u-blox ANN-MB-2 Multi-band active GNSS antenna w/5m cable and SMA Male connector[https://www.u-blox.com/en/product/ann-mb2-antenna Link] * Available at Digikey:[https://www.digikey.com/products/en?keywords=ANN-MB-00 Link] * Gateworks mating cable (GW10074 MMCX to SMA Female): [https://shop.gateworks.com/index.php?route=product/search&search=gw10074 Link] == J5 & J3 UART Headers 4-pin Right Angle 1.25mm header (Molex 0781710004) Note, J3 uses UART2 and J5 uses UART1 from the u-blox ZED-F9P ||Pin||Signal|| ||1|| 3.3VDC + || ||2|| UART_TX || ||3|| UART_RX || ||4|| GND || == J2 Timepulse Header 4-pin Right Angle 1.25mm header (Molex 0781710004) ||Pin||Signal|| ||1|| 3.3VDC + || ||2|| Timepulse || ||3|| Interrupt || ||4|| GND || == LEDs ||Reference||Description|| ||D1|| 3.3VDC Power - Green || ||D2|| Timepulse - Yellow || ||D3|| RTK - Yellow ![1]|| ||D4|| Geofence - Yellow ![1]|| * ![1] See [wiki:expansion/errata#GW16143RTKandGEOFENCELED] for related errata on rev A units. == Mini-PCIe Connector Pinout [[Image(GW16143_Minipcie.jpg, width=1000)]] == References [https://gpsd.gitlab.io/gpsd/gpsd.html GPSD Home Page] [https://gpsd.io/ubxtool-examples.html Ubxtool Examples] [https://gssc.esa.int/wp-content/uploads/2018/07/NtripDocumentation.pdf NTRIP Documentation] [https://www.u-blox.com/en/docs/UBX-18010854 ZED-F9P Interface Manual (UBX commands for ubxtool configuration)] [https://www.u-blox.com/en/docs/UBX-18055649 C099-F9P User Guide] [http://www.rtklib.com/ rtklib] = GW11048-6-A U-blox Development Kit This kit is focused providing a demo of the U-blox PointPerfect software to enable <2cm accuracy using the GW16143 Zed-F9P card. First, connect all the hardware (Mini-PCIe cards are mounted in the single board computer slots) and that the antenna is connected and has a clear view of the sky. Validate the GPS can be seen using this guide here: [#QuickStart] If desired, use the include GW16132 cellular modem to obtain an internet connection with the guide here: [wiki:expansion/gw16126] Once this is running, download the dev kit scripts from the Gateworks github on the single board computer command line: {{{ git clone https://github.com/Gateworks/gnss_devkit.git cd gnss_devkit/ }}} Then, download dependencies by running ./setup.sh which can take a few minutes while all the required packages are downloaded and installed: {{{ ./setup.sh }}} Then, configure settings.toml and .secrets.toml using your favorite text editor like vi. Then run ./start_gps.py {{{ ./start_gps.py }}}