Fetching TLEs
This package defines a simple API to fetch TLEs from different sources. For more information, see the file API.md in the directory ./src/fetcher/.
It already contains the support to Celestrak. To fetch TLEs from this source, we first need to create the fetcher object:
julia> f = create_tle_fetcher(CelestrakTleFetcher)CelestrakTleFetcher: https://celestrak.org/NORAD/elements/gp.php
Afterward, we can fetch the TLEs using the function fetch_tles:
julia> fetch_tles(f, satellite_name = "AMAZONIA 1")[ Info: Fetching TLEs from Celestrak using satellite name "AMAZONIA 1"... 1-element Vector{TLE}: TLE: AMAZONIA 1 [47699] (Epoch = 2026-09-07T10:49:09.932)
This function will always return a Vector{TLE}, which is empty if no TLE matches the query.
For Celestrak fetcher, the following options are available:
international_designator::Union{Nothing, AbstractString}: International designator using the formatYYYY-NNNorYYYY-NNNP, whereYYYYis the launch year,NNNis the launch number, andPis the piece of the launch. (Default:nothing)satellite_number::Union{Nothing, Integer}: Satellite catalog number (NORAD). (Default =nothing)satellite_name::Union{Nothing, AbstractString}: Satellite name. Notice that the system will search for all satellites whose name contains this string. (Default:nothing)
Thus, if we want to know, for example, all the satellites that were launched by the same rocket, we can search by the international designator as follows:
julia> fetch_tles(f, international_designator = "2021-015")[ Info: Fetching TLEs from Celestrak using international designator "2021-015"... 2-element Vector{TLE}: TLE: AMAZONIA 1 [47699] (Epoch = 2026-09-07T10:49:09.932) TLE: OBJECT B [47700] (Epoch = 2026-09-07T13:23:34.295)
If the request fails, for example because the service is unreachable, the function throws a TleFetchError with the URL and, if available, the HTTP status of the request.
Please, DO NOT abuse the fetching system. CelesTrak is a non-profit organization. SatelliteToolboxTle.jl provides only the interface to their servers. Ensure you agree with their user agreement before using the functions described here. Abusing the GP data API can lead to bans.