Changes between Initial Version and Version 1 of gps


Ignore:
Timestamp:
10/22/2017 05:28:45 AM (7 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • gps

    v1 v1  
     1[[PageOutline]]
     2
     3[=#gnss]
     4= Global Navigation Satellite Systems (GNSS) =
     5GNSS (Global Navigation Satellite System) is a satellite system that is used to pinpoint the geographic location of a receiver anywhere in the world.
     6
     7Each of the following GNSS systems employ a constellation of orbiting satellites working in conjunction with a network of ground stations:
     8 * GNSS systems are currently in operation:
     9  - the United States' NAVSTAR Global Positioning System (GPS)
     10  - the Russian Federation's Global Orbiting Navigation Satellite System (GLONASS)
     11 * GNSS systems not currently at full capacity:
     12  - Europe's Galileo is slated to reach full operational capacity by 2020
     13
     14The following are similar navigation systems that do not have world-wide coverage:
     15 * China's BeiDou Navigation Satellite System
     16 * India's GPS Aided GEO Augmented Navigation (GAGAN) and Indian Regional Navigation Satellite System (IRNSS)
     17
     18References:
     19 * https://en.wikipedia.org/wiki/Satellite_navigation
     20
     21[=#gps]
     22== United States NAVSTAR Global Positioning System (GPS) ==
     23The United States NAVSTAR Global Positioning System (GPS) operates at a frequency of 1575.42MHz referred to as {{{L1C/A}}}. It has world-wide coverage originally using 24 satellites which began deployment in 1973 and became fully operational in 1995.
     24
     25Reference:
     26 * https://en.wikipedia.org/wiki/Global_Positioning_System
     27
     28[=#glonass]
     29== Russian Federation Global Orbiting Navigation Satellite System (GLONASS) ==
     30The Russian Federation Global Orbiting Navigation Satellite System (GLONASS) operates at a frequency of 1602MHz + k*562.5 (where k = -7,...,5,6) referred to as {{{L1OF}}}. It is a space-based system providing an alternative to US GPS. Deployment began in 1982 and was originally completed in 1995 but followed with a decline in capacity until fully restored to 24 satellites in 2011.
     31
     32Reference:
     33 * https://en.wikipedia.org/wiki/GLONASS
     34
     35
     36[=#sbas]
     37== Satellite-Based Augmentation System (SBAS) ==
     38A Satellite-Based Augmentation System (SBAS) is a system that supports wideo-area or regional augmentation of positioning systems.
     39
     40There are several common SBAS implementations:
     41 * [https://en.wikipedia.org/wiki/Wide_Area_Augmentation_System Wide Area Augmentation System] (WAAS) operated by the United States Federal Aviation Administration (FAA)
     42 * [https://en.wikipedia.org/wiki/European_Geostationary_Navigation_Overlay_Service European Geostationary Navigation Overlay Services] (EGNOS) operated by the European Satellite Services Provider (ESSP)
     43 * [https://en.wikipedia.org/wiki/Multi-functional_Satellite_Augmentation_System Multi-functional Satellite Augmentation System] (MSAS) operated by Japan's Ministry of Land, Infrastructure and Transport Japan Civil Aviation Bureau (JCAB)
     44 * [https://en.wikipedia.org/wiki/Quasi-Zenith_Satellite_System Quasi-Zenith Satellite System] (QZSS) operated by Japan Aerospace Exploration Agency (JAXA)
     45
     46
     47[=#software]
     48= Software Links =
     49For '''using the GPS in software''', please see the Operating Systems pages:
     50 * OpenWrt GPS - [wiki:OpenWrt/GPS See here for more information]
     51 * Yocto GPS - [wiki:Yocto/GPS See here for more information]
     52
     53
     54= Gateworks on-board GNSS Hardware =
     55Gateworks has several products that have on-board GNNS modules.
     56
     57The advantage of using a Gateworks product with an on-board modules are:
     58 * Active Antenna support (with auto-short-circuit detect/protect/recovery for some models)
     59 * PPS signal for time synchronization
     60 * tighter integration
     61
     62Refer to the individual product manuals for details of connection such as:
     63 * data serial port
     64 * PPS GPIO
     65 * Active antenna detect/protect/recovery support
     66
     67
     68[=#uart]
     69== Hardware UART and Device Mappings ==
     70The GPS devices used on Gateworks products communicate with the host processor over a serial UART:
     71 * Ventana:
     72  * GW5100: /dev/ttymxc0 [#w2sg0008i Wi2Wi W2SG0008i] 4800bd NMEA 0183 output 1Hz
     73  * GW52xx / GW53xx / GW54xx : /dev/ttymxc4 [#w2sg0008i Wi2Wi W2SG0008i] 4800bd NMEA 0183 output 1Hz
     74  * GW553x: /dev/ttymxc3  [#evam8m u-blox EVA-M8M] 9600bd NMEA 0183 output of GGA/GLL/GSA/GSV/RMC/VTG/TXT GPS, GLONASS, and SBAS enabled
     75 * Laguna: [#condor Trimble Condor]
     76  * GW2391: /dev/ttyS2 (Gateworks 'specials' can alternately map this /dev/ttyS1)
     77  * GW2388: /dev/ttyS2 (Gateworks 'specials' can alternately map this /dev/ttyS1)
     78  * GW2380: /dev/ttyS1
     79 * Avila / Cambria: [#copernicus Trimble Copernicus]
     80
     81
     82[=#hardware]
     83== Hardware Devices Used ==
     84
     85[=#evam8m]
     86=== '''u-blox EVA-M8M-0''' (GW553x) ===
     87References
     88- [http://dev.gateworks.com/datasheets/u-blox/EVA-M8M-FW3_Datasheet.pdf EVA-M8M Datasheet]
     89- [http://dev.gateworks.com/datasheets/u-blox/u-blox8-M8_ReceiverDescrProtSpec_(UBX-13003221)_Public.pdf u-blox M8 Receiver Protocol Specification]
     90
     91Features:
     92 * 72-channel u-blox M8 concurrent position receiver engine supporting multiple concurrent Global Navigation Satellite System's (GNSS):
     93  - [#gps GPS]: L1C/A (1575.42MHz)
     94  - [#glonass GLONASS]: L1OF (1602MHz)
     95  - [#qzss QZSS]: L1C/A (1575.42MHz)
     96  - [#sbas SBAS]: WAAS/EGNOS/MSAS: L1C/A (1575.42MHz)
     97 * [#dgps Differential GPS] (DGPS): [#rtcm RTCM] 10402.3:
     98 * Navigation Update Rate: 10Hz (GPS&GLONASS) or 18Hz (GPS) 
     99 * Accuracy:
     100  - Velocity: 0.05m/s
     101  - Heading: 0.3degrees
     102  - Horiz position: Autonomous 2.5m / SBAS 2.0m
     103  - PPS: 30ns RMS, 99% 60ns
     104 * Sensitivity:
     105  - Tracking & Navigation: -164dBm (GPS&GLONASS) -163dBm (GPS)
     106  - Re-acquisition: -159dBm
     107  - Cold start: -147dBm
     108 * Acquisition:
     109  - Cold start Time-to-First-Fix (TTFF): 27s (GPS&GLONASS) or 30s (GPS only)
     110  - Hot start Time-to-First-Fix (TTFF): 1s
     111 * [#pps PPS]:
     112  - configurable rate: 0.25Hz to 10Mhz
     113  - configurable polarity
     114  - configurable pulse-width: 2^32^ micro-seconds or duty-cycle
     115  - Note that for best PPS accuracy it is recommended to disable the SBAS subsystem
     116 * Communication:
     117  - 9600 baud, 8bit no parity, 1 stop bit, no flow control supporting multiple protocols:
     118   - [#nmea0183 NMEA]: Input / Output ASCII 0183 version 4.0 (configurable for 2.3 or 4.1)
     119   - [#ubx UBX]: Input / Output binary u-blox proprietary
     120   - [#rtcm RTCM]: Input, messages 1,2,3,9
     121 * Active Antenna: 15dB to 50dB recommended
     122 * Power Consumption (not including active antenna power consumption):
     123  - ~27mA (90mW) during acquisition for GPS & GLONASS, 22mA for GPS/QZSS/SBAS
     124  - ~25mA (83mW) during continuous mode tracking for GPS & GLONASS, 19mA for GPS/QZSS/SBAS
     125  - ~5.5mA (18mW) during 1Hz power-save mode tracking (for GPS/QZSS/SBAS only)
     126
     127Power-on Defaults:
     128 * 9600 baud, 8 data bits, no parity, 1 stop bit:
     129 * GPS & GLONASS enabled
     130 * SBAS enabled
     131 * output: NMEA: GGA, GLL, GSA, GSV, RMC, VTG, TXT messages
     132 * input: UBX, NMEA, RTCM
     133 * PPS: 100ms active high pulse at 1Hz
     134
     135Note that the EVA-M8M is not connected to an RTC, battery backup, or external flash on Gateworks designs (which disallows for permanent configuration storage and firmware upgrade)
     136
     137
     138[=#ubx]
     139==== u-blox Receiver Protocol (UBX) ====
     140UBX is a u-blox proprietary binary communication protocol used in their GNSS engines.
     141
     142Reference:
     143 * [https://www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_(UBX-13003221)_Public.pdf M8 Receiver protocol: UBX-13003221]
     144
     145
     146==== NMEA considerations for EVA-M8M ====
     147The following need to be taken into consideration when operating in multi-GNSS mode (Note that the power-on default is GPS & GLONASS):
     148 - multiple sets of GSV messages will be output back to back, 1 for each system
     149 - multiple sets of GSA and GRS messages are output for each fix, one for each GNSS
     150
     151The main Talker ID (the two-letter identifier) will vary based on GNSS configuration:
     152 * GPS/SBAS/QZSS - '''GP'''
     153 * GLONASS - '''GL'''
     154 * GNSS - '''GN''' (message pertaining to any type of GNSS)
     155
     156
     157[=#w2sg0008i]
     158=== '''Wi2Wi W2SG0008i''' (GW54xx-C+, GW53xx, GW52xx, GW51xx) ===
     159References:
     160 * [http://dev.gateworks.com/datasheets/w2sg0008i/W2SG0008i.pdf Product Brief]
     161 * [http://dev.gateworks.com/datasheets/w2sg0008i/W2SG0008i_Datasheet_Rev1.48.pdf Product Datasheet]
     162 * [http://dev.gateworks.com/datasheets/w2sg0008i/NMEA_Reference_Manual_(CS-129435-MA-1).pdf NMEA Reference Manual (CS-129435-MA-1)]
     163 * [http://dev.gateworks.com/datasheets/w2sg0008i/One_Socket_Protocol_Interface_Control_Document_(OSP_ICD)_(CS-129291-DC-15).pdf One Socket Protocol Interface Control Document (OSP_ICD) (CS-129291-DC-15)]
     164
     165Features:
     166 * CSR/SiRF SiRFStarIV GSD4e
     167 * 48 channel continuous tracking receiver (reports best 12 of 48):
     168  - [#gps GPS]: L1C/A (1575.42MHz)
     169  - [#sbas SBAS]: WAAS/EGNOS/MSAS/GAGAN: L1C/A (1575.42MHz)
     170 * [#dgps Differential GPS] (DGPS)
     171 * Navigation Update Rate 1-5Hz
     172 * Acquisition:
     173  * Hot Start TTFF@-136dBm: 0.6sec
     174  * Min Acquisition Signal: -153dBm
     175 * Sensitivity: Tracking -163dBm / Acquisition -148dBm
     176 * Accuracy:
     177  * 3m stationary horizontal (with DGPS), 15m stationary horizontal (without DPGS)
     178 * Communication:
     179  * 8 data bits, no parity, 1 stop bit (aka '''8N1''' or '''cs8'''), no flow control
     180  * baudrate: can vary between 4800 and 115200 (see below)
     181  * [#nmea0183 NMEA 0183] v3.01, configurable 1 to 255 seconds between messages, supports: GGA, GLL, GSA, GSV, RMC, VTG, ZDA messages
     182  * [#osp OSP™] (SiRF BINARY™) proprietary protocol
     183 * [#pps PPS]: rising edge 1Hz 4.2us (requires 5+ satellites)
     184 * Internal LNA Gain:
     185  * High Gain Mode '''(default)''' intended for use with passive antennas
     186  * Low Gain Mode intended for use with active antennas (that have their own LNA)
     187
     188Power-on Default configuration:
     189 * 4800 baud
     190 * NMEA 0183 output 1Hz
     191 * LNA high gain mode
     192
     193
     194==== W2SG0008i (SiRFStarIV) NMEA Command Reference: ====
     195References:
     196 * [http://dev.gateworks.com/datasheets/w2sg0008i/NMEA_Reference_Manual_(CS-129435-MA-1).pdf NMEA Reference Manual (CS-129435-MA-1)]
     197
     198Notes:
     199 * NMEA 4800bd 8N1 (8 data bits, no parity, 1 stop bit) is the default power-on communication mode of the W2SG0008i
     200 * Flow control is not used between the GPS and the host processor and thus should be disabled
     201 * SiRF NMEA reports a maximum of 12 satellites in its GSV messages even though more may be visible (use [#osp OSP] protocol if you want more detail on the 48 channels)
     202
     203
     204Examples:
     205 * The proprietary PSRF100 command will change the baudrate and data format. Consult the reference manual (above) section 2-3 for more info.
     206  * Example: '''To change the baud from the power-on default 4800bd to 9600bd''':
     207{{{#!bash
     208# set tty for current baudrate and data format
     209stty -F /dev/gpsdevice 4800 cs8
     210# send a PSRF100 command to set the format (1=NMEA mode) baudrate (9600) and data format
     211echo "\$PSRF100,1,9600,8,1,0*0D" > /dev/gpsdevice
     212# set new tty baudrate for further communication
     213stty -F /dev/gpsdevice 9600
     214}}}
     215   * 1,9600,8,1 is the data payload. Specifically, the first '1' specifies that this is a NMEA message, while the rest of the payload determines the speed of the GPS receiver.
     216   * ensure that /dev/gpsdevice corresponds to the correct tty above in the [#hardware hardware mappings section]
     217   * if changing the above NMEA sentence, be sure to [http://www.hhhh.org/wiml/proj/nmeaxor.html update the checksum]
     218 * The proprietary PSRF103 command will set the rates of the various NMEA messages.  Consult the reference manual (above) section 2-6 for more info.
     219  * Example: '''To set the period of all messages to one every 1 seconds''':
     220{{{#!bash
     221# set tty for current baudrate and data format assuming power-on default of 4800bd 8N1
     222stty -F /dev/ttymxc4 4800 cs8
     223echo "\$PSRF103,00,00,01,01*26" > /dev/gpsdevice # GGA every 2 sec
     224echo "\$PSRF103,01,00,01,01*25" > /dev/gpsdevice # GLL every 2 sec
     225echo "\$PSRF103,02,00,01,01*28" > /dev/gpsdevice # GSA every 2 sec
     226echo "\$PSRF103,03,00,01,01*27" > /dev/gpsdevice # GSV every 2 sec
     227echo "\$PSRF103,04,00,01,01*22" > /dev/gpsdevice # RMC every 2 sec
     228echo "\$PSRF103,05,00,01,01*21" > /dev/gpsdevice # VTG every 2 sec
     229}}}
     230   * if changing the above NMEA sentences, be sure to [http://www.hhhh.org/wiml/proj/nmeaxor.html update the checksum]
     231   * ensure that /dev/gpsdevice cooresponds to the correct tty above in the [#hardware hardware mappings section]
     232
     233
     234[=#osp]
     235==== One Socket Protocol (OSP), aka SiRF Binary Protocol ====
     236One Socket Protocol (OSP), also known as the SiRF BINARY™ protocol, is a binary communication protocol available with the SiRFstar family of GPS receiver products from SiRF (which was purchased by CSR). In general, there are more message types and data available when using this protocol over NMEA 0183.
     237
     238References:
     239 *
     240[http://dev.gateworks.com/datasheets/w2sg0008i/One_Socket_Protocol_Interface_Control_Document_(OSP_ICD)_(CS-129291-DC-15).pdf One Socket Protocol Interface Control Document (OSP_ICD) (CS-129291-DC-15)]
     241
     242Examples:
     243 * '''To switch from NMEA 4800bd 8N1 to OSP at 9600 baud''', you can use the following bash script:
     244{{{
     245#!/bin/sh
     246
     247# Make sure we talk to the device at its current configured data format
     248# (assuming power-on default of 4800 8N1)
     249stty -F /dev/gpsdevice 4800 cs8
     250
     251# change to mode=0 (OSP/SiRF binary) 9600bd 8N1
     252echo "\$PSRF100,0,9600,8,1,0*0C" > /dev/gpsdevice
     253
     254# set new tty baudrate for future communication
     255stty -F /dev/gpsdevice 9600
     256}}}
     257  * if changing the above NMEA sentences, be sure to [http://www.hhhh.org/wiml/proj/nmeaxor.html update the checksum]
     258  * ensure that /dev/gpsdevice cooresponds to the correct tty above in the [wiki:gps#HardwareUARTMappings hardware mappings section]
     259 * '''To switch from OSP at 9600bd back to NMEA 4800bd''', you can use the following bash script:
     260{{{
     261#!/bin/sh
     262send_hex() {
     263  while [ "$1" ]; do
     264    printf "\x$1"
     265    shift
     266  done
     267}
     268
     269# Make sure we talk to the device at its current configured data format
     270# (assuming it has been changed to 9600bd)
     271stty -F /dev/gpsdevice 9600 cs8
     272
     273# send MID 129: Switch to NMEA protocol
     274send_hex A0 A2 00 18 > /dev/gpsdevice # start sequence and payload length (24 bytes)
     275send_hex 81 02 01 01 01 01 01 01 01 01 01 01 01 01 00 01 00 01 00 01 00 00 12 C0 > /dev/gpsdevice # payload specifying baudrate and msg rates
     276send_hex 01 64 B0 B3 > /dev/gpsdevice # checksum and end sequence
     277
     278# set new tty baudrate for future communication
     279stty -F /dev/gpsdevice 4800
     280}}}
     281  * Note that MID 129 also specifies the period of the various NMEA messages.  If changing the above data you need to also re-calculate the checksum.  See [http://www.wi2wi.com/mgr/docs/One_Socket_Protocol_Interface_Control_Document_(OSP_ICD)_(CS-129291-DC-15).pdf here] section 5.4 for more info on the MID 129 message
     282  * ensure that /dev/gpsdevice cooresponds to the correct tty above in the [wiki:gps#HardwareUARTMappings hardware mappings section]
     283 * '''To enable SBAS based DGPS assuming you are already in 9600bd OSP mode''':
     284{{{
     285#!/bin/sh
     286
     287send_hex() {
     288  while [ "$1" ]; do
     289    printf "\x$1"
     290    shift
     291  done
     292}
     293
     294# Make sure we talk to the device at its current configured data format
     295# (assuming it has been changed to 9600bd)
     296stty -F /dev/gpsdevice 9600 cs8
     297
     298# send MID 133: DGPS Source
     299send_hex A0 A2 00 07 > /dev/gpsdevice # start sequence and payload length (7 bytes)
     300send_hex 85 02 00 00 00 00 00 > /dev/gpsdevice # payload specifying DPGS Source (Table 5.43)
     301send_hex 00 87 B0 B3 > /dev/gpsdevice # checksum and end sequence
     302}}}
     303  * when DPGS is enabled GGA NMEA messages will show a ''position fix indicator'' of 2 to indicate a DGPS fix vs 1 to indicate a GPS fix.
     304  * use MID 170 to set SBAS parameters if you need to change the SBAS mode or region between WAAS/EGNOS/MSAS/GAGAN
     305
     306
     307[=#w2sg0008i-lna]
     308==== W2SG0008i LNA Gain ====
     309The W2SG0008i used on most Gateworks Ventana boards defaults on power-up to use its internal high gain LNA which is appropriate for passive antennas but not necessarily appropriate for active-antennas which have their own LNA at the antenna.
     310
     311While Gateworks has tested,,1,, and found no adverse affects in terms of GPS sensitivity and accuracy when using the [http://shop.gateworks.com/index.php?route=product/product&path=70_71&product_id=51 GW10044 Active GPS antenna] with the default power-up high-gain internal LNA your results may vary depending on your antenna and system characteristics.
     312
     313If you wish to configure the Ws2G0008i internal LNA for low-gain you must do the following according to the [http://dev.gateworks.com/datasheets/w2sg0008i/W2SG0008i_Datasheet_Rev1.48.pdf W2SG0008i datasheet] section 6.4.1:
     314 1. Switch GPS Communication Protocol from NMEA to OSP mode.
     315 2. Send Tracker Configuration Message (OSP MID 178, 02) - (Disable Internal LNA and drive GPS_EXT-LNA_EN signal)
     316 3. Wait for SiRFStarIV ACK
     317 4. Perform a Hot Start reset; Tracker Configuration setting requests in message (OSP MID 178, 02) will apply after performing this reset.
     318 5. Wait for SiRFStarIV ACK
     319 6. Switch GPS Communication Protocol back to NMEA.
     320
     321The gateworks-gps-utils.tar.gz attached at the bottom of this page contains source for a C application "sirf_osp" that will do the above in a short series of commands. After building the application for your BSP run the following commands to put the gps module into LNA low gain mode:
     322{{{#!bash
     323DEVICE="/dev/ttymxc4" # Refer to Hardware UART Mappings section above to verify device
     324./sirf_osp $DEVICE 4800 osp 115200  # Changes board from default NMEA/4800 to OSP/115200
     325./sirf_osp $DEVICE 115200 lna low   # Sends OSP command for LNA low mode
     326./sirf_osp $DEVICE 115200 config    # Prints configuration to verify LNA mode of low ("LNA:1")
     327}}}
     328 ,,1 See Indoor GPS Testing section below for test details and complete sirf_osp usage example
     329
     330
     331[=#condor]
     332===  '''Trimble Condor''' 68674-00 C1011 (GW2380, GW2382, GW2383, GW2387, GW2388, GW2389, GW2391) ===
     333
     334References:
     335 * [http://dev.gateworks.com/datasheets/trimble/CONDOR_UG_2C_75263-00.pdf Trimble Condor User Guide]
     336 * [http://dev.gateworks.com/datasheets/trimble/Condor_DS.pdf Datasheet]
     337 * [http://dev.gateworks.com/datasheets/trimble/Trimble_TSIP_reference_manual.pdf TSIP reference manual]
     338 * [http://dev.gateworks.com/datasheets/trimble/Trimble_TAIP-reference.pdf TAIP Protocol Reference]
     339
     340Features:
     341 * 22-channel continuous tracking receiver:
     342  - [#gps GPS]: L1C/A (1575.42MHz)
     343  - [#sbas SBAS]: WAAS: L1C/A (1575.42MHz) (disabled by default)
     344 * [#dgps Differential GPS] (DGPS)
     345 * Acquisition: cold start - 38 sec 50%
     346 * Sensitivity: Tracking -160dBm / Acquisition -146dBm
     347 * Accuracy:
     348  * Horizontal w/o SBAS: <2.5m 50%, <5m 90%
     349  * Horizontal w/ SBAS: <2.0m 50%, <4m 90%
     350  * Altitude w/o SBAS: <5m 50%, <8m 90%
     351  * Altitude w/ SBAS: <3m 50%, <5m 90%
     352  * Velocity: 0.06m/sec
     353  * PPS: +25ns 1 sigma
     354 * Communication:
     355  * 8 data bits, no parity, 1 stop bit (aka '''8N1''' or '''cs8'''), no flow control
     356  * baudrate: can vary between 4800 and 115200 - refer to user guide for details on changing baudrate
     357  * [#nmea0183 NMEA 0183] v3.0, 1Hz - 5Hz NMEA update rate, supports: GLL, RMC, VTG, GGA, GSA, GSV, ZDA messages
     358  * TSIP (Trimble Standard Interface Protocol)
     359  * TAIP (Trimble ASCII Interface Protocol)
     360 * [#pps PPS]: rising edge
     361
     362Power-on Default configuration:
     363 * 9600 baud
     364 * output NMEA {{{RMC}}}, {{{GGA}}}, {{{GSV}}}, and {{{GSA}}} messages 1 time for every position fix (1Hz)
     365
     366
     367==== NMEA Configuration ====
     368The types of NMEA messages and their rates can be configured by sending {{{PMTK}}} messages.
     369
     370Refer to the User guide for a full listing.
     371
     372Notes:
     373 * be sure to re-calculate the checksum using the [http://www.hhhh.org/wiml/proj/nmeaxor.html online NMEA sentence checksum calculator]
     374 * be sure to choose the correct serial port and baudrate found [#hardware above]
     375
     376Common configuration items:
     377 * PMTK251 - Set NMEA baud rate
     378 * PMTK313 - Set SBAS enable
     379 * PMTK314 - Set NMEA sentence types and frequency (only RMC, GGA, GSV, and GSA are enabled by default)
     380 
     381Examples:
     382 * To turn on {{{VTG}}} messages at 1Hz (course over ground and ground speed) (disabled by default):
     383{{{#!bash
     384stty -F /dev/gpsdevice 4800 cs8
     385echo -n -e "\$PMTK314,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n" > /dev/gpsdevice
     386}}}
     387
     388
     389[=#copernicus]
     390=== '''Trimble Copernicus''' 63530-00 (GW2350, GW2355, GW2358, GW16033, GW16039) ===
     391
     392References:
     393 * [http://dev.gateworks.com/datasheets/trimble/Trimble_CopernicusII_reference_manual.pdf Copernicus II Reference Manual]
     394 * [http://dev.gateworks.com/datasheets/trimble/Copernicus-II_DS.pdf Copernicus II Datasheet]
     395 * [http://dev.gateworks.com/datasheets/trimble/Trimble_TSIP_reference_manual.pdf TSIP reference manual]
     396 * [http://dev.gateworks.com/datasheets/trimble/Trimble_TAIP-reference.pdf TAIP Protocol Reference]
     397
     398Features:
     399 * 12-channel continuous tracking receiver:
     400  - [#gps GPS]: L1C/A (1575.42MHz)
     401  - [#sbas SBAS]: WAAS/EGNOS/MSAS: L1C/A (1575.42MHz)
     402 * [#dgps Differential GPS] (DGPS)
     403 * Acquisition: cold start - 38 sec 50%
     404 * Sensitivity: Tracking -160dBm / Acqusition -142dBm
     405 * Accuracy:
     406  * Horizontal w/o SBAS: <2.5m 50%, <5m 90%
     407  * Horizontal w/ SBAS: <2.0m 50%, <4m 90%
     408  * Altitude w/o SBAS: <5m 50%, <8m 90%
     409  * Altitude w/ SBAS: <3m 50%, <5m 90%
     410  * Velocity: 0.06m/sec
     411  * PPS: +60ns RMS
     412 * Communication:
     413  * 8 data bits, no parity, 1 stop bit (aka '''8N1''' or '''cs8'''), no flow control
     414  * baudrate: can vary between 4800 and 115200 - refer to user guide for details on changing baudrate
     415  * [#nmea0183 NMEA 0183] v3.0, 1Hz - 5Hz update rate, supports: ZDA, GGA, GLL, VTG, GSA, GSV, RMC messages (output in that order)
     416  * TSIP (Trimble Standard Interface Protocol)
     417  * TAIP (Trimble ASCII Interface Protocol)
     418 * [#pps PPS]:
     419  * rising edge 1Hz 61ns
     420  * requires fix interval set to 1000ms or less - see datasheet for details
     421
     422Power-on Default configuration:
     423 * 4800 baud
     424 * output NMEA {{{GGA}}}, {{{VTG}}} messages 1 time for every position fix (1Hz)
     425
     426[=#antenna]
     427== Antennas ==
     428GPS receivers can use active or passive GPS antennas. An active antenna is powered and uses an LNA (Low Noise Amplifier) at the antenna instead of at the GPS receiver making it more sensitive than a typical passive antenna.
     429
     430Some of the GPS modules can be used with passive antenna. See the modules datasheet for more information. Gateworks provides 3.3V for the active antenna DC voltage on all boards.
     431
     432Gateworks typically uses a 50 ohm MMCX connector on it's board however as a special configuration a U.FL connector can be loaded in the same location.
     433
     434Here is an SMA antenna we sell in our shop that is 50 Ohm and 27-28 dBi (+- 3-4dBi) - GW10044:
     435 * Shop [http://shop.gateworks.com/index.php?route=product/product&path=70_71&product_id=51 Gateworks Shop - GPS Antenna]
     436 * [http://dev.gateworks.com/datasheets/trimble/Trimble_GPS_Antennas.pdf Datasheet]
     437
     438Antenna Adapter Cables:
     439 * GW10074 SMA to MMCX: [http://shop.gateworks.com/index.php?route=product/product&product_id=59&search=gw10074 GW10074]
     440 * GW10036 SMA to U.FL: [http://shop.gateworks.com/index.php?route=product/product&product_id=42&search=gw10036 GW10036]
     441 * GW10053 SMA to U.FL: (long barrel for thick enclosures): [http://shop.gateworks.com/index.php?route=product/product&product_id=15&search=gw10053 GW10053]
     442 * GW10037 SMA to N-Male: [http://shop.gateworks.com/index.php?route=product/product&product_id=43&search=gw10037 GW10037]
     443 * GW10080 Fakra to MMCX(special order, contact factory): [http://shop.gateworks.com/index.php?route=product/product&product_id=62&search=gw10080 GW10080]
     444
     445=== u-blox EVA-M8M (Ventana product family) ===
     446Maximum Antenna Gain:
     447 * 15dB to 50dB recommended
     448
     449Please also consult the manual / datasheet [#evam8m above].
     450
     451=== Wi2Wi module (Ventana product family) ===
     452Maximum Antenna Gain:
     453 * In high gain mode, a passive antenna acts as input. Total RF gain (sum of internal LNA gain, cable and filter losses) of ≤ 5 dB is considered acceptable.
     454 * In low gain mode, an active antenna acts as input. Total RF gain (sum of external antenna gain, internal LNA gain, cable and filter losses) of '''14 to 24 dB is considered acceptable'''.
     455
     456Please also consult the manual / datasheet [#w2sg0008i above].
     457
     458=== Trimble Condor (Laguna product family) ===
     459Maximum Antenna Gain:
     460 * Passive: Does not support
     461 * Active: 36dB
     462
     463Please also consult the manual / datasheet [#condor above].
     464
     465=== Trimble Copernicus (Avila / Cambria product family) ===
     466Maximum Antenna Gain:
     467 * Passive: Does not support
     468 * Active: 36dB
     469
     470Please also consult the manual / datasheet [#copernicus above].
     471
     472=== Active Antenna Short Circuit Detect / Recover ===
     473All Gateworks boards with on-board GPS support active (powered) GPS antenna connections. On many boards that have a [wiki:gsc Gateworks System Controller] the antenna power is periodically monitored (1Hz) for short circuit and automatically disabled/re-enabled to allow resolving the GPS antenna without power cycling the unit.
     474
     475See the product manual for your board to determine if it has this capability.
     476
     477
     478[=#usb]
     479= Add-in cards supporting GPS =
     480There are many GPS receivers that communicate over UART or USB-UART. Some of these are in the miniPCIe form-factor which provides USB to the connector (Note that USB is not routed to all Gateworks miniPCIe connectors - consult the product user manual for details on your board).
     481
     482References:
     483 * [wiki:wireless/modem#SpecificModemNotes Modem Notes]
     484 * Option GTM6xx:
     485  * [http://www.option.com/download/?file=GTM6xx_Nyos_AT_Command_GPS_v015ext.pdf AT command set]
     486  * [http://www.option.com/product/gtm671wfsgtm679wfs/ Product Brief]
     487
     488
     489[=#nmea0183]
     490= NMEA 0183 =
     491NMEA 0183 is a combined electrical and data specification for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GPS receivers and many other types of instruments. It has been defined by, and is controlled by, the National Marine Electronics Association. It replaces the earlier NMEA 0180 and NMEA 0182 standards.[1] In marine applications, it is slowly being phased out in favor of the newer NMEA 2000 standard.
     492
     493Most GPS receivers use this standard for communication, however typically they may only use a subset of the standard, add their own proprietary commands, and use different baudrates.  Refer to the specific GPS receiver documentation being used for details.
     494
     495Most GPS devices allow customizing the NMEA output such as the UART baudrate, the types of messages, and the rate at which they are sent. Please see sections above for the particular GPS device you are interested in configuring
     496
     497NMEA messages end with a checksum and most devices will ignore messages with an invalid checksum. You can use the [http://www.hhhh.org/wiml/proj/nmeaxor.html online NMEA sentence checksum calculator] to aid you.
     498
     499References:
     500 * [http://en.wikipedia.org/wiki/NMEA_0183 Wikipedia NMEA 0183]
     501 * NMEA reference - http://www.gpsinformation.org/dale/nmea.htm
     502 * NMEA sentence checksum calculator - http://www.hhhh.org/wiml/proj/nmeaxor.html
     503
     504
     505[=#pps]
     506= Time synchronization via PPS (Pulse-Per-Second) =
     507One handy feature of an on-board GPS is that it can deliver Pulse-Per-Second (PPS) signal.  This signal can be used to get a high-precision time reference that an application can use to adjust system clock time.  Common use is to configure the Network Time Protocol Daemon (NTPD) with a PPS source to obtain a wallclock-time with sub-millisecond synchronization to UTC.
     508
     509Our 14.08 BSP for both Laguna and Ventana families includes PPS support already (if a GPS is present). However, in order to hook NTPD with a PPS source, you have to have the fully featured ntpd package (i.e. not busybox). Below is an example of how to configure ntpd to use GPS and use PPS to keep syncronization:
     510* Make sure you have the fully featured ntpd package via selecting ntpd in [wiki:OpenWrt/kernelconfig].
     511* Run the following steps (This is on GW5400, please see proper /dev/ttyX for your device) [http://www.catb.org/gpsd/gpsd-time-service-howto.html GPSD Time Service]
     512{{{#!bash
     513$ killall -9 gpsd ntpd
     514$ ntpd -gN
     515$ sleep 2
     516$ gpsd -n /dev/ttymxc4 # ttymxc4 for GW5400, might be different for different boards
     517$ sleep 2
     518$ cgps # not needed
     519}}}
     520* Note that cgps is part of the gpsd program. It is a "test client" for gpsd, though it shows very relevant information.
     521* That's it! With gpsd and ntpd running, you have successfully configured your system time to come from GPS data.
     522
     523
     524For BSP's that do not include PPS by default, refer to the following guide.
     525
     526Gateworks boards with on-board GPS use ARM Host GPIO lines for PPS sources.  Therefore you would want to [wiki:OpenWrt/kernelconfig configure your kernel] with:
     527 * CONFIG_PPS - enable PPS support
     528 * CONFIG_NTP_PPS - enable PPS kernel consumer (direct in-kernel time synch using PPS source)
     529 * CONFIG_PPS_CLIENT_GPIO - add support for a PPS source using GPIO
     530 * Configure "pps-gpio" driver:
     531  * Device-Tree Boards (ie Ventana/Newport):
     532   * This is already done in the device tree for on-board GPS.
     533{{{
     534pps {
     535           compatible = "pps-gpio";
     536           pinctrl-names = "default";
     537           pinctrl-0 = <&pinctrl_pps>;
     538           gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
     539           status = "okay";
     540};
     541
     542pinctrl_pps: ppsgrp {
     543           fsl,pins = <
     544              MX6QDL_PAD_ENET_RXD1__GPIO1_IO26          0x1b0b1
     545           >;
     546};
     547 
     548}}}
     549  * Non Device-Tree Boards (ie Laguna):
     550   * Add a "pps-gpio" platform resource to the kernel board support file (ie arch/arm/mach-cns3xxx/laguna.c for Laguna)
     551    - see include/linux/pps-gpio.h for struct pps_gpio_platform_data
     552    - define gpio_pin (ie 0 for GW2388)
     553    - define gpio_label (ie "GPS_PPS")
     554    - define assert_falling_edge=0 (PPS is a rising edge)
     555    - define capture_clear=0 (capture PPS 'assertions')
     556    - make sure you comment out any other exporting of this GPIO (ie 'GPS_PPS' export from laguna_gpio_gw2388)
     557    - this will create an entry in /sys/class/pps/pps0
     558
     559The PPS signal is also routed to a spare pin on the miniPCIe slots of many models:
     560||= Model =||= Revision Introduced =||= Pin =||= PCIe Slot =||= Resistor Loading =||
     561|| GW51xx || Rev C               || 49       || J6    || R118            ||
     562|| GW52xx || Rev C               || 49       || J7,J8 || R190/J8 R191/J7 ||
     563|| GW53xx || Rev C               || 49       || J7,J8 || R212/J7 R213/J8 ||
     564|| GW553x || Rev A               || 49       || J5    || R31             ||
     565|| GW54xx || Rev E               || 49       ||       ||                 ||
     566
     567Reference:
     568 - [http://linuxpps.org/wiki/index.php/Main_Page LinuxPPS]
     569  - The Kernel side of PPS support was added in 2.6.31 - see [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=eae9d2ba0cfc27a2ad9765f23efb98fb80d80234 here]
     570 - [http://www.catb.org/gpsd/gpsd-time-service-howto.html GPSD Time Service] - Lots of examples relating to gpsd
     571 - [http://tools.ietf.org/html/rfc2783 RFC 2783] - Pulse-Per-Second API for UNIX-like Operating Systems.  This describes the Linux OS API for userland applications to access a PPS source.
     572 - http://gpsd.berlios.de/gpsd.html - there is some info in the gpsd manpage about PPS, time accuracy and ntp synchronization
     573 - [http://lxr.linux.no/linux+v2.6.38.8/Documentation/pps/pps.txt Documentation/pps/pps.txt] - Linux kernel API/support for synchronizing system time from a PPS source directly (Note this is the API that drivers/pps/clients/pps-gpio.c conforms to)
     574 - [http://lxr.linux.no/linux+v2.6.38.8/Documentation/ABI/testing/sysfs-pps Documentation/ABI/testing/sysfs-pps] - Linux sysfs pps class documentation (sysfs API for Userland apps to interface with PPS from LinuxPPS kernel support above)
     575 - [http://lxr.linux.no/linux+v2.6.38.8/include/linux/pps.h include/linux/pps.h] - Linux ioctl pps documentation/support (ioctl API for Userland apps to interface with PPS from LinuxPPS kernel support above)
     576
     577
     578[=#dgps]
     579= Differential GPS (DGPS) =
     580[http://en.wikipedia.org/wiki/Differential_GPS Differential Global Positioning System] (DGPS) is an enhancement to GPS that provides improved location accuracy from the 15-meter nominal GPS accuracy to about 10cm in the case of the best implementations.
     581
     582
     583[=#rtcm]
     584== Radio Technical Commission for Maritime Services (RTCM) ==
     585The standards applying to Differential Global Navigation Satellite Systems (DGNS) are defined by the Special Committee 104 of the [http://www.rtcm.org/overview.php#Standards Radio Technical Commission for Maritime Services] (RTCM). Except for RTCM, there exist other proprietary DGPS standards, such as Trimble Compact Measurement Record (CMR).
     586
     587References:
     588 * http://www.navipedia.net/index.php/DGNSS_Standards#RTCM_Standards
     589
     590
     591== Traditional land-based beacon DGPS ==
     592Traditional DGPS uses a network of fixed ground-based reference stations that broadcast the difference between their known location and the location determined via GPS.  These stations would broadcast using VHF/UHF which traditionally were available on maritime vessels where GPS was originally intended to be used.
     593
     594To use this you must have a receiver that can receive both GPS broadcasts as well as the VHF/UHF broadcasts from the land-based beacons.  In addition you need to be in an area that has such land based beacons.  The U.S. Coast Guard and Canadian Coast Guard operate these near large waterways.
     595
     596
     597[=#waas]
     598== Wide Area Augmentation System (WAAS) ==
     599An alternative system was developed called Wide Area Augmentation System (WAAS) which uses satellites in geostationary orbit that receive broadcasts from fixed ground-based stations.  In this system the additional satellites periodically broadcast (about every 5 seconds) a Deviation Correction (DC) created from the data continually received from the ground based reference systems.  This signal can be received with the same receiver used to receive signals from traditional GPS satellites.
     600
     601To use this you need only a receiver that can receive GPS broadcasts, however you still need to be in an area that both has ground based reference stations and need to have at least 1 SBAS capable satellite in view.  This system was created for North America however there are SBAS based systems being developed in Europe and Asia as well:
     602 * SBAS - North America / Hawaii Satellite-Based Augmentation System
     603 * EGNOS - European Geostationary Navigation Overlay Service
     604 * MSAS - Jpanase Multi-functional Satellite Augmentation System
     605 * GAGAN - Indian GPS Aided Geo Augmented Navigation
     606
     607
     608[=#test]
     609= Indoor GPS Testing =
     610Gateworks uses a GPS repeater when doing in-building GPS testing. These can be found from a variety of vendors:
     611
     612The unit we use is the [http://www.amazon.com/Signal-Repeater-Amplifier-Transfer-Distance/dp/B00IIEEJUW/ref=br_lf_m_ckrph3puz9ft7ot_1_1_ttl?ie=UTF8&s=gps Sumalink SL1500] available for $200 and features:
     613 * L1 GPS: 1575±5MHz
     614 * 5V DC input
     615 * Interference suppression: >=20dB;
     616 * Reflection loss: -14dB
     617 * Range: 15 meters (re-transmission range)
     618 * Cable: 30 meters (cable from rooftop receiver to transmitter)
     619
     620[[Image(SL1500.jpg,400px)]]
     621
     622We use various test software including:
     623 * [http://trac.gateworks.com/attachment/wiki/gps/test_gps test_gps] - shell script that parses GSV, GGA, GSA messages and provides fix, average satellites in view, and signal strength details
     624 * gpsd and related clients (gpxlogger can capture a path to an XML file, GPS Babel can convert GPX log to KML, Google Earth can view KML files)
     625 * sirf_osp - C application used for sending commands and receiving messages from ventana gps devices
     626
     627An example of a test procedure carried out on our gps devices was the verification of optimal LNA mode for Ventana boards when using our standard active antenna. The procedure for this test is defined as follows:
     628 1. Power on the device with antenna connected
     629 2. Download the gateworks-gps-utils.tar.gz (see bottom attachments) and extract
     630 3. Use the Makefile provided to build the sirf_osp application (refer to your BSP's 'Building' wiki for help)
     631 4. Make the application executable {{{chmod +x sirf_osp}}}
     632 5. Put the device into osp mode {{{./sirf_osp <device> <baud> osp 115200}}}
     633 6. Set the LNA mode of the device {{{./sirf_osp <device> 115200 lna <low/high>}}}
     634 7. Verify the LNA mode via the "LNA:X" field of {{{./sirf_osp <device> 115200 config}}}
     635 8. Begin storing gps fix data to file {{{./sirf_osp <device> 115200 csv <filename>}}}
     636 9. Use gps visualization tool of your choice to analyze gathered data (e.g. Google My Maps)
     637
     638 ,,*Note: If any sirf_osp command results in a stream of gps data, retrying the command with the correct arguments will typically solve the problem.