Skip to main content

Predict upcoming satellite overpasses

Project description

passpredict

Tests

Predict upcoming satellite overpasses over a point on Earth.

This library exposes a command-line interface and a backend API to generate overpass predictions.

Currently, passpredict requires Python 3.9 or newer. Future work is planned to backport the libary to Python 3.8, but it is currently not supported.

Install

The package and command line tool can be installed from PyPI using pip.

pip install passpredict

If you intend to use the package as a command line tool, it is a good idea to install the package with its dependencies using pipx.

pipx install passpredict

Quick Start

Overpass predictions are generated by combining a TLE source, topographic location, satellite propagator, and observer algorithm.

In this example, we are generating a list of pass predictions for the International Space Station over Austin, Texas, for 10 days. It automatically downloads the latest TLE from Celestrak.

import datetime
from zoneinfo import ZoneInfo

from passpredict import CelestrakTLESource, Location, SGP4Predictor, Observer

location = Location('Austin, TX', 30.2711, -97.7437, 0)
date_start = datetime.datetime.now(tz=ZoneInfo('America/Chicago'))
date_end = date_start + datetime.timedelta(days=10)
source = CelestrakTLESource()
tle = source.get_tle(25544)  # International space station, Norad ID 25544
satellite = SGP4Predictor.from_tle(tle)
observer = Observer(location, satellite)
pass_iterator = observer.iter_passes(date_start, limit_date=date_end)
overpasses = list(pass_iterator)

Command Line Usage

The command line output is generated using Rich tables.

Predict upcoming visible overpasses of the International Space Station. The location is entered using decimal coordinates, with positive values East and North.

  • International Space Station (ID 25544)
  • Location: 30.2711° N, 97.1234° W
  • Visible passes only
$ passpredict -lat 30.2711 -lon -97.1234 -s 25544

Satellite ID 25544 ISS (ZARYA) overpasses
Lat=30.2711°, Lon=-97.1234°, Timezone America/Chicago
Using TLE with epoch 2022-01-23T21:18:30.062880+00:00
1 25544U 98067A   22023.88784795  .00005671  00000-0  10872-3 0  9995
2 25544  51.6443 331.1875 0006753  55.2214  46.3522 15.49604727322805

┏━━━━━━━━━┳━━━━━━━━━━┳━━━━━━┳━━━━━━┳━━━━━━━━━━┳━━━━━━┳━━━━━━┳━━━━━━━━━━┳━━━━━━┳━━━━━━┳━━━━━━━━━┓
┃         ┃  Start   ┃ Sta… ┃ Sta… ┃    Max   ┃ Max  ┃ Max  ┃    End   ┃ End  ┃ End  ┃         ┃
┃  Date   ┃   Time   ┃   El ┃   Az ┃   Time   ┃  El  ┃  Az  ┃   Time   ┃  El  ┃  Az  ┃  Type   ┃
┡━━━━━━━━━╇━━━━━━━━━━╇━━━━━━╇━━━━━━╇━━━━━━━━━━╇━━━━━━╇━━━━━━╇━━━━━━━━━━╇━━━━━━╇━━━━━━╇━━━━━━━━━┩
│ 2/02/22 │ 19:56:17 │  10° │  NNW │ 19:59:25 │  38° │   NE │ 20:02:33 │  10° │  ESE │ visible │
└─────────┴──────────┴──────┴──────┴──────────┴──────┴──────┴──────────┴──────┴──────┴─────────┘

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

passpredict-0.2.2.tar.gz (385.3 kB view details)

Uploaded Source

File details

Details for the file passpredict-0.2.2.tar.gz.

File metadata

  • Download URL: passpredict-0.2.2.tar.gz
  • Upload date:
  • Size: 385.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for passpredict-0.2.2.tar.gz
Algorithm Hash digest
SHA256 4449e9b3c68fd1a9159ca87bb3160f6cdce010696c8b1eddfcdb2339320c3d7c
MD5 b779bf67bfa9fcbfbd6ad089e801507e
BLAKE2b-256 14a710a671c6899f339bd0472358c1731df13f28ca09b9703d242e4540eb66fe

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