Fetch satellite TLEs from various online sources
Project description
The python package satellitetle provides functions to fetch TLEs from various online sources (currently CelesTrak (SatNOGS), CalPoly and AMSAT) and allows using custom ones or Space-Track.org.
It was forked from the python package orbit.
Usage
Fetch TLEs for a single satellite from Celestrak:
from satellite_tle import fetch_tle_from_celestrak norad_id_iss = 25544 # ISS (ZARYA) print(fetch_tle_from_celestrak(norad_id_iss))
Fetch a large set of TLEs for a list of satllites from all available sources:
from satellite_tle import fetch_all_tles, fetch_latest_tles norad_ids = [25544, # ISS (ZARYA) 42983, # QIKCOM-1 40379] # GRIFEX # Uses default sources and compares TLE set from each source and # returns the latest one for each satellite tles = fetch_latest_tles(norad_ids) for norad_id, (source, tle) in tles.items(): print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source)) # Uses default sources and returns the TLE sets from all source for # each satellite tles = fetch_all_tles(norad_ids) for norad_id, tle_list in tles.items(): for source, tle in tle_list: print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source)) # Defines custom sources sources = [ ('CalPoly','http://mstl.atl.calpoly.edu/~ops/keps/kepler.txt'), ('Celestrak (active)','https://www.celestrak.com/NORAD/elements/active.txt') ] # Uses custom sources (fetch_all_tles can also be used with the same # parameters) tles = fetch_latest_tles(norad_ids, sources=sources) for norad_id, (source, tle) in tles.items(): print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source)) spacetrack_config= { 'identity': 'my_username', 'password': 'my_secret_password' } # Uses default sources and Space-Track.org (fetch_all_tles can also # be used with the same parameters) tles = fetch_latest_tles(norad_ids, spacetrack_config=spacetrack_config) for norad_id, (source, tle) in tles.items(): print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source)) # Uses only Space-Track.org (fetch_all_tles can also be used with the # same parameters) tles = fetch_latest_tles(norad_ids, sources=[], spacetrack_config=spacetrack_config) for norad_id, (source, tle) in tles.items(): print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source)) # Uses custom sources and Space-Track.org (fetch_all_tles can also be # used with the same parameters) tles = fetch_latest_tles(norad_ids, sources=sources, spacetrack_config=spacetrack_config) for norad_id, (source, tle) in tles.items(): print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source))
NOTE: fetch_latest_tles and fetch_all_tles download the TLE sets from all known sources, so they should only be used when fetching TLEs for a large set of satellites.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file satellitetle-0.12.0.tar.gz
.
File metadata
- Download URL: satellitetle-0.12.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d0e26d977090d49823684edbeb685e5ee2c9ea6044fb5a3d0c653ec33817409 |
|
MD5 | cbcaabfae682415dd7ba115f79c1a9e0 |
|
BLAKE2b-256 | 173a3bb4e84aaf09f658bbad7b80f82162a0927a50bc533f62403a4777d96b1a |
File details
Details for the file satellitetle-0.12.0-py3-none-any.whl
.
File metadata
- Download URL: satellitetle-0.12.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cda2d8583edbf1e296c0b0b0f794c71608c29314df0cb8787506ec5d25261872 |
|
MD5 | 7a962507e2370cdbcd6234722279d9bc |
|
BLAKE2b-256 | a645d674e4306b919222883a48a167d0fd286b7bac0156ef538ea0743a87954e |