Skip to main content

Satellite orbit tools: TLE propagation, SP3 parsing, and coordinate transformations

Project description

satorbit

Satellite orbit tools for Python: TLE propagation, SP3 parsing, and coordinate transformations.

Originally developed at KNMI (Royal Netherlands Meteorological Institute) as part of swxtools.

Installation

pip install satorbit

Features

  • TLE handling: Query space-track.org, parse TLE data, and propagate orbits using SGP4
  • SP3 parsing: Read SP3 precise orbit files into pandas DataFrames
  • Coordinate transforms: Convert between ITRF, geodetic, GCRS, and Quasi-Dipole coordinates
  • Keplerian mechanics: Simulate orbits with J2 perturbation effects

Usage

TLE Propagation

import pandas as pd
from satorbit import geodetic_orbit_from_tle

# Generate orbit positions for a satellite over a time range
times = pd.date_range("2024-01-01", "2024-01-02", freq="1min")
orbit = geodetic_orbit_from_tle(norad_id=25544, times=times)  # ISS
print(orbit[['lat', 'lon', 'height']])

SP3 File Parsing

from satorbit import sp3_to_itrf_df

df = sp3_to_itrf_df("orbit.sp3")
print(df[['x_itrf', 'y_itrf', 'z_itrf']])

Coordinate Transformations

from satorbit import itrf_to_geodetic, geodetic_to_qd

# Convert ITRF to geodetic coordinates
df_geo = itrf_to_geodetic(df_orbit)

# Convert to Quasi-Dipole magnetic coordinates
df_qd = geodetic_to_qd(df_geo)

Keplerian Orbit Simulation

import numpy as np
from satorbit import simulate_orbit, unperturbed_orbitalperiod

kepler = {
    "semimajoraxis": 7000,  # km
    "eccentricity": 0.001,
    "inclination": np.radians(98),
    "argumentofperigee": np.radians(90),
    "raan": np.radians(0),
    "initial_mean_anomaly": 0,
    "mu": 398600.4415,
    "re": 6378.1363,
    "j2": 1082.6357e-6
}

period = unperturbed_orbitalperiod(kepler)
times = np.linspace(0, period, 100)
orbit = simulate_orbit(kepler, times)

Configuration

For TLE queries from space-track.org, create ~/.spacetrackorg.txt:

[default]
username = your_username
password = your_password

License

Apache License 2.0 - see LICENSE

Acknowledgements

Developed with support from ESA through the Swarm Data Innovation and Science Cluster (Swarm DISC).

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

satorbit-0.2.0.tar.gz (100.6 kB view details)

Uploaded Source

Built Distribution

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

satorbit-0.2.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file satorbit-0.2.0.tar.gz.

File metadata

  • Download URL: satorbit-0.2.0.tar.gz
  • Upload date:
  • Size: 100.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for satorbit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2b71a9c2d3aa960a5f6d292b93942ae006ce290775ae0f246e170954d2845192
MD5 36f45419e2e7474d379dc77fe01f0441
BLAKE2b-256 ffbf5a56c328ee93f3436aea3eeeda862363d6c43576209b30f7aa45ccbe2bf7

See more details on using hashes here.

File details

Details for the file satorbit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: satorbit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for satorbit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 993b5a9adc20d8a6c07484297919ad1a8211457127d2edb92da0f2e129c3f33f
MD5 1ee6d4eb76fbb8be98bd94d1551e1f09
BLAKE2b-256 5b00c73d6441d68c96f6fae30825295350107caba1525c9c68a708fc8396ef3c

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