Skip to main content

see-a-satellite

Predict when satellites are visible to the naked eye, the way See A Satellite Tonight does. This is a Python port of James Darpinian's site, made with his permission. It powers the Home Assistant See A Satellite Tonight integration.

import aiohttp
from see_a_satellite import fetch_site_catalog, group_transits, predict_transits

async with aiohttp.ClientSession() as session:
    satellites = await fetch_site_catalog(session)

# CPU bound (a few seconds): run it in an executor from async code.
for group in group_transits(predict_transits(satellites, 52.03, 5.56, 10)):
    t = group.primary
    print(group.start, t.satellite.name, f"mag {group.min_magnitude:.1f}",
          f"rises {t.rise.azimuth:.0f}°/{t.rise.elevation:.0f}°", "bright" if group.bright else "")

What it computes

The pipeline follows the website step by step:

  • Propagation. SGP4 runs from OMM elements at one-minute steps for 5 days, and positions are rotated from the TEME frame to Earth-fixed coordinates.
  • Brightness. The intrinsic magnitude at 1000 km is adjusted for range, atmospheric extinction (Green 1992) and phase angle (diffuse sphere). Starlink and BlueBird satellites use their own phase-function models (Mallama et al. 2025; Cole et al. 2025).
  • Visibility. A satellite counts as visible when it is at least 10° up, brighter than the limiting magnitude for the sun's depression (Weaver 1947), and lit by the sun above the troposphere (grazing height ≥ 15 km).
  • Refinement and grouping. Each pass is refined to one second. Overlapping passes are grouped, incidental Starlinks are pruned, and a "bright" label is applied.

Checked against the website, for every pass the site shows over 5 days:

  • start times agree within 9 s
  • end times agree within 19 s
  • magnitudes agree within 0.03

Catalog

fetch_site_catalog(session, "brightest" | "starlink") downloads the website's catalog, which the site's author collects and curates. Orbital elements come mostly from Space-Track (US Space Force 18th Space Defense Squadron), and Starlink elements come from CelesTrak. Magnitudes come from Mike McCants and the MMT-9 survey (Karpov et al. 2016), and constellation phase functions come from published photometry. See James's write-up. This library only consumes the catalog. The site refreshes it every 8 hours. Cache it (dump_catalog / parse_site_catalog) rather than downloading it on every prediction.

Development

uv sync
uv run pytest && uv run mypy && uv run ruff check src tests

Metadata

Release files for see-a-satellite 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for see-a-satellite 0.1.1
File Size Uploaded Provenance Actions
see_a_satellite-0.1.1.tar.gz 16.5 kB Without provenance Details for see_a_satellite-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for see-a-satellite 0.1.1
File Interpreter ABI Platform Actions
see_a_satellite-0.1.1-py3-none-any.whl Python 3 none any Details for see_a_satellite-0.1.1-py3-none-any.whl

Total release size: 31.4 kB

Release files / see_a_satellite-0.1.1.tar.gz

Download URL see_a_satellite-0.1.1.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f99bdb25fc74d5d7e7fe31e28bc149455fec6c39e1efd70ec1aaa31bcb20ebd6
BLAKE2b-256 checksum
How to use checksums
79b0e4c7424a551323fb18706b4d73b951dd742902707216a977742f391a97d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / see_a_satellite-0.1.1-py3-none-any.whl

Download URL see_a_satellite-0.1.1-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db9487a7e29e2cccffdf3d054d47cc3ab2ab0926f370ef95d10a423b7727b79f
BLAKE2b-256 checksum
How to use checksums
384a18c4c7d37cbe097d7cff74430c8cf0c2f991df43689934ef55a0962636cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for see-a-satellite 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page