Skip to main content

Python bindings for the Sidereon GNSS positioning engine (SP3 loading and SPP/RTK/PPP solves)

Project description

sidereon (Python)

Python bindings for the Sidereon GNSS positioning engine. This package is a thin, Pythonic surface over the Rust sidereon crate: it normalizes input, marshals types, and raises real exceptions. It adds no modeling of its own, so every solve returns exactly the numbers the engine produces.

Install

Build from source with maturin into an active virtual environment. The compiled extension links the sidereon-core engine statically, so the only runtime dependency is numpy.

python -m venv .venv
source .venv/bin/activate
pip install maturin numpy

# from bindings/python:
maturin develop            # dev build into the active venv
# or
maturin build --release    # produce a wheel under dist/, then pip install it

Verify the import:

python -c "import sidereon; print(sidereon.__version__)"

Example

Load an SP3 precise-ephemeris product, then run a single-point positioning solve. Pseudoranges are given as typed SppObservation records inside SppConfig; the position comes back as a numpy float64 array of ECEF metres.

import sidereon

with open("product.sp3", "rb") as fh:
    sp3 = sidereon.load_sp3(fh.read())

print(sp3)  # Sp3(epochs=96, satellites=...)

config = sidereon.SppConfig(
    observations=[
        sidereon.SppObservation("G01", 21_000_123.4),
        sidereon.SppObservation("G08", 22_517_889.1),
    ],  # ...more sats
    t_rx_j2000_s=...,            # receiver time, seconds past J2000
    t_rx_second_of_day_s=...,    # receiver time, second of day
    day_of_year=...,             # 1-based, fractional allowed
    initial_guess=[0.0, 0.0, 0.0, 0.0],  # [x_m, y_m, z_m, clock_state]
    corrections=sidereon.SppCorrections(ionosphere=False, troposphere=False),
    with_geodetic=True,
)
sol = sidereon.solve_spp(sp3, config)

print(sol.position)     # numpy array [x, y, z] in metres
print(sol.rx_clock_s)   # receiver clock bias, seconds
print(sol.used_sats)    # satellites that contributed
print(sol.geodetic)     # (lat_rad, lon_rad, height_m) or None

solve_rtk_float, solve_rtk_fixed, solve_ppp_float, and solve_ppp_fixed follow the same shape: they take typed Python config objects and return result objects with numpy positions, scalar attributes, enum statuses, and a __repr__. A parse or solve failure raises sidereon.SidereonError. Full signatures are in the type stub (python/sidereon/__init__.pyi).

Tests

The binding's tests load committed crate-side fixtures and assert each solve reproduces the engine reference numbers:

pip install pytest
pytest          # from bindings/python

Attribution

The engine's SGP4 propagation is a Rust port of David Vallado's reference implementation (credit: David Vallado, AIAA 2006). See the sidereon-core crate for full attribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sidereon-0.8.0.tar.gz (811.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sidereon-0.8.0-cp39-abi3-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file sidereon-0.8.0.tar.gz.

File metadata

  • Download URL: sidereon-0.8.0.tar.gz
  • Upload date:
  • Size: 811.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for sidereon-0.8.0.tar.gz
Algorithm Hash digest
SHA256 e3685cc0a2f98e00130dce235f60505d395dfa141195384e06f779c6f37d25ea
MD5 2528d84269a2c178b18c2eb218e526a3
BLAKE2b-256 6979200e162d7dab4d454ec85c1ad06fe3e7022bb72b006814da561ade969499

See more details on using hashes here.

File details

Details for the file sidereon-0.8.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sidereon-0.8.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9d41a7af430ec9d2f01f38b259e752760078f04f8f7a5d3792a62598ee7705b1
MD5 f60da090b0d6e043f219ebc4a9bb7eb2
BLAKE2b-256 921feb6a2784023c456fb8642ccf7b70d4e56ac13a2e172ce00a0ba7a0630aa8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page