pymgp.tleorb.tleget#

pymgp.tleorb.tleget(tleset, tlefile='')[source]#

Retrieve NORAD Two Line Elements from www.celestrak.com.

Download current NORAD two line elements from Celestrak (www.celestrak.com) and saves the two line elements to a file on the local computer.

Parameters:
tlesetarray_like, list of strings, string

String, list of strings, or ndarray with the name(s) of the two line element set(s). This can be the name of a file on Celestrak, or, a family of satellites. Common sets of two line elements are ‘GPS’ (‘gps-ops’), ‘GLONASS’ (‘glo-ops’), ‘GALILEO’, ‘BEIDOU’, ‘SBAS’; ‘GNSS’ or ‘SATNAV’ to do all satellite navigation systems; ‘resource’ for Earth resource satellites, etc. For a full list see the Celestrak website.

tlefilestring, optional

Name of local file to save the two-line elements to. Default is the filename on Celestrak or the set name.

Returns:
tlefilestring

Name of the local file with two-line elements.

See also

tleread, tle2vec

Notes

The mean orbital elements contained in TLE are Earth-centered-inertial (ECI) coordinates with respect to the true equator of date and the mean equinox of date. They do not include the effect of nutation. The TLE are compatible with the SGP4 and SDP4 orbit propagators of NORAD. The two line elements are read with the tleread() function.

Examples

>>> tlefile = tleget('resource')
Saving TLE set to default name
TLEGET: Downloaded resource.txt from http://celestrak.com/NORAD/elements/
Saved TLE to resource.txt
>>> tlefile = tleget('gnss')
Saving TLE set to default name
TLEGET: Downloaded gps-ops.txt from http://celestrak.com/NORAD/elements/
TLEGET: Downloaded glo-ops.txt from http://celestrak.com/NORAD/elements/
TLEGET: Downloaded galileo.txt from http://celestrak.com/NORAD/elements/
TLEGET: Downloaded beidou.txt from http://celestrak.com/NORAD/elements/
TLEGET: Downloaded sbas.txt from http://celestrak.com/NORAD/elements/
Saved TLE to gnss.txt
>>> tlefile = tleget(['gps', 'galileo'],'gps-galileo-20240802.tle')
TLEGET: Downloaded gps-ops.txt from http://celestrak.com/NORAD/elements/
TLEGET: Downloaded galileo.txt from http://celestrak.com/NORAD/elements/
Saved TLE to gps-galileo-20240802.tle