Skip to main content

Pure-Python decoder for EUROCONTROL ASTERIX surveillance data

Project description

pyobelix

Pure-Python decoder for EUROCONTROL ASTERIX surveillance data. Sibling library to pyModeS for Mode-S / ADS-B decoding.

license

Install

pip install "pyobelix>=0.1"

Python 3.11+ required. Zero runtime dependencies.

Quick start

from pyobelix import iter_records

for rec in iter_records("path/to/asterix.bin"):
    if rec.cat == 48 and "rho" in rec:
        print(rec["icao"], rec["rho"], rec["theta"])

Accepts file paths, bytes/bytearray, or any BinaryIO stream.

Streaming from a socket

from pyobelix import AsterixDecoder

dec = AsterixDecoder()
while True:
    chunk = sock.recv(4096)
    if not chunk:
        break
    dec.feed(chunk)
    for rec in dec.records():
        process(rec)

Decoding Mode-S Comm-B (MB) with pyModeS

pyobelix emits CAT 048 I/250 MB payloads as opaque 14-char uppercase hex strings. To decode the Mode-S fields:

import pyModeS
from pyobelix import iter_records

for rec in iter_records(path):
    if rec.cat != 48:
        continue
    for mb in rec.get("mode_s_mb", []):
        decoded = pyModeS.Message.from_payload(
            mb["mb"], df=20, icao=rec["icao"]
        ).decode()
        print(decoded)

See docs/pymodes-bridge.md for the full recipe.

Supported categories (v.0.1.0)

  • CAT 048 — Monoradar Target Reports (EUROCONTROL-SPEC-0149-4 Ed. 1.32)
  • CAT 034 — Monoradar Service Messages (EUROCONTROL-SPEC-0149-2B Ed. 1.29)

Additional categories (021, 062, …) planned for v.0.2.0. See the design spec for the full roadmap.

License

MIT. See LICENSE.

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

pyobelix-0.1.0.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyobelix-0.1.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file pyobelix-0.1.0.tar.gz.

File metadata

  • Download URL: pyobelix-0.1.0.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyobelix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc8d755011ee740c0e59b9ca910076cb959dd690cb854f0816a06a562f90f849
MD5 19aa6823078e5b37bcd1c244ad9d1a92
BLAKE2b-256 99be973ef5e58a4ff57cbcdc11c9db367787fcfa9b66e914d8e0985334cd5d3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyobelix-0.1.0.tar.gz:

Publisher: release.yml on junzis/pyobelix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyobelix-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyobelix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyobelix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83d665048772dd54783d65f265491f8ab70d34545eb08612b61e28a1ebb3a06e
MD5 2577ead038e22ad8112cdd9878d9238f
BLAKE2b-256 75d416551433e687a35bd04767f0dcc074e66e397006c28edf3f3066c094cd6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyobelix-0.1.0-py3-none-any.whl:

Publisher: release.yml on junzis/pyobelix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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