PyGNSS is a Python library which which provides various GNSS related utilites. The coordinate system transformations are implemented based on the algorithms used by libswiftnav.
It is recommended to install pygnss in a virtual environment to avoid polluting global system state.
To install the latest version of pygnss from PyPI:
pip install swiftnav-gnssTo install from git:
pip install 'git+https://github.com/swift-nav/pygnss.git'This project uses uv for fast, reliable Python package management and ruff for linting and formatting.
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | shClone and set up the development environment:
git clone https://github.com/swift-nav/pygnss.git
cd pygnss
uv pip install -e ".[dev]"Run tests and checks:
# Run tests
pytest
# Lint code
ruff check .
# Format code
ruff format .
# Type check
mypy gnss/ tests/Currently, pygnss provides functions for the following coordinate transformations:
llh_from_ecefecef_from_llhned_from_ecefazimuth_elevation_from_ecef
Tag a release:
git tag v0.5.2
git push origin v0.5.2Build the package:
uv buildThis creates wheel and source distributions in the dist/ directory.
Publish to PyPI using uv publish or twine:
# Using uv (recommended)
uv publish
# Or using twine
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=<your-pypi-token>
twine upload dist/*Copyright (C) 2017 Swift Navigation Inc.
Contact: Swift Navigation [email protected]
This source is subject to the license found in the file 'LICENSE' which must be be distributed together with this source. All other rights reserved.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.