astra.data module

ASTRA Core Data Ingestion Module. Bridges the computation engine to live orbital data providers like CelesTrak and Space-Track. Converts real-time API responses into ASTRA trajectory pipelines. Supports dual-format ingestion:

  • format="tle" (default): Returns a list[SatelliteTLE].

  • format="json" (OMM): Returns a list[SatelliteOMM].

Example::

# Legacy TLE (default, unchanged behaviour) tles = astra.fetch_celestrak_group(“starlink”) # Modern OMM with full physical metadata omms = astra.fetch_celestrak_group(“starlink”, format=”json”)

astra.data.fetch_celestrak_active(format='tle')[source]

Fetch the active satellite catalog from CelesTrak. Downloads the entire live active catalog and parses it into ASTRA data models. Uses legacy gp.php only (there is no sup-gp.php equivalent for the full active catalog). :param format: "tle" (default) for legacy TLE format,

"json" for modern OMM JSON with physical metadata.

Returns:

List of SatelliteTLE (format=”tle”) or SatelliteOMM (format=”json”).

astra.data.fetch_celestrak_group(group, format='tle')[source]

Fetch a specific constellation/group from CelesTrak. Valid groups include: 'starlink', 'gps-ops', 'iridium-33-debris', etc. If legacy gp.php fails (HTTP 5xx, empty body, or invalid-query body), the client retries against supplemental sup-gp.php where supported. For gps-ops, the supplemental path uses broadcast almanac data (SOURCE=GPS-A), not the legacy ops list. :param group: CelesTrak group name string. :param format: "tle" (default) for legacy TLE format,

"json" for modern OMM JSON with physical metadata.

Returns:

List of SatelliteTLE (format=”tle”) or SatelliteOMM (format=”json”).

astra.data.fetch_celestrak_comprehensive(format='tle', strict_mode=False)[source]

Fetch active payloads plus major debris clouds for a pseudo-full catalog. Since CelesTrak does not expose a single unauthenticated ‘all’ endpoint, this function assembles the ~25,000+ most important objects across key groups. :param format: "tle" (default) for legacy TLE format,

"json" for modern OMM JSON with physical metadata.

Parameters:

strict_mode – If True, raises an AstraError immediately if any group fails to download. If False (default), logs a warning and continues.

Returns:

Deduplicated list of SatelliteTLE or SatelliteOMM objects.

astra.data.fetch_celestrak_active_omm()[source]

Fetch the active satellite catalog from CelesTrak in OMM JSON format. Returns high-fidelity SatelliteOMM objects that include physical metadata unavailable in TLEs: mass, radar cross-section (RCS), and ballistic coefficient. Data formats: ✓ SatelliteOMM only (use fetch_celestrak_active for TLEs) :returns: List of SatelliteOMM objects for all active satellites.

Example::

import astra # OMM — high-fidelity with RCS and mass metadata satellites = astra.fetch_celestrak_active_omm() # TLE — legacy format (default) satellites = astra.fetch_celestrak_active()

astra.data.fetch_celestrak_group_omm(group)[source]

Fetch a specific satellite group from CelesTrak in OMM JSON format. Returns high-fidelity SatelliteOMM objects with physical metadata unavailable in TLEs: mass, radar cross-section (RCS), and ballistic coefficient. Data formats: ✓ SatelliteOMM only (use fetch_celestrak_group for TLEs) :param group: CelesTrak group name (e.g. "starlink", "gps-ops").

Returns:

List of SatelliteOMM objects.

Example::

import astra # OMM — high-fidelity starlinks = astra.fetch_celestrak_group_omm(“starlink”) # TLE — legacy format (default) starlinks = astra.fetch_celestrak_group(“starlink”)

astra.data.fetch_celestrak_comprehensive_omm()[source]

Fetch a comprehensive multi-group catalog from CelesTrak in OMM JSON format. Assembles ~25,000+ objects from active satellites, Fengyun-1C debris, Iridium 33 debris, Cosmos 2251 debris, and other major debris clouds. Data formats: ✓ SatelliteOMM only (use fetch_celestrak_comprehensive for TLEs) :returns: Deduplicated list of SatelliteOMM objects.

Example::

import astra # OMM — high-fidelity comprehensive catalog catalog = astra.fetch_celestrak_comprehensive_omm() # TLE — legacy format catalog = astra.fetch_celestrak_comprehensive()