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, ARINC 647A (FRED) XML support, 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.
pip install .
pip install -e .
pip install -e .[io]
pip install -e .[dev]
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 and ARINC 647A FRED XML 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
- Raw‑byte convenience decoding via
decode_raw_bytes() - Word‑based parameter indexing:
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/FRED‑based configuration
- Raw‑byte convenience decoding via
decode_raw_bytes() - File-streaming support for multi-gigabyte logs via
iter_frames_from_file()(chunk-by-chunk processing with memory efficiency) - Diagnostic telemetry reporting via
parse_with_stats()andArinc767ParseResult(tracking valid counts, gaps, total gap bytes, and trailer mismatches) - Robust stream controls:
strictmode parsing (rejecting invalid lengths or trailer mismatches)max_gapthreshold enforcementmax_framessafety limits
- Full data‑type support:
- BNR (signed/unsigned)
- BCD
- DISCRETE
- PACKED BITS
- CHAR / ASCII
- UTC
- COB (Computed On Board)
- Scheduling:
- Timestamp‑based time axis (primary)
- Rate‑based scheduling (fallback, 717‑compatible)
- DataFrame output with:
timeparameter_namevalueframe_indexframe_idvalid
pyarinc uses a unified Parameter class with explicit separation between ARINC 717 and ARINC 767 semantics.
- Word‑based indexing:
subframewordbit_offset
start_bitmust remain unset (None)
Parameter(
name="ALT",
subframe=0,
word=2,
bit_offset=4,
bit_length=12,
data_type="BNR",
rate=16,
)- Absolute bit indexing (
start_bit) - Optional
frame_id_767for multi‑frame configurations - Decoded via
decode_raw_from_bytes()
Parameter.from_767(
name="IAS",
bit_length=16,
data_type="BNR",
start_bit=48,
frame_id_767=3,
)- subframe index
- word index
- bit offset
- bit length
- rate
- superframe index
- scale and offset
start_bitframe_id_767- bit length
- rate
- scale and offset
- COB formulas
- Schema-agnostic element discovery for Flight Recorder Electronic Documentation
- Parent-child metadata fallback and subparameter unit inheritance
- Strict, warning, and lenient validation modes (
StrictMode) viaFredXmlParser - Automated extraction and mapping into core library parameter models
Both JSON, text, VEC/PRM, and FRED XML formats are supported.
TYPE=,SIGNED=,SCALE=,OFFSET=- Bare type tokens (
BNR,BCD,CHAR) CONV=andOPT=tokens retained for future use
- Bare type tokens
SIGNED=,SCALE=,OFFSET=- Decimal
FID=supported - COB formulas stored without overriding declared type
- Absolute bit indexing preserved
- Unified token handling across 717/767
- Expanded test coverage
- No changes to the public
ParameterAPI
- Load raw data (aligned, bitstream, or ARINC 767 frames)
- Convert bitstream → aligned frames if needed (717)
- Load PRM, VEC, or ARINC 647A FRED XML configurations
- Construct parameters using word indexing (717) or
from_767()(767) - Decode using scheduling and superframe rules
- Export DataFrame to CSV or Parquet
Reference examples:
examples/process_flight_717.py(ARINC 717 Single Processing)examples/process_flight_717_batch.py(ARINC 717 Batch Processing)examples/process_flight_767.py(ARINC 767 Processing)examples/analyze_flight.py(Telemetry Analysis and Plotting)examples/parse_fred_example.py(ARINC 647A FRED XML Parsing)
This project is a clean rewrite inspired by:
https://github.com/osnosn/FlightDataDecode
pyarinc re‑implements the core logic with a modern architecture, strict typing, and full test coverage.
- No Lua integration
- No legacy
.datformats - No
print()statements — uses Python logging - Fully typed (Python 3.12+)
- Deterministic, testable, modular design