Skip to main content

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_tles

norad_ids = [25544, # ISS (ZARYA)
             4298,  # QIKCOM-1
             40379] # GRIFEX

# Uses default sources
tles = fetch_tles(norad_ids)

for norad_id, (source, tle) in tles.items():
    print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source))

sources = [
    ('CalPoly','http://mstl.atl.calpoly.edu/~ops/keps/kepler.txt'),
    ('Celestrak (active)','https://www.celestrak.com/NORAD/elements/active.txt')
]

# Uses custom sources
tles = fetch_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
tles = fetch_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
tles = fetch_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
tles = fetch_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_tles downloads the TLE sets from all known sources, so it should only be used when fetching TLEs for a large set of satellites.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

satellitetle-0.9.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

satellitetle-0.9.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file satellitetle-0.9.0.tar.gz.

File metadata

  • Download URL: satellitetle-0.9.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.1

File hashes

Hashes for satellitetle-0.9.0.tar.gz
Algorithm Hash digest
SHA256 8c5b02da2298bd972807746a8743eaea032cfb8ec23bce9523ba3ca3d200d86d
MD5 f990b3570b50543022409727aad9cc70
BLAKE2b-256 007d48748e23cf9fc3fee240f3359a37d345e7d708ad0ff970f016fe3aa80b3e

See more details on using hashes here.

File details

Details for the file satellitetle-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: satellitetle-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.1

File hashes

Hashes for satellitetle-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6462ca6b634404d04c38fb3eebe8853b91df51f18b5e951b26137cbebba48f15
MD5 feb911fe29a3835f0c744febe0aee020
BLAKE2b-256 61793805b18c142f2852109d12c41b20a1f001d37c1e6574b168f6a9d85467f0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page