Skip to content

andrewda/arinc424

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

127 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARINC-424

build

A python library for parsing and decoding ARINC-424, the international standard file format for aircraft navigation data.

Installation

  • 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)

Getting Started

Importing the library

import arinc424.record as a424

Reading a record

Create a record object. Use the read() method to read an ARINC-424 record in string format.

record = a424.Record()
result = record.read(line)

Viewing a record

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                : 8704

Decoding a record

Similar 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, April

Writing a record to a file

In 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())

Contribution

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!

About

A library for ARINC-424, the international standard file format for aircraft navigation data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%