← All packages

Orbits & astrodynamics

star-elements 0.2.4

Classical orbital elements to and from Cartesian state (Curtis Algorithms 4.2 / 4.5)

Public state: Released & Verified. The registry label is RELEASED. What the states mean →

Apache-2.0 Released & Verified single file

Summary

Classical orbital elements to and from Cartesian state. Standard library only.

Run in your browser

Edit the code and press Run (or Ctrl+Enter). Python runs in your browser with this package's published code. The first run downloads Python once (about 12 MB).

Runs in the browser: all 87 tests pass in the browser's Python (Pyodide 314.0.7, Python 3.14.2), measured on 20 October 2026.

Use it on your computer

No account and no GitHub needed. Download, then install with one command:

python -m pip install star_elements-0.2.4-py3-none-any.whl

In Python: import star_elements

Get started →

Cite it, and its bill of materials

For a paper, a report or a supplier file: the citation in two formats, and the software bill of materials (SBOM) in the two standard formats, with the fingerprint of the wheel.

@software{cavazzini_star_elements_0_2_4,
  author  = {Cavazzini, Andrea},
  title   = {{star-elements}: Classical orbital elements to and from Cartesian state (Curtis Algorithms 4.2 / 4.5)},
  version = {0.2.4},
  year    = {2026},
  url     = {https://andrea07072000.github.io/S.T.A.R.-/software/star_elements/},
  note    = {Apache-2.0. Source: https://github.com/Andrea07072000/S.T.A.R.-, commit dc09f61d}
}

For developers

Install directly from the public repository:

python -m pip install "star-elements @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_elements"

README · tests · evidence (GitHub)

Technical sheet

Package
star-elements
Import name
star_elements
Version
0.2.4
Licence
Apache-2.0
Python
>=3.9
Dependencies
none (standard library only)
Capability
star.orbit.anomalies
Maturity
Released & Verified (RELEASED)
Published commit
dc09f61d

Requirements

  • R1 rv_to_coe(r, v, mu=398600.4418) -> (h, e, i, raan, argp, nu) (Curtis Algorithm 4.2); units km, km/s, radians.
  • R2 coe_to_rv(h, e, i, raan, argp, nu, mu) -> (r, v) (Curtis Algorithm 4.5).
  • R3 Singular or invalid cases raise ValueError: equatorial (no RAAN), circular (no argp), rectilinear, h <= 0, hyperbolic true anomaly beyond the asymptotes. No arbitrary angle is ever returned for an undefined element.
  • R4 (0.2.0) Anomalies for 0 <= e < 1: mean_to_eccentric (Kepler, Newton; RuntimeError if not converged), eccentric_to_true, true_to_eccentric, eccentric_to_mean; e >= 1 raises ValueError.

Limits (what is not claimed)

Hyperbolic/parabolic anomalies, equinoctial or other non-singular element sets (needed for equatorial/circular orbits), mean elements, any flight use.

Release gate

Computed by the registry from the result files, with the same function that decides RELEASED.

Mutation score, latest measure of each module (needs at least 0.850)
  • star_anomaly.py 0.937 (2026-10-07)
Independent implementations written by others (needs 2)
hapsira.core.angles, Orekit KeplerianAnomalyUtility, poliastro/hapsira angles
Also compared with, not counted
S.T.A.R.'s own re-derivations: Kepler's equation and half-angle relations at 50 digits in mpmath (same author), S.T.A.R. Newton (Vallado Alg. 2 start)
Result
Released & Verified

Evidence in the registry

CheckStatusRecordedWhat was observed
Unit testsVERIFIED2026-10-0732 passed in 0.61s
ReviewVERIFIED2026-10-07Requirements, interface, units, data provenance, dependency surface and failure behaviour reviewed
ReviewVERIFIED2026-10-07Re-running the cross-check gives a byte-identical evidence file
Reference valueVERIFIED2026-10-07degrees(eccentric_from_mean(radians(235.4), 0.4)) = 220.51207476752208; hyperbolic_from_mean(radians(235.4), 2.4) = 1.6013761449325081 (suite: 32 passed in 0.61s)
Cross-check with independent librariesVERIFIED2026-10-07star_anomaly solves Kepler's equation and converts between mean, eccentric, hyperbolic and true anomaly to within 1e-13 rad of 50-digit arithmetic, nearly parabolic orbits included
BenchmarkVERIFIED2026-10-07largest difference from 50-digit arithmetic: 8.9e-15 rad; hapsira on nearly parabolic orbits: 5.4e-14 rad; Orekit: 7.1e-08 rad
Clean install from the release tagVERIFIED2026-10-07pytest outside the tree: 32 passed in 0.41s
Mutation testingVERIFIED2026-10-04before 216/266 = 0.812; after 224/262 = 0.855 (38 survivors, mostly equivalent: clamp constants, zero z-column of Q, Newton start/tolerance)
ReviewVERIFIED2026-10-03Re-execution of bench.xc-010 reproduces the committed evidence bundles
ReviewVERIFIED2026-10-03Re-execution of bench.xc-009 reproduces the committed evidence bundles
Cross-check with independent librariesVERIFIED2026-10-03star_elements and hapsira agree on [E, nu] for 20 (M, e) cases plus the Vallado case
BenchmarkVERIFIED2026-10-0321/21 AGREE, reference deviation 4.8e-10 deg, reproduced by star verify
Reference valueVERIFIED2026-10-03220.512074767 deg, deviation < 1e-9 deg; Curtis Ex. 3.2 within 5e-5 rad
Unit testsVERIFIED2026-10-038/8 anomaly tests pass (14/14 in the package)

Fingerprints (SHA-256)

star_elements-0.2.4-py3-none-any.whlbb7b96a3fbd632fd7cf99f4ebb30eb90a23fbffaa237e4e33286bd343599518f
star_elements.py7b54ae0a1b1796edbc6cc38206d431dec18e3024b95a99fa76c3846e98002044
star_elements-0.2.4-source.zipc183181a0a3fd64c534d8cfabe32e2b0cec9f9df126fe5927c6737fc0dce2ba3

results