Skip to content

v3.0.0

Choose a tag to compare

@github-actions github-actions released this 13 Apr 08:19
· 38 commits to main since this release

First release of the v3 ground-up rewrite. Not backwards-compatible with pyModeS 2.x. See the migration guide before upgrading.

pip install "pyModeS>=3"

Python 3.11+ required.

Highlights

  • One unified decode() function. Returns a Decoded dict with every decodable field populated in a single call. Handles single hex strings or batched lists with per-message timestamps; errors become error-dicts instead of exceptions.
  • Stateful streaming via PipeDecoder. Per-ICAO state, automatic even/odd CPR pair matching, TTL eviction, and DF20/21 icao_verified promotion from a trusted-address set populated off clean DF17/18 frames.
  • Reference-assisted Comm-B disambiguation. BDS 5,0 vs 6,0 ambiguity is resolved by scoring candidates against cached groundspeed / track / heading / mach when passed via known=, or automatically in PipeDecoder.
  • New modes CLI with two subcommands:
    • modes decode — one-shot, inline-batch, or file-based hex→JSON
    • modes live --network HOST:PORT — streaming TCP → JSON lines, with sub-microsecond timestamps derived from the Mode-S Beast MLAT counter (tick rate auto-calibrated, so dump1090 and radarcape/AirSquitter both work without config)
    • modes live --tui — interactive textual-based aircraft table with keyboard navigation, live incremental search, sort cycling, and diff-update cell redraws (requires pyModeS[tui] extra)
  • Pure Python. Dropped the Cython c_common extension and the numpy hard dependency. Internal representation is Python int + bit-shift primitives; no wheel build per Python version.
  • Airport database for surface CPR: surface_ref="EHAM" or surface_ref=(lat, lon).
  • Optional full_dict=True populates every key in the 123-field canonical schema for pandas / parquet workflows.

Breaking changes

  • Legacy function-per-field API removed (pms.adsb.callsign, pms.commb.bds, pms.common.hex2bin, etc.). The old submodule paths are intercepted by a meta-path finder that raises V2APIRemovedError (ImportError subclass) with a migration hint. pyModeS.common helpers are restored as pyModeS.util (hex2bin, bin2int, hex2int, crc, df, icao, typecode, altcode, idcode, cprNL).
  • Python 3.11+ minimum (was 3.9+).
  • numpy is no longer a dependency.
  • modeslive CLI entry point replaced by modes live / modes decode. The old modeslive script prints a migration hint and exits code 2 instead of vanishing.
  • CPR resolution API: reference=(lat, lon) for airborne (180 NM tolerance), surface_ref="EHAM" or surface_ref=(lat, lon) for surface (45 NM tolerance).

Staying on v2

pip install "pyModeS<3"

v2 and v3 share the same PyPI distribution slot; pinning <3 keeps you on the 2.x line indefinitely.

Full changelog

See CHANGELOG.md for the complete list of added / fixed / changed / removed items.

Full diff: v2.22.0...v3.0.0