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: CelesTrak elements plus magnitudes and brightness models that the site's author collects and curates. This library only consumes it. The catalog is refreshed a few times a day; 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.0

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.0
File Size Uploaded Provenance Actions
see_a_satellite-0.1.0.tar.gz 16.3 kB Without provenance Details for see_a_satellite-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 31.1 kB

Release files / see_a_satellite-0.1.0.tar.gz

Download URL see_a_satellite-0.1.0.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
018ab70299dd931478e54bdf29b5aaf224e21ad3d5c6aecfcdc6984450aca52c
BLAKE2b-256 checksum
How to use checksums
e75ff34c4a993bf88d0c54c4368b7e11dbd48e9a5262d69dd06b4f3f3125cf9b
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.0-py3-none-any.whl

Download URL see_a_satellite-0.1.0-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37076615000ce88e7a647911ac114be9f998320ffd17304b06bdc3bce9ac755f
BLAKE2b-256 checksum
How to use checksums
93e0259fc6838d198a9968cbc3bf602744219c38b72e69cb3f26fbbe3d1e93df
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.0

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.0 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