$npx skillfedfor your agent

sgp4

The C++ SGP4 routine that, given an Earth satellite TLE, computes its position.

Worth itPyPI AstronomyReleased Jul 20261.0M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — sgp4-2.27-py3-none-any.whl
v2.27 · released 2026-07-03 · Python !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,!=3.8.*,!=3.9.*,>=2.7

Yes. SGP4 is actively maintained, has no runtime dependencies, compiles cleanly on most systems with a pure-Python fallback, carries an MIT license with no restrictions, and has no known vulnerabilities. Install it if you need to compute satellite positions from TLE or OMM data; it is the standard Python interface to the official SGP4 algorithm.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Installs cleanly with no runtime dependencies.
  • Actively maintained with recent releases; the C++ implementation compiles on most systems, but the package gracefully falls back to a slower pure-Python version if compilation fails.

License · maintenance · safety

MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

last release 2026-07-03 (42 days) · last repo commit 2026-07-12 · 468 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,039,036 downloads/mo, #4,457 on PyPI

Verify before relying

pip install sgp4

from sgp4.api import Satrec

s = '1 25544U 98067A   19343.69339541  .00001764  00000-0  38792-4 0  9991'
t = '2 25544  51.6439 211.2001 0007417  17.6667  85.6398 15.50103472202482'
satellite = Satrec.twoline2rv(s, t)

jd, fr = 2458826.5, 0.8625
e, r, v = satellite.sgp4(jd, fr)
print(r)  # position in km
print(v)  # velocity in km/s
  • Whether the C++ extension will compile successfully on your target platform (graceful fallback exists but is slower).
  • Performance characteristics of the pure-Python fallback relative to C++ for batch computations.
Same gist for agents: .md · .json

What it is and what it does

SGP4 is a Python wrapper around the official C++ implementation of the Simplified General Perturbations (SGP4) and Simplified Deep Space Perturbations (SDP4) satellite propagation algorithms. It takes Two-Line Element (TLE) sets or OMM (Orbit Mean Elements Message) data—the standard formats for describing satellite orbits—and computes the satellite's position and velocity at any given time. The package automatically selects between SGP4 (for low Earth orbit, periods under 225 minutes) and SDP4 (for higher orbits) based on the orbital parameters.

The package includes a fast C++ implementation that compiles on most systems, but falls back to a slower pure-Python version if compilation fails, ensuring portability. Results are returned as raw x,y,z Cartesian coordinates in the True Equator Mean Equinox (TEME) reference frame—an Earth-centered inertial frame. The package does not perform coordinate transformations to other frames (J2000, ICRS, ECEF, WGS84) or compute latitude/longitude; those conversions are left to higher-level astronomy libraries like Skyfield, which builds on top of this one.

Use it for

  • Track International Space Station or other known satellites by loading their TLE and computing positions at specific times.
  • Build a satellite pass predictor that determines when a satellite will be visible from a ground location.
  • Validate or debug TLE data by checking whether parsed orbital elements produce physically reasonable positions.
  • Compute satellite positions for a large batch of times and satellites using the accelerated array routine.
  • Integrate satellite propagation into a mission planning or conjunction assessment tool.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

SGP4 is actively maintained, has no runtime dependencies, compiles cleanly on most systems with a pure-Python fallback, carries an MIT license with no restrictions, and has no known vulnerabilities. Install it if you need to compute satellite positions from TLE or OMM data; it is the standard Python interface to the official SGP4 algorithm.

Install

sgp4 on PyPI

Before you install

Installs cleanly with no runtime dependencies. Actively maintained with recent releases; the C++ implementation compiles on most systems, but the package gracefully falls back to a slower pure-Python version if compilation fails.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install sgp4

from sgp4.api import Satrec

s = '1 25544U 98067A   19343.69339541  .00001764  00000-0  38792-4 0  9991'
t = '2 25544  51.6439 211.2001 0007417  17.6667  85.6398 15.50103472202482'
satellite = Satrec.twoline2rv(s, t)

jd, fr = 2458826.5, 0.8625
e, r, v = satellite.sgp4(jd, fr)
print(r)  # position in km
print(v)  # velocity in km/s

Verify before relying

  • Whether the C++ extension will compile successfully on your target platform (graceful fallback exists but is slower).
  • Performance characteristics of the pure-Python fallback relative to C++ for batch computations.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,!=3.8.*,!=3.9.*,>=2.7
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 42 days since the last release
Last repo commit
First released
Downloads1,039,036 / month, #4,457 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Astronomy

Evidence: sgp4-2.27-py3-none-any.whl

Tags

Capabilities
satellite position propagationSGP4 TLE parserorbital mechanics computationearth satellite trackingtle to cartesian coordinatessatellite ephemerisspace object propagator
Topics
astrodynamicssatellite-trackingorbital-mechanics

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “satellite position propagation”

  • sgp4Computes satellite positions in Earth orbit from TLE or OMM orbital…
  • skyfieldSkyfield computes high-precision positions for planets and Earth…
  • ephemPyEphem computes high-precision positions of planets, moons, stars,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Astronomy packages

albumentations Worth it
PyPI · Libraries · released May 2025

Albumentations applies image transformations to training data, supporting classification, segmentation, object detection, and pose estimation with a unified API for images, masks, bounding boxes, and keypoints.

Install it if you need a unified, production-grade augmentation API for computer vision tasks.

MITpure Python · 3.9+aging
5.5Mdownloads / mo
convertdate With conditions
PyPI · Astronomy · released Feb 2026

Converts dates between the Gregorian calendar and 15+ alternative calendar systems including Hebrew, Islamic, Julian, French Republican, Mayan, and others, plus calculates holidays across North American, Jewish, and other traditions.

Install only if you actually need multi-calendar support; the single pymeeus dependency is manageable.

MITpure Pythonaging
4.4Mdownloads / mo
jdcal With conditions
PyPI · Astronomy · released Apr 2019

Converts between Julian dates and Gregorian or Julian calendar dates, storing Julian dates as pairs of floating-point numbers for maximum precision.

However, be aware that it will not receive bug fixes or updates—verify that its behavior matches your requirements before committing to it in a production system.

BSD-3-Clausepure Pythonabandoned
3.8Mdownloads / mo
pyerfa Worth it
PyPI · Physics · released Nov 2024

PyERFA wraps the ERFA C library (Essential Routines for Fundamental Astronomy) as NumPy universal functions, exposing key astronomy algorithms for scalar or array inputs.

Install it if you need fundamental astronomy calculations or if another package depends on it.

BSD-3-Clausecompiled wheel · 3.9+
3.4Mdownloads / mo
PyMeeus With conditions
PyPI · Astronomy · released Dec 2022

PyMeeus implements astronomical algorithms from Jean Meeus's classical reference, providing Python classes for computing celestial positions, lunar phases, planetary phenomena, and time conversions with minimal dependencies.

However, verify Python version compatibility first and consider whether other libraries better suit production-grade use cases.

LGPL-3.0-onlybuilds from source
2.8Mdownloads / mo
ephem Worth it
PyPI · Astronomy · released Feb 2026

PyEphem computes high-precision positions of planets, moons, stars, comets, and asteroids in the sky for any observer location and date, using C-based numeric routines from the XEphem astronomy application.

MITcompiled wheel
1.6Mdownloads / mo

See also pyorbital · skyfield · jplephem · pystac-ext-sat · astropy-iers-data · sxtwl · pygeodesy