This repository includes a Python NTRIP client for connecting to an NTRIP caster, selecting a mountpoint, and streaming correction data to stdout, a file, or UDP.
The main application is NTRIP Client/NtripClient.py. Run it with no arguments to open the GUI, or provide command-line arguments to run directly from a terminal.
- Connect to NTRIP V1 or V2 casters.
- Use plain TCP or TLS connections.
- Optionally validate TLS certificates with the system trust store or a supplied CA file.
- Fetch and parse an NTRIP source table from the caster.
- Select a mountpoint from a source-table dialog.
- Decode
Transfer-Encoding: chunkedcaster responses before forwarding data. - Send a GGA sentence when enabled.
- Stream correction data to stdout or an output file.
- Optionally broadcast received data over UDP.
- Optionally output request/response headers to stderr or a header file.
- Save and load
.ntripJSON configuration files. - Remember the last opened or saved configuration file on startup.
- Build standalone binaries with GitHub Actions.
From the repository root:
python3 "NTRIP Client/NtripClient.py"The GUI opens with the last used configuration if one was previously opened or saved. Otherwise it starts with defaults:
- Caster:
SPS855.com - Port:
2101 - TLS: off
- TLS certificate validation: off
- User/password:
IBS/IBS
The active configuration file path is shown in the window title.
- Enter the caster, port, username, password, and mountpoint.
- Enable
Use TLSif the caster requires TLS. If the port is still the default2101, enabling TLS changes it to52101. - Enable
Validate TLS certificateonly when certificate validation is wanted. If needed, select aTLS CA file. - Enable
Send GGAif the caster requires a GGA sentence, then edit the GGA latitude, longitude, and height fields. - Click
Get Mountpointto request the caster source table and choose a mountpoint. - Click
Startto connect. The button changes toStopwhile connected. - Click
Saveto save the current settings to a.ntripconfig file.
Save opens a save dialog. The default filename is based on the caster and mountpoint, for example:
SPS855.com-MOUNTPOINT.ntrip
Open and save dialogs default to the directory where the application was launched unless an existing config or file path has already been chosen.
Get Mountpoint connects to the caster, requests the source table, parses STR;... records, and displays available mountpoints in a selection dialog. Double-click a row or choose Use Selected to set the mountpoint.
Header output from this request is only written when Output headers is enabled:
- If
Header fileis set, headers are written to that file. - Otherwise headers are written to stderr.
Enable Output headers to capture request and response headers. Header output includes the NTRIP request and caster response headers.
If Header file is set, header output is written to that file. If no header file is set, header output goes to stderr. Headers are not written unless Output headers is enabled.
If the caster response includes Transfer-Encoding: chunked, the client removes the chunk framing before writing correction data to stdout, an output file, or UDP. If a response advertises chunked encoding but the stream data is not valid chunked data, the client writes an error to stderr and passes the raw stream data through.
Basic usage:
python3 "NTRIP Client/NtripClient.py" MOUNTPOINT CASTER PORTExample with TLS:
python3 "NTRIP Client/NtripClient.py" MOUNTPOINT SPS855.com 52101 --tlsExample with config:
python3 "NTRIP Client/NtripClient.py" --config my-base.ntripShow help:
python3 "NTRIP Client/NtripClient.py" --helpConfiguration files use JSON content and typically use the .ntrip extension. They store fields such as caster, port, credentials, mountpoint, TLS options, GGA settings, output files, and header output settings.
The GUI remembers the last opened or saved config path in:
~/.ntripclient-last.json
GitHub Actions builds standalone binaries for:
- Linux AMD64
- Linux ARM64
- Linux ARM32
- macOS ARM64
- Windows AMD64
Artifacts are uploaded from the workflow run.