A python library for parsing and decoding ARINC-424, the international standard file format for aircraft navigation data.
- Python 3.10 or greater
- Clone the repository
- Install the package from local source (no official package released until the work is finished to some degree)
import arinc424.record as a424Create a record object. Use the read() method to read an ARINC-424 record in string format.
record = a424.Record()
result = record.read(line)After reading a record, dump() will print the record to the console.
if result == a424.ERR_NONE:
record.dump()foo@bar:~$ python3 dump.py
Record Type : S
Customer / Area Code : USA
Section Code : ER
.
.
.
Cycle Date : 8704Similar to dump(), but each value in the key-value pair is decoded to be human readable without referencing the ARINC-424 spec.
if result == a424.ERR_NONE:
record.decode()foo@bar:~$ python3 decode.py
Record Type : Standard Record
Customer / Area Code : United States of America
Section Code : Airways and Routes
.
.
.
Cycle Date : 1987, AprilIn addition to printing to the console, dump() and decode() will return strings which can be written to files.
- decoded - the most human readable format
- JSON (single line) - useful for importing the records to a database
- raw data - the unmodified string from which the record object was created
f = open("output.txt", "w")
# writes the fields as they are
f.write(record.dump())
# writes the record in single-line JSON format
f.write(record.json())More examples of ARINC-424 records will always be useful. The small set of examples kept in /data are limited, despite
being critical for testing. Feel free to add more examples to the /data folder, or send them to me directly. Thanks!