
This repository contains a Golang module with packages for working with data types related to GNSS (Global Navigation Satellite System). It includes support for serialization and deserialization of GNSS data in various formats (e.g., BINEX, RINEX, RTCM, ...), as well as utility functions for handling GNSS-specific computations. Additionally, the repository provides several command-line utilities for interacting with GNSS data.
├── LICENSE
├── README.md
├── cmd
├── go.mod
├── go.sum
└── pkg
Packages
Common
- gnss: Core GNSS data types
Encoding
- binex: BINEX deserialization.
- bottle: Bottle deserialization.
- fcn: Functions for retreiving GLONASS Fequency Channel Numbers.
- met: Meteorologic data serialization and deserialization.
- novatel: NovAtel receiver format deserialization.
- pos: EarthScope's daily integrated position solution format.
- rinex: RINEX format serialization and deserialization.
- rtcm: RTCM3 serialization and deserialization.
- sbf: Septentrio Binary Format (SBF) serialization and deserialization.
- sinex: SINEX deserialization (todo).
- sp3: SP3 deserialization.
- tdb: TileDB serialization and deserialization.
- ublox: U-Blox serialization and deserialization.
- vaisala: Vaisala weather data deserialization.
Supported RINEX Message Types
| Message Type |
Description |
Deserialization |
Serialization |
RINEX 2.11 Obs |
GNSS Observations |
✅ Supported |
✅ Supported |
RINEX 2.11 Nav |
GNSS Observations |
✅ Supported |
✅ Supported |
RINEX 2.11 Met |
GNSS Observations |
✅ Supported |
📝 To Do |
RINEX 3.05 Obs |
GNSS Observations |
✅ Supported |
✅ Supported |
RINEX 3.05 Nav |
GNSS Observations |
✅ Supported |
✅ Supported |
RINEX 3.05 Met |
GNSS Observations |
✅ Supported |
📝 To Do |
RINEX 4.01 Obs |
GNSS Observations |
✅ Supported |
✅ Supported |
RINEX 4.01 Nav |
GNSS Navigation |
✅ Supported |
✅ Supported |
RINEX 4.01 Met |
GNSS Meteorological |
✅ Supported |
📝 To Do |
RINEX 4.02 Obs |
GNSS Observations |
✅ Supported |
✅ Supported |
RINEX 4.02 Nav |
GNSS Navigation |
✅ Supported |
✅ Supported |
RINEX 4.02 Met |
GNSS Meteorological |
✅ Supported |
📝 To Do |
Supported BINEX Message Types
| Message Type |
Description |
Deserialization |
Serialization |
4001 |
DOP |
✅ Supported |
✅ Supported |
4002 |
GALNav |
✅ Supported |
✅ Supported |
4006 |
PVTCartesian |
✅ Supported |
✅ Supported |
4007 |
PVTGeodetic |
✅ Supported |
✅ Supported |
4008 |
PVTSatCartesian |
✅ Supported |
✅ Supported |
4011 |
RAIMStatistics |
✅ Supported |
✅ Supported |
4012 |
SatVisibility |
✅ Supported |
✅ Supported |
4013 |
ChannelStatus |
✅ Supported |
✅ Supported |
4014 |
ReceiverStatus |
✅ Supported |
✅ Supported |
4027 |
MeasEpoch |
✅ Supported |
✅ Supported |
4044 |
PosCart |
✅ Supported |
✅ Supported |
4075 |
ASCIIIn |
✅ Supported |
✅ Supported |
5891 |
GPSNav |
✅ Supported |
✅ Supported |
5914 |
ReceiverTime |
✅ Supported |
✅ Supported |
Supported RTCM 3 Message Types
| Message Type |
Description |
Deserialization |
Serialization |
1077 |
GPS MSM 7 |
✅ Supported |
✅ Supported |
1087 |
GLONASS MSM 7 |
✅ Supported |
✅ Supported |
1097 |
Galileo MSM 7 |
✅ Supported |
✅ Supported |
1107 |
SBAS MSM 7 |
✅ Supported |
✅ Supported |
1117 |
QZSS MSM 7 |
✅ Supported |
✅ Supported |
1127 |
Beidou MSM 7 |
✅ Supported |
✅ Supported |
Supported Novatel Binary Message Types
| Message Type |
Description |
Deserialization |
Serialization |
140 |
RANGECMP |
✅ Supported |
📝 To Do |
Supported U-blox Binary Message Types
| Message Type |
Description |
Deserialization |
Serialization |
ubx-rxm-rawx |
GNSS Raw Observation Data |
✅ Supported |
✅ Supported |
NTRIP
| Package | Description | Support |
| 'client' | NTRIP 2.0 Client | ✅ Supported |
Position
| Package |
Description |
Support |
ssp |
Single Point Positioning |
✅ Supported |
PubSub
| Package |
Description |
Support |
pubsub |
Implements publish-subscribe mechanisms for GNSS data. |
✅ Supported |
Velocity
| Package |
Description |
Support |
tdcp |
Time-Differenced Carrier Phase (TDCP) velocity estimation |
✅ Supported |
The cmd directory contains command-line tools for working with supported GNSS data formats. Each subdirectory under cmd represents a different tool.
| Tool |
Description |
Status |
| gnss-inspect |
Inspect and analyze GNSS data in various formats with JSON output |
✅ Active |
| gnss-convert |
Convert GNSS data between formats (RINEX to Parquet/TileDB) |
✅ Active |
| ntrip-client |
NTRIP client for connecting to NTRIP casters |
✅ Active |
| ntrip |
NTRIP server tools and utilities |
✅ Active |
| position |
Single Point Positioning (SPP) tools |
✅ Active |
| velocity |
Time-Differenced Carrier Phase (TDCP) velocity estimation |
✅ Active |
| translation |
Format translation utilities |
✅ Active |
| tiledb |
TileDB-specific tools and utilities |
✅ Active |
| test |
Testing and validation tools |
✅ Active |
gnss-inspect
A powerful tool for inspecting and analyzing GNSS data in various formats. Outputs detailed JSON for easy parsing and analysis.
Features:
- Supports 12+ GNSS formats (BINEX, RINEX, SBF, RTCM3, U-blox, NovAtel, etc.)
- JSON output for easy scripting and data analysis
- Network streaming support (BINEX)
- Cross-platform compatibility
Quick Start:
# Inspect RINEX observation file
gnss-inspect rnx --file data.25o
# Inspect BINEX with network streaming
gnss-inspect binex --host localhost:2101
# Filter GPS observations only
gnss-inspect rnx --file data.25o | jq 'select(.System == "GPS")'
Supported Formats:
- BINEX: Binary Exchange format with TCP streaming
- RINEX: Observation, Navigation, and Meteorological files (v2.11, v3.05, v4.02)
- SBF: Septentrio Binary Format
- RTCM3: Real-time correction messages
- U-blox: Binary and serial formats
- NovAtel: ASCII and binary formats
- SP3: Precise ephemeris
- Bottle: UNAVCO bottle format
- FCN: GLONASS Frequency Channel Numbers
See the gnss-inspect README for complete documentation.
gnss-convert
Convert GNSS data from RINEX to modern data formats like Apache Parquet and TileDB.
Features:
- RINEX to Parquet conversion with Hive partitioning
- RINEX to TileDB conversion
- Cloud-native S3 support
- Session-based data organization
Quick Start:
# Convert RINEX to TileDB on S3
gnss-convert convert --input rinex:./data.25o --output tiledb:s3://bucket/path
# Convert RINEX to Parquet locally
gnss-convert convert --input rinex:./data.25o --output parquet:./output
See the gnss-convert README for complete documentation.
ntrip-client
Connect to NTRIP casters and stream GNSS correction data.
Features:
- NTRIP 1.0/2.0 client support
- TLS/SSL encryption support
- Automatic reconnection
- Configurable authentication
- Real-time data streaming
Quick Start:
# Connect to NTRIP caster
ntrip-client connect --host caster.example.com:2101 --user user --pass pass --mountpoint MOUNT
# Connect with TLS
ntrip-client connect --host caster.example.com:443 --user user --pass pass --mountpoint MOUNT --tls
# Get source table
ntrip-client srctab --host caster.example.com:2101 --user user --pass pass
See the ntrip-client README for complete documentation.
Installation
go get gitlab.com/earthscope/gnsstools
Testing
Prerequisites
Some tests require TileDB. If you encounter library loading errors like Library not loaded: @rpath/libtiledb.dylib, run:
# Quick setup using the project's TileDB installation
cd cmd/gnss-convert
make tiledb-setup
export CGO_LDFLAGS="-Wl,-rpath,$(pwd)/tiledb/lib"
cd ../..
go test ./...
Running Tests
# Run all tests
go test ./...
# Run specific package tests
go test ./pkg/encoding/rtcm/rtcm3/...
# Run tests with verbose output
go test -v ./...
Troubleshooting
"Library not loaded: @rpath/libtiledb.dylib"
- Run the setup commands above
- Or install TileDB system-wide:
cd cmd/gnss-convert && make install-tiledb-system
Alternative: Use environment variables
# macOS
export DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH"
# Linux
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
go test ./...
License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (C) 2023 Henry Berglund, EarthScope Data Services