'\" t .\" Title: gpsrinex .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 6 December 2020 .\" Manual: GPSD Documentation .\" Source: The GPSD Project .\" Language: English .\" .TH "GPSRINEX" "1" "6 December 2020" "The GPSD Project" "GPSD Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" gpsrinex \- Read data from gpsd convert to RINEX3 and save to a file\&. .SH "SYNOPSIS" .HP \w'\fBgpsrinex\fR\ 'u \fBgpsrinex\fR [\-\-agency\ \fIAGENCY\fR] [\-\-ant_e\ \fIEASTING\fR] [\-\-ant_h\ \fIHEIGHT\fR] [\-\-ant_n\ \fINORTHING\fR] [\-\-ant_num\ \fINUM\fR] [\-\-ant_type\ \fITYPE\fR] [\-\-count\ \fICOUNT\fR] [\-\-debug\ \fILVL\fR] [\-\-fileout\ \fIFILE\fR] [\-\-help] [\-\-interval\ \fIINTERVAL\fR] [\-\-marker_name\ \fINAME\fR] [\-\-marker_type\ \fITYPE\fR] [\-\-observer\ \fIOBSERVER\fR] [\-\-rec_num\ \fINUM\fR] [\-\-rec_type\ \fITYPE\fR] [\-\-rec_vers\ \fIVERS\fR] [\-\-version] [\-D\ \fILVL\fR] [\-f\ \fIFILE\fR] [\-h] [\-i\ \fIINTERVAL\fR] [\-n\ \fICOUNT\fR] [\-V] [\fIserver\fR [\fI:port\fR [\fI:device\fR]]] .SH "DESCRIPTION" .PP gpsrinex is a tool to connect to gpsd and output the received raw measurements as a RINEX 3 observation file\&. This is useful for sending raw measurements (pseudorange and carrierphase) from gpsd to a Precise Point Positioning (PPP) program or service\&. .PP gpsrinex does not require root privileges, and can be run concurrently with other tools connecting to a local or remote gpsd without causing problems\&. .PP gpsrinex needs the GPS receiver to be sending raw measurements to gpsd\&. Only a few GPS have this capability\&. In addition, the gpsd driver for that GPS must support raw mode\&. Currently only the u\-blox driver has this support\&. Only a few u\-blox 8 GPS implement the required UBX\-RXM\-RAWX message\&. The NEO\-M8T is known to work, but requires configuration with ubxtool\&. .PP Before using ubxtool be sure to set the UBXOPTS environment variable with the correct protocol version for your u\-blox receiver\&. If your protocol version is 32\&.00, you would do this: .sp .if n \{\ .RS 4 .\} .nf export UBXOPTS="\-P 32\&.00" .fi .if n \{\ .RE .\} .PP RINEX has its own definitions and abbreviations\&. Be sure to consult their documentation\&. An observation file (\&.obs) contains data sets, called epochs, that contain the pseudorange and carrierphase for each satellite seen\&. .PP gpsrinex by default will acquire 20 epochs spaced apart by 30 seconds\&. That will take 10 minutes to complete\&. Most users consider the 30 second interval to be optimal\&. Many PPP programs require at least 1 or 2 hours data, but no more than 24 or 48 hours of data\&. Most users consider 4 to 6 hours of data as a minimum for good accuracy\&. Additional hours will not yield much improvement\&. .PP The output will consist of one RINEX 3 observation file that is ready to be read by your PPP program\&. The default filename will be in the form: gpsrinexYYYYJJJHHMMSS\&.obs\&. You can override this filename with the \fB\-f\fR option\&. .PP Optionally a server, TCP/IP port number and remote device can be given\&. If omitted, gpsrinex connects to localhost on the default port (2947) and watches all devices opened by gpsd\&. .SH "OPTIONS" .PP \fB\-?\fR, \fB\-h\fR, \fB\-\-help\fR .RS 4 Print a usage message and exit\&. .RE .PP \fB\-D LVL\fR, \fB\-debug LVL\fR .RS 4 Set debug level to LVL\&. .RE .PP \fB\-f FILE\fR, \fB\-\-fileout FILE\fR .RS 4 save RINEX into FILE\&. .RE .PP \fB\-i SECS\fR, \fB\-\-interval SECS\fR .RS 4 wait [interval] seconds between epochs\&. The interval can be specified to the millisecond\&. OPUS accepts intervals of 1, 2, 3, 5, 10, 15 or,30 seconds\&. OPUS then reduces the data to 30 second intervals\&. Default is 30\&.000\&. .RE .PP \fB\-n COUNT\fR, \fB\-\-count COUNT\fR .RS 4 Causes COUNT epochs to be output\&. OPUS requires a minimum af 15 minutes, and a maximum of 48 hours, of data\&. .RE .PP \fB\-V\fR, \fB\-\-version\fR .RS 4 makes gpsrinex print its version and exit\&. .RE .PP The following options set strings that are placed in the generated RINEX 3 obs file\&. They do not change how gpsrinex computes anything\&. .PP \fB\-\-agency AGENCY\fR .RS 4 The name of the agency creating the current file\&. .RE .PP \fB\-\-ant_num NUMBER\fR .RS 4 The antenna serial number\&. .RE .PP \fB\-\-ant_type TYPE\fR .RS 4 The antenna type\&. .RE .PP \fB\-\-marker_name NAME\fR .RS 4 The marker name\&. .RE .PP \fB\-\-marker_type TYPE\fR .RS 4 The marker type .RE .PP \fB\-\-observer OBSERVER\fR .RS 4 The name of the observer (you)\&. .RE .PP \fB\-\-rec_num NUM\fR .RS 4 The receiver serial number\&. .RE .PP \fB\-\-rec_type TYPE\fR .RS 4 The receiver type\&. .RE .PP \fB\-\-rec_vers VERS\fR .RS 4 The receiver version\&. .RE .PP The following options set floating point numbers that are placed in the generated RINEX 3 obs file\&. They do not change how gpsrinex computes anything\&. .PP \fB\-\-ant_e EASTING\fR .RS 4 The antenna easting from marker in meters\&. .RE .PP \fB\-\-ant_h HEIGHT\fR .RS 4 The antenna height from marker in meters\&. .RE .PP \fB\-\-ant_n NORTHING\fR .RS 4 The antenna northing from marker in meters\&. .RE .SH "EXAMPLES" .PP Example 1: .PP Create a 4 hour \&.obs file\&. With a running gpsd accessible on the localhost do all of the following, in order\&. Order matters\&. .PP The raw measurement messages are long\&. Be sure your serial port speed is high enough: .sp .if n \{\ .RS 4 .\} .nf gpsctl \-s 115200 .fi .if n \{\ .RE .\} .PP Disable all NMEA messages, and enable binary messages: .sp .if n \{\ .RS 4 .\} .nf ubxtool \-d NMEA ubxtool \-e BINARY .fi .if n \{\ .RE .\} .PP The NEO\-M8N will only reliably output raw measurements when only the GPS and QZSS constellations are enabled\&. If your PPP service can use GLONASS, then enable that as well\&. Be sure to disable, before enable, so as not to momentarily have too many constellations selected\&. ubxtool, as recommended by u\-blox, enables the QZSS constellation in tandem with GPS\&. Disable all constellations, except GPS (and QZSS): .sp .if n \{\ .RS 4 .\} .nf ubxtool \-d BEIDOU ubxtool \-d GALILEO ubxtool \-d GLONASS ubxtool \-d SBAS ubxtool \-e GPS .fi .if n \{\ .RE .\} .PP Verify the constellations enabled: .sp .if n \{\ .RS 4 .\} .nf ubxtool \-p CFG\-GNSS .fi .if n \{\ .RE .\} .PP Enable the good stuff, the raw measurement messages: .sp .if n \{\ .RS 4 .\} .nf ubxtool \-e RAWX .fi .if n \{\ .RE .\} .PP Verify raw data messages are being sent: .sp .if n \{\ .RS 4 .\} .nf ubxtool | fgrep RAWX .fi .if n \{\ .RE .\} .sp You should see this output: .sp .if n \{\ .RS 4 .\} .nf UBX\-RXM\-RAWX: UBX\-RXM\-RAWX: .fi .if n \{\ .RE .\} .PP Collect 4 hours of samples at 30 second intervals, save the RINEX 3 observations in the file today\&.obs: .sp .if n \{\ .RS 4 .\} .nf gpsrinex \-i 30 \-n 480 \-f today\&.obs .fi .if n \{\ .RE .\} .PP Wait 4 hours\&. Enjoy a meal, or do some exercise\&. When gpsrinex finishes, upload the file today\&.obs to your favorite PPP service\&. .PP Example 2: .PP Collect raw measurement data from a remote gpsd\&. The process it later with gpsrinex and gpsprof\&. .PP Ensure the GPS is configured properly, as shown in Example 1\&. .PP Grab 4 hours of raw live data from remote gpsd at 10\&.168\&.1\&.2: .sp .if n \{\ .RS 4 .\} .nf gpspipe \-x 14400 \-R 10\&.168\&.1\&.2 > 4h\-raw\&.ubx .fi .if n \{\ .RE .\} .PP When gpspipe is complete, feed the data to gpsfake: .sp .if n \{\ .RS 4 .\} .nf gpsfake \-1 \-P 3000 4h\-raw\&.ubx .fi .if n \{\ .RE .\} .PP In another window, feed the data to gpsrinex\&. Use \-n 10000000 so that all the data from the raw file is used:: .sp .if n \{\ .RS 4 .\} .nf gpsrinex \-i 30 \-n 1000000 :3000 .fi .if n \{\ .RE .\} .PP Repeat the process with gpsfake to send the data to gpsprof\&. .SH "SEE ALSO" .PP One service known to work with gbsrinex output is at: https://webapp\&.geod\&.nrcan\&.gc\&.ca/geod/tools\-outils/ppp\&.php .PP OPUS requires 2 frequency observation files\&. https://www\&.ngs\&.noaa\&.gov/OPUS/ .PP The curious can find the RINEX 3\&.04 format described here: ftp://igs\&.org/pub/data/format/rinex304\&.pdf .PP \fBgpsd\fR(8), \fBgpsfake\fR(1), \fBubxtool\fR(1)\&. .SH "AUTHOR" .PP Gary E\&. Miller \&.