Skip to main content

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

Project description

ARINC-424

build

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

Requirements

  • Python >= 3.10

Installation

pip install arinc424

Getting Started

Reading a record

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

import arinc424.record as arinc424

record = arinc424.Record()
record.read(line)

Viewing a record

After reading a record, dump() will print the record to the console.

record.dump()
foo@bar:~$ python3 dump_example.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.

record.decode()
foo@bar:~$ python3 decode_example.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())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arinc424-0.1.0.tar.gz (32.4 MB view hashes)

Uploaded Source

Built Distribution

arinc424-0.1.0-py3-none-any.whl (33.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page