pyarinc is a modern, typed Python library for decoding ARINC 717 and ARINC 767
flight‑data recorder formats. It provides deterministic bit‑extraction utilities,
clean parameter models, PRM/VEC configuration parsing, and end‑to‑end decoding
into pandas DataFrames.
The library is designed for analysis pipelines, automated QA tooling, and research workflows that require reliable, test‑covered decoding of FDR/QAR data.
The package is not published on PyPI. Install locally:
pip install .
pip install -e .
pip install -e .[test]
Run the full test suite:
pytest
# or
pytest -vv
Tests cover:
- Bit extraction (717/767, MSB‑first, cross‑byte)
- Data‑type decoding (BNR, BCD, DISCRETE, PACKED, CHAR/ASCII, UTC, COB)
- Frame reconstruction (717) and frame parsing (767)
- Scheduling and superframes
- PRM/VEC parsing
- End‑to‑end decoding for both ARINC 717 and ARINC 767
- Detects aligned and bitstream formats
- Converts bitstream → aligned frames
- Reconstructs frames, subframes, and superframes
- Decodes BNR, BCD, DISCRETE, PACKED, CHAR/ISO, UTC
- Applies rate‑based scheduling and superframe rules
- Produces time‑indexed parameter values
- Word‑based parameter indexing via:
subframewordbit_offset
- Absolute bit indexing is not used for 717 parameters
- Frame boundary detection (sync word, header, trailer)
- Timestamp extraction with wrap‑around handling
- Parameter extraction using absolute bit indexing (
start_bit) - VEC/PRM‑based configuration
- Full data‑type support:
- BNR (signed/unsigned)
- BCD
- DISCRETE
- PACKED BITS
- CHAR / ASCII
- UTC
- COB (Computed On Board) with formula evaluation
- Scheduling:
- Timestamp‑based time axis (primary)
- Rate‑based scheduling (fallback, 717‑compatible)
- DataFrame output with:
- time
- parameter_name
- value
- frame_index
- frame_id
- valid
pyarinc uses a unified Parameter class with explicit separation between
ARINC 717 and ARINC 767 semantics.
- Use word‑based indexing:
subframewordbit_offset
start_bitmust remain unset (None)- Decoded via
decode_from_frame() - Created using:
Parameter.from_717(
name="ALT",
bit_length=12,
data_type="BNR",
subframe=0,
word=2,
bit_offset=4,
)- Use absolute bit indexing:
start_bit(0‑based MSB‑first)
- Optional
frame_id_767for multi‑frame configurations - Decoded via
decode_raw_from_bytes() - Created using:
Parameter.from_767(
name="IAS",
bit_length=16,
data_type="BNR",
start_bit=48,
frame_id_767=3,
)This separation eliminates ambiguity and prevents accidental misdecoding.
The library parses PRM and VEC formats, including:
- subframe index
- word index
- bit offset
- bit length
- rate
- superframe index
- scale and offset
- start_bit (absolute bit index)
- frame_id_767
- bit length
- rate
- scale and offset
- COB formulas
Both JSON and text formats are supported.
The VEC parser supports a richer and more consistent token set across ARINC 717 and ARINC 767, improving configuration clarity while preserving full compatibility with existing decoders.
- Support for
TYPE=,SIGNED=,SCALE=,OFFSET= - Recognition of bare type tokens (
BNR,BCD,CHAR) - Parsing of
CONV=andOPT=(stored in mapping for future use) - No changes to the
Parameter.from_717API
- Support for bare type tokens (
BNR,BCD,CHAR) - Parsing of
SIGNED=,SCALE=,OFFSET= - Decimal
FID=supported; hexadecimalFID=0xNNignored - COB formulas stored without overriding the declared data type
- Absolute bit indexing (
start_bit = word * 32 + bit_offset) retained
- Unified token handling across 717/767
- Expanded test coverage for all supported tokens and legacy behaviors
- No changes to the public
ParameterAPI
Typical decoding flow:
- Load raw data (aligned, bitstream, or ARINC 767 frames)
- Convert bitstream to aligned frames if needed (717)
- Load PRM or VEC configuration
- Construct parameters using
from_717()orfrom_767() - Decode parameters using scheduling and superframe rules
- Produce a pandas DataFrame
This project is a clean rewrite inspired by the decoding logic in the original FlightDataDecode repository:
https://github.com/osnosn/FlightDataDecode
pyarinc re‑implements the core logic with a modern architecture, strict typing,
and full test coverage. No legacy scripts or .dat formats are included.
- No Lua integration
- No custom
.datformat - No print() statements — uses Python logging
- Fully typed (Python 3.12+)
- Deterministic, testable, modular design