View Source SpaceDust.Ingest.Celestrak (Space Dust v0.3.0)

Client for retrieving Two-Line Element (TLE) data from Celestrak.

Celestrak is a public service that provides NORAD two-line element sets for satellites. This module provides functions to fetch the latest TLE data for specific satellites by their NORAD catalog number.

Example

# Fetch TLE for the International Space Station (NORAD ID: 25544)
{:ok, tle} = SpaceDust.Ingest.Celestrak.pullLatestTLE("25544")

# Fetch TLE for a geostationary satellite
{:ok, tle} = SpaceDust.Ingest.Celestrak.pullLatestTLE("40425")

Notes

  • Requires network access to celestrak.com
  • TLEs are typically updated several times per day
  • NORAD catalog numbers can be found at space-track.org or celestrak.com

Summary

Functions

Fetch the latest TLE for a satellite from Celestrak.

Functions

pullLatestTLE(targetId)

@spec pullLatestTLE(String.t()) ::
  {:ok, SpaceDust.Utils.TwoLineElementSet.t()} | {:error, String.t()}

Fetch the latest TLE for a satellite from Celestrak.

Parameters

  • targetId - NORAD catalog number as a string (e.g., "25544" for ISS)

Returns

  • {:ok, %TwoLineElementSet{}} - Successfully retrieved and parsed TLE
  • {:error, reason} - Failed to retrieve or parse TLE

Example

iex> {:ok, tle} = SpaceDust.Ingest.Celestrak.pullLatestTLE("25544")
iex> tle.inclinationDeg
51.6...