Fetch TLEs and orbital data from CelesTrak.
CelesTrak provides free access to satellite orbital data without authentication. Data is sourced from the 18th Space Defense Squadron (formerly USSPACECOM).
Examples
# Fetch ISS TLE by NORAD catalog number
{:ok, [tle]} = Orbis.CelesTrak.fetch_tle(25544)
# Fetch an entire constellation group
{:ok, tles} = Orbis.CelesTrak.fetch_group("stations")
# List available groups
groups = Orbis.CelesTrak.groups()Rate Limiting
CelesTrak asks users to limit requests. This module does not enforce rate limiting — callers should cache results and avoid polling more than once per hour for the same data.
Live fetches require the optional Req dependency. If it is not available,
fetch functions return {:error, :req_not_available}.
Summary
Functions
Fetch TLEs for a constellation group.
Fetch orbital data as JSON (OMM format) for a group.
Fetch TLE for a single satellite by NORAD catalog number.
List commonly used CelesTrak constellation group names.
Search for satellites by name fragment.
Functions
@spec fetch_group(String.t()) :: {:ok, [Orbis.Elements.t()]} | {:error, term()}
Fetch TLEs for a constellation group.
Common groups: "stations", "starlink", "oneweb", "globalstar",
"iridium-NEXT", "planet", "spire", "active", "analyst",
"geo", "weather", "noaa", "goes", "resource", "sarsat",
"dmc", "tdrss", "argos", "intelsat", "ses", "iridium",
"orbcomm", "gnss", "gps-ops", "galileo", "beidou",
"musson", "science", "geodetic", "engineering", "education",
"military", "radar", "cubesat", "other".
Examples
{:ok, tles} = Orbis.CelesTrak.fetch_group("stations")
length(tles)
#=> 15
Fetch orbital data as JSON (OMM format) for a group.
Returns raw list of OMM maps. Useful for metadata (object name, launch date, etc.) not available in TLE format.
Examples
{:ok, omms} = Orbis.CelesTrak.fetch_omm("stations")
hd(omms)["OBJECT_NAME"]
#=> "ISS (ZARYA)"
@spec fetch_tle(integer() | String.t()) :: {:ok, [Orbis.Elements.t()]} | {:error, term()}
Fetch TLE for a single satellite by NORAD catalog number.
Returns {:ok, [%Orbis.Elements{}]} or {:error, reason}.
Examples
{:ok, [tle]} = Orbis.CelesTrak.fetch_tle(25544)
tle.catalog_number
#=> "25544"
@spec groups() :: [String.t()]
List commonly used CelesTrak constellation group names.
@spec search(String.t()) :: {:ok, [Orbis.Elements.t()]} | {:error, term()}
Search for satellites by name fragment.
Examples
{:ok, tles} = Orbis.CelesTrak.search("ISS")