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 alist[SatelliteTLE].
format="json"(OMM): Returns alist[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.phponly (there is nosup-gp.phpequivalent 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”) orSatelliteOMM(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 legacygp.phpfails (HTTP 5xx, empty body, or invalid-query body), the client retries against supplementalsup-gp.phpwhere supported. Forgps-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”) orSatelliteOMM(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
SatelliteTLEorSatelliteOMMobjects.
- astra.data.fetch_celestrak_active_omm()[source]¶
Fetch the active satellite catalog from CelesTrak in OMM JSON format. Returns high-fidelity
SatelliteOMMobjects that include physical metadata unavailable in TLEs: mass, radar cross-section (RCS), and ballistic coefficient. Data formats: ✓ SatelliteOMM only (usefetch_celestrak_activefor TLEs) :returns: List ofSatelliteOMMobjects 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
SatelliteOMMobjects with physical metadata unavailable in TLEs: mass, radar cross-section (RCS), and ballistic coefficient. Data formats: ✓ SatelliteOMM only (usefetch_celestrak_groupfor TLEs) :param group: CelesTrak group name (e.g."starlink","gps-ops").- Returns:
List of
SatelliteOMMobjects.
- 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_comprehensivefor TLEs) :returns: Deduplicated list ofSatelliteOMMobjects.- Example::
import astra # OMM — high-fidelity comprehensive catalog catalog = astra.fetch_celestrak_comprehensive_omm() # TLE — legacy format catalog = astra.fetch_celestrak_comprehensive()