Skip to main content

gnsskit

Shared tools for post-processing GNSS data with RTKLIB rnx2rtkp, used by djippk (drone PPK) and stopgo (stop-and-go surveys).

  • RTKLIB wrappers (gnsskit.rtklib): RtkConfig, a typed, immutable set of rnx2rtkp options (from_file, updated, with_options, with_base_llh, write); run_rnx2rtkp and find_rnx2rtkp; read_pos (llh, xyz and enu .pos files).
  • RINEX (gnsskit.rinex): rinex_span, header_llh, header_xyz, trim_rinex; inspection with obs_summary (span, sampling, gaps, satellites) and read_visibility; survey occupations with read_occupations (point, receiver, session, time span and position of every occupation, from the file names, a field book or the headers), sessions_from_overlap and flag_stale_headers.
  • Plots (gnsskit.plot, needs the plot extra): plot_visibility (RTKPLOT-style satellite visibility), plot_occupations (map of where, when and with which receiver every point was occupied), plot_baselines (baseline network: arrows base -> rover, fixed/float, repeated baselines side by side, optional error ellipses) and plot_pos (RTKPLOT-like view of a static or kinematic .pos solution: ground track and E/N/U, satellites and ratio against time, colored by solution quality). The maps can be drawn over OpenStreetMap tiles.
  • Static (gnsskit.static): solve_static (one solution over a time window), process_baseline (static baselines with covariance), baseline IO and loop_closures (misclosure of every triangle of baselines); least-squares adjustment of a redundant baseline network in gnsskit.static.network (needs the network extra).
  • Kinematic (gnsskit.kinematic): trajectory interpolation and averaging.
  • Reference systems (gnsskit.refsys): GPST/UTC, ellipsoids, ECEF/geodetic conversions and ENUFrame, a local east-north-up frame at a point (points, vectors and covariances, both ways).

Install

With uv (recommended), in your project:

uv add gnsskit                  # library
uv add "gnsskit[network]"       # + network adjustment (scipy, pyproj)
uv add "gnsskit[network,plot]"  # + visibility plots and occupation maps (matplotlib)
uv add "gnsskit[all]"           # every extra
uv add git+https://github.com/franioli/gnsskit   # development version

or in an existing environment, uv pip install gnsskit (same extras).

With pip:

pip install gnsskit
pip install "gnsskit[all]"   # with every extra

RTKLIB (required separately)

The processing functions (run_rnx2rtkp, process_baseline, solve_static) call the RTKLIB command-line program rnx2rtkp, which must be installed on your system and found on your PATH (or passed with exe=); trim_rinex(use_convbin=True) also needs RTKLIB convbin. The demo5 fork is recommended; gnsskit is developed with rnx2rtkp ver.EX 2.5.1.

  • Windows: download a demo5 release, unzip it and add the folder with rnx2rtkp.exe to your PATH.
  • Linux / macOS: build it from source:
    git clone https://github.com/rtklibexplorer/RTKLIB
    cd RTKLIB/app/consapp/rnx2rtkp/gcc && make && sudo make install
    

Check it with rnx2rtkp -?. If it is missing, run_rnx2rtkp raises an error with these instructions. The rest of gnsskit (RINEX tools, read_pos, loop closures, network adjustment, reference systems) is pure Python and works without RTKLIB, e.g. on baselines computed elsewhere.

Example

from gnsskit import RtkConfig, read_pos, run_rnx2rtkp

config = RtkConfig(posmode="static", navsys="GEC", solformat="llh").with_base_llh(46.2, 9.8, 2300.0)
pos_file = run_rnx2rtkp(rover_obs, base_obs, [nav], config, "out.pos")
pos = read_pos(pos_file)

Map of the occupations of a survey, from files named e.g. s1_A1_gs14.26o:

from gnsskit import find_rinex_obs, plot_occupations, read_occupations

occ = read_occupations(
    find_rinex_obs(["rinex"]),
    name_pattern=r"(?P<session>s\d+)_(?P<point>[^_]+)_(?P<receiver>[^.]+)",
)
plot_occupations(occ, "occupations.png", stations={"mil": (4421979.92, 718518.37, 4524921.24)},
                 basemap=True)  # OpenStreetMap tiles: needs internet, falls back to a plain map

Baseline network and RTKLIB solutions:

import pandas as pd
from gnsskit import plot_baselines, plot_pos

baselines = pd.read_csv("baselines.csv", dtype={"base": str, "rover": str})  # baselines_to_df
plot_baselines(baselines, "network.png", fixed={"mil": (4421979.92, 718518.37, 4524921.24)})
plot_pos("rover.pos", "rover.png")  # static or kinematic, llh / xyz / enu

See example/ for complete static, kinematic and network adjustment examples.

Contributing

Issues are welcome on GitHub. To contribute code:

  1. Fork the repository on GitHub and clone your fork:

    git clone https://github.com/<your-username>/gnsskit && cd gnsskit
    git checkout -b my-feature
    
  2. Set up the environment, make your changes and check them:

    uv sync                      # environment with the dev dependencies (incl. ruff)
    uv run pytest                # tests
    uv run ruff format .         # format the code
    uv run ruff check --fix .    # lint, fixing what can be fixed automatically
    
  3. Push the branch to your fork and open a pull request against main of franioli/gnsskit.

Releasing a new version

For the current maintainers only (it needs write access to the repository and to the PyPI project).

Publishing a GitHub release runs .github/workflows/publish.yml, which checks that the tag matches the version, runs the tests, builds and uploads to PyPI:

uv version --bump patch            # or minor / major: updates pyproject.toml
uv run pytest
git commit -am "Release $(uv version --short)" && git push
gh release create "v$(uv version --short)" --generate-notes   # tag + release -> PyPI

gh release create creates the tag on the pushed commit; without the GitHub CLI, push a tag (git tag -a vX.Y.Z -m "gnsskit X.Y.Z" && git push origin vX.Y.Z) and create the release from it on GitHub. PyPI never accepts the same version twice.

One-time setup of the automatic upload (PyPI Trusted Publishing, no token): on pypi.org, project gnsskit -> Settings -> Publishing -> add a GitHub publisher with owner franioli, repository gnsskit, workflow publish.yml and environment pypi.

Manual upload, if needed, with a project-scoped token kept outside the repository:

rm -rf dist && uv build
UV_PUBLISH_TOKEN=$(cat ~/.config/pypi/gnsskit.token) uv publish

Metadata

Release files for gnsskit 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gnsskit 0.5.1
File Size Uploaded Provenance Actions
gnsskit-0.5.1.tar.gz 51.9 kB Without provenance Details for gnsskit-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gnsskit 0.5.1
File Interpreter ABI Platform Actions
gnsskit-0.5.1-py3-none-any.whl Python 3 none any Details for gnsskit-0.5.1-py3-none-any.whl

Total release size: 113.5 kB

Release files / gnsskit-0.5.1.tar.gz

Download URL gnsskit-0.5.1.tar.gz
Size 51.9 kB
Tags Source
SHA-256 checksum
How to use checksums
424ce60921fcab3ae1f17527b26f3c3794c370a02ad29b008c2c8df9ce731b0d
BLAKE2b-256 checksum
How to use checksums
804936d9ebd4c822710359b6e05497384c9f5b3f33e3272d94e2f91ddffbc6f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / gnsskit-0.5.1-py3-none-any.whl

Download URL gnsskit-0.5.1-py3-none-any.whl
Size 61.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7fa9504405a0c0ea68826b649b504c04e71cb8fd5e6ceff1a2b1d457c3b3367
BLAKE2b-256 checksum
How to use checksums
1aa56dce8f2471d98f17d549a0582f59e90487760867169585ad89ed7f3ae8e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for gnsskit 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page