'\" t .\" Title: gpsrinex .\" Author: Gary E. Miller .\" Generator: Asciidoctor 2.0.20 .\" Date: 2023-01-10 .\" Manual: GPSD Documentation .\" Source: GPSD, Version 3.25 .\" Language: English .\" .TH "GPSRINEX" "1" "2023-01-10" "GPSD, Version 3.25" "GPSD Documentation" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" gpsrinex \- Read data from gpsd convert to RINEX3 and save to a file. .SH "SYNOPSIS" .sp \fBgpsrinex\fP [OPTIONS] [server[:port[:device]]] .sp \fBgpsrinex\fP \-h .sp \fBgpsrinex\fP \-V .SH "DESCRIPTION" .sp \fBgpsrinex\fP is a tool to connect to \fBgpsd\fP and output the received raw measurements as a RINEX 3 observation file. This is useful for sending raw measurements (pseudorange and carrierphase) from \fBgpsd\fP to a Precise Point Positioning (PPP) program or service. .sp \fBgpsrinex\fP does not require root privileges, but may be run as root. Some of the examples in this file may not work when run under \fBsudo\fP. It can be run concurrently with other tools connecting to a local or remote \fBgpsd\fP without causing problems. .sp \fBgpsrinex\fP needs the GNSS receiver to be sending raw measurements to \fBgpsd\fP. Only a few GNSS have this capability. In addition, the \fBgpsd\fP driver for that GNSS must support raw mode. Currently only the u\-blox driver has this support. Only a few u\-blox 8 and 9 receivers implement the required UBX\-RXM\-RAWX message. The NEO\-M8T is known to work, but requires configuration with \fBubxtool\fP. .sp Before using \fBubxtool\fP 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 .fam C export UBXOPTS="\-P 32.00" .fam .fi .if n .RE .sp 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. .sp \fBgpsrinex\fP 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. .sp 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: \fIgpsrinexYYYYDDDDHHMM.obs\fP. You can override this filename with the \fB\-f\fP option. .sp Optionally a server, TCP/IP port number and remote device can be given. If omitted, \fBgpsrinex\fP connects to localhost on the default port (2947) and watches all devices opened by \fBgpsd\fP. .SH "OPTIONS" .sp \fB\-?\fP, \fB\-h\fP, \fB\-\-help\fP .RS 4 Print a usage message and exit. .RE .sp \fB\-D LVL\fP, \fB\-debug LVL\fP .RS 4 Set debug level to LVL. .RE .sp \fB\-f OUTFILE\fP, \fB\-\-fileout OUTFILE\fP .RS 4 save RINEX into FILE. .RE .sp \fB\-F INFILE\fP, \fB\-\-filein INFILE\fP .RS 4 Read GPS JSON from file, not from a live \fIgpsd\fP. .RE .sp \fB\-i SECS\fP, \fB\-\-interval SECS\fP .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 .sp \fB\-n COUNT\fP, \fB\-\-count COUNT\fP .RS 4 Causes COUNT epochs to be output. OPUS requires a minimum af 15 minutes, and a maximum of 48 hours, of data. .RE .sp \fB\-V\fP, \fB\-\-version\fP .RS 4 makes \fBgpsrinex\fP print its version and exit. .RE .sp The following options set strings that are placed in the generated RINEX 3 obs file. They do not change how \fBgpsrinex\fP computes anything. .sp \fB\-\-agency AGENCY\fP .RS 4 The name of the agency creating the current file. .RE .sp \fB\-\-ant_num NUMBER\fP .RS 4 The antenna serial number. .RE .sp \fB\-\-ant_type TYPE\fP .RS 4 The antenna type. .RE .sp \fB\-\-marker_name NAME\fP .RS 4 The marker name. .RE .sp \fB\-\-marker_type TYPE\fP .RS 4 The marker type .RE .sp \fB\-\-observer OBSERVER\fP .RS 4 The name of the observer (you). .RE .sp \fB\-\-rec_num NUM\fP .RS 4 The receiver serial number. .RE .sp \fB\-\-rec_type TYPE\fP .RS 4 The receiver type. .RE .sp \fB\-\-rec_vers VERS\fP .RS 4 The receiver version. .RE .sp The following options set floating point numbers that are placed in the generated RINEX 3 obs file. They do not change how \fBgpsrinex\fP computes anything. .sp \fB\-\-ant_e EASTING\fP .RS 4 The antenna easting from marker in meters. .RE .sp \fB\-\-ant_h HEIGHT\fP .RS 4 The antenna height from marker in meters. .RE .sp \fB\-\-ant_n NORTHING\fP .RS 4 The antenna northing from marker in meters. .RE .SH "ARGUMENTS" .sp By default, clients collect data from the local \fBgpsd\fP daemon running on localhost, using the default GPSD port 2947. The optional argument to any client may override this behavior: \fB[server[:port[:device]]]\fP .sp For further explanation, and examples, see the \fBARGUMENTS\fP section in the \fBgps\fP(1) man page .SH "EXAMPLES" .sp Example 1: .sp Create a 4 hour .obs file. With a running \fBgpsd\fP accessible on the localhost do all of the following, in order. Order matters. .sp The raw measurement messages are long. Be sure your serial port speed is high enough: .sp .if n .RS 4 .nf .fam C gpsctl \-s 115200 .fam .fi .if n .RE .sp Disable all NMEA messages, and enable binary messages: .sp .if n .RS 4 .nf .fam C ubxtool \-d NMEA ubxtool \-e BINARY .fam .fi .if n .RE .sp 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. \fBubxtool\fP, 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 .fam C ubxtool \-d BEIDOU ubxtool \-d GALILEO ubxtool \-d GLONASS ubxtool \-d SBAS ubxtool \-e GPS .fam .fi .if n .RE .sp Verify the constellations enabled: .sp .if n .RS 4 .nf .fam C ubxtool \-p CFG\-GNSS .fam .fi .if n .RE .sp Enable the good stuff, the raw measurement messages: .sp .if n .RS 4 .nf .fam C ubxtool \-e RAWX .fam .fi .if n .RE .sp Verify raw data messages are being sent: .sp .if n .RS 4 .nf .fam C ubxtool | fgrep RAWX .fam .fi .if n .RE .sp You should see this output: .sp .if n .RS 4 .nf .fam C UBX\-RXM\-RAWX: UBX\-RXM\-RAWX: .fam .fi .if n .RE .sp 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 .fam C gpsrinex \-i 30 \-n 480 \-f today.obs .fam .fi .if n .RE .sp Wait 4 hours. Enjoy a meal, or do some exercise. When \fBgpsrinex\fP finishes, upload the file today.obs to your favorite PPP service. .sp Example 2: .sp Collect raw measurement data from a remote \fBgpsd\fP. Then process it later with \fBgpsrinex\fP and \fBgpsprof\fP. .sp Ensure the receiver is configured properly, as shown in Example 1. .sp Grab 4 hours of raw live data from remote \fBgpsd\fP at 10.168.1.2: .sp .if n .RS 4 .nf .fam C gpspipe \-x 14400 \-R 10.168.1.2 > 4h\-raw.ubx .fam .fi .if n .RE .sp When gpspipe is complete, feed the data to gpsfake: .sp .if n .RS 4 .nf .fam C gpsfake \-1 \-P 3000 4h\-raw.ubx .fam .fi .if n .RE .sp In another window, feed the data to \fBgpsrinex\fP. Use \fB\-n 10000000\fP so that all the data from the raw file is used: .sp .if n .RS 4 .nf .fam C gpsrinex \-i 30 \-n 1000000 :3000 .fam .fi .if n .RE .sp Repeat the process with gpsfake to send the data to \fBgpsprof\fP. .SH "RETURN VALUES" .sp \fB0\fP .RS 4 on success. .RE .sp \fB1\fP .RS 4 on failure .RE .SH "SEE ALSO" .sp One service known to work with gbsrinex output is at: .URL "https://webapp.geod.nrcan.gc.ca/geod/tools\-outils/ppp.php" "" "" .sp OPUS requires 2 frequency observation files. .URL "https://www.ngs.noaa.gov/OPUS/" "" "" .sp The curious can find the RINEX 3.04 format described here: .URL "ftp://igs.org/pub/data/format/rinex304.pdf" "" "" .sp \fBgpsd\fP(8), \fBgps\fP(1), \fBgpsprof\fP(1), \fBgpsfake\fP(1). \fBubxtool\fP(1), \fBgpsd_json\fP(5) .SH "RESOURCES" .sp \fBProject web site:\fP \c .URL "https://gpsd.io/" "" "" .SH "COPYING" .sp This file is Copyright 2013 by the GPSD project .br SPDX\-License\-Identifier: BSD\-2\-clause .SH "AUTHOR" .sp Gary E. Miller