GPSRINEX(1)
πΈ NAME πΈ
gpsrinex β read data from gpsd, convert it to RINEX, and save it to a file. (Yes bestie, this is the gpsrinex(1) page from the GPSD docs π)
β¨ SYNOPSIS β¨
gpsrinex [OPTIONS] [server[:port[:device]]]
gpsrinex -h
gpsrinex -V
π¦ DESCRIPTION π¦
So basically gpsrinex is the tool that connects to gpsd and spits out all the raw measurements it receives as a RINEX observation file. It's giving β¨bridgeβ¨ energy: it takes your raw measurements (pseudorange and carrierphase, the good stuff) from gpsd and hands them over to a Precise Point Positioning (PPP) program or service. Slay.
gpsrinex does not need root privileges, but it can be run as root. Just a heads up: some of the examples in this page might not work if you run them under sudo. π It can also run at the same time as other tools connecting to a local or remote gpsd without causing problems β it plays nice, no cap.
Here's the catch though. gpsrinex needs your GNSS receiver to be sending raw measurements to gpsd. Only a few GNSS have this capability. And on top of that, the gpsd driver for that GNSS has to support raw mode. Currently, only the u-blox driver has this support. Only a few u-blox 8, 9, and 10, receivers implement the required UBX-RXM-RAWX message. The NEO-M8T is known to work, but it requires configuration with ubxtool.
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:
export UBXOPTS="-P 32.00"
RINEX has its own definitions and abbreviations, so 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.
By default, gpsrinex 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.
The output will consist of one RINEX 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 -f option. π
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.
π OPTIONS π
-?,-h,--helpβ print a usage message and exit. π«Ά-D LVL,-debug LVLβ set debug level to LVL.-f OUTFILE,--fileout OUTFILEβ save RINEX into FILE.-F INFILE,--filein INFILEβ read GPS JSON from file, not from a livegpsd.-g CODES,--gnss CODESβ only output a GNSS system if the RINEX code is in CODES.C= BeiDou,E= GalileoG= GPS,I= IRNSS,J= QZSS,R= GLONASS,S= SBAS.-i SECS,--interval SECSβ 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 is30.000.-n COUNT,--count COUNTβ causes COUNT epochs to be output. OPUS requires a minimum af 15 minutes, and a maximum of 48 hours, of data.-V,--versionβ makesgpsrinexprint its version and exit.
The following options set strings that are placed in the generated RINEX 3 obs file. They do not change how gpsrinex computes anything. (Aesthetic only, bestie. π)
--agency AGENCYβ the name of the agency creating the current file.--ant_num NUMBERβ the antenna serial number.--ant_type TYPEβ the antenna type.--comment CMTβ free form comment.--marker_name NAMEβ the marker name.--marker_type TYPEβ the marker type--observer OBSERVERβ the name of the observer (you).--rec_num NUMβ the receiver serial number.--rec_type TYPEβ the receiver type.--rec_vers VERSβ the receiver version.
The following options set floating point numbers that are placed in the generated RINEX obs file. They do not change how gpsrinex computes anything. π§
--ant_e EASTINGβ the antenna easting from marker in meters.--ant_h HEIGHTβ the antenna height from marker in meters.--ant_n NORTHINGβ the antenna northing from marker in meters.
π ARGUMENTS π
By default, clients collect data from the local gpsd daemon running on localhost, using the default GPSD port 2947. The optional argument to any client may override this behavior: [server[:port[:device]]]
For further explanation, and examples, see the ARGUMENTS section in the gps(1) man page.
π₯ EXAMPLES π₯
Example 1:
Create a 4 hour .obs file. With a running gpsd accessible on the localhost do all of the following, in order. Order matters.
The raw measurement messages are long. Be sure your serial port speed is high enough:
gpsctl -s 115200
Disable all NMEA messages, and enable binary messages:
ubxtool -d NMEA
ubxtool -e BINARY
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):
ubxtool -d BEIDOU
ubxtool -d GALILEO
ubxtool -d GLONASS
ubxtool -d SBAS
ubxtool -e GPS
Verify the constellations enabled:
ubxtool -p CFG-GNSS
Enable the good stuff, the raw measurement messages:
ubxtool -e RAWX
Verify raw data messages are being sent:
ubxtool | fgrep RAWX
You should see this output:
UBX-RXM-RAWX:
UBX-RXM-RAWX:
Collect 4 hours of samples at 30 second intervals, save the RINEX observations in the file today.obs:
gpsrinex -i 30 -n 480 -f today.obs
Wait 4 hours. Enjoy a meal, or do some exercise. When gpsrinex finishes, upload the file today.obs to your favorite PPP service. π
β¨
Example 2:
Collect raw measurement data from a remote gpsd. Then process it later with gpsrinex and gpsprof.
Ensure the receiver is configured properly, as shown in Example 1.
Grab 4 hours of raw live data from remote gpsd at 10.168.1.2:
gpspipe -x 14400 -R 10.168.1.2 > 4h-raw.ubx
When gpspipe is complete, the file 4h-raw.ubx will contain 4 hours of raw UBX binary message. Convert that raw data in gpsd JSON with gpsdecode:
gpsdecode < 4h-raw.ubx > 4h-raw.json
The file 4h-raw.json will now contain the data encoded as gpsd JSON. Use gpsrinex to read that file and create a RINEX file:
gpsrinex -F 4h-raw.json
The RINEX file will be in the current directory with the file name like: gpsrinexYYYYjjjHHMMSS.obs. See strftime(1) for how the date formatting works
You can now use the JSON file to generate a polar plot of the used satellites:
gpsprof -f polarused -T jpeg -r < 4h-raw.json > 4h-raw.plot
gnuplot < 4h-raw.plot > 4h-raw.png
Use the image viewer of your choice to view your skyview in 4h-raw.png. πΈ
π RETURN VALUES π
0β on success.1β on failure
π SEE ALSO π
One service known to work with gbsrinex output is at: https://webapp.geod.nrcan.gc.ca/geod/tools-outils/ppp.php
OPUS requires 2 frequency observation files. https://www.ngs.noaa.gov/OPUS/
The curious can find the RINEX 3.04 format described here: ftp://igs.org/pub/data/format/rinex304.pdf
RINEX 4.02 is here: https://files.igs.org/pub/data/format/rinex_4.02.pdf
gpsd(8), gps(1), gpsprof(1), gpsfake(1). ubxtool(1), gpsd_json(5), strftime(1)
π RESOURCES π
Project web site: https://gpsd.io/
β COPYING β
This file is Copyright by the GPSD project SPDX-License-Identifier: BSD-2-clause
π AUTHOR π
Gary E. Miller
Okay bestie, that's the whole page β every flag, every epoch, every last little detail, fr fr. Now go get that 4 hours of raw data, you main character. π«Ά
GPSD, Version 3.27.5 β dated 2025-11-22 β and that's the GPSRINEX(1) vibe check, periodt. π
β¨
π¦ where this page comes from
- arch rolling: gpsd 3.27.5-1 Β· BSD
- fedora 44: gpsd-clients 1:3.27.5-3.fc44 Β· BSD-2-Clause
- fedora 44: gpsd-clients 1:3.27.5-5.fc44 Β· BSD-2-Clause
- nixos 26.05: gpsd 3.27.5
- nixpkgs unstable: gpsd 3.27.5
- opensuse-leap 16.0: gpsd-clients 3.27.5-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gpsd-clients 3.27.5-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gpsd-clients 3.27.5-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gpsd-clients 3.27.5-160000.1.1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms