Skip to main content

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

Project description

ARINC-424

build benchmark

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

Requirements

  • Python >= 3.10

Installation

Install the latest release with:

pip install arinc424

or clone the repository and install the package from local source for an editable local version of the library.

cd /arinc424
python3 -m pip install -e .

Getting Started

Parsing a Record

# parse_example.py

import arinc424

arinc424.parse("SUSAP KSEAK1ASEA     110000119Y N47265700W122182910E019900429250SEA K11800018000CU00Y NAS    SEATTLE-TACOMA INTL           045698808")
foo@bar:~$ python3 parse_example.py

+---------------------------------+----------------------------------+--------------------------------+
| Field                           | Value                              | Decoded                      |
+---------------------------------+----------------------------------+--------------------------------+
| Record Type                     | 'S'                              | Standard                       |
| Customer / Area Code            | 'USA'                            | United States of America       |
| Section Code                    | 'PA'                             | Airport Reference Point        |
| Airport ICAO Identifier         | 'KSEA'                           | KSEA                           |
| ICAO Code                       | 'K1'                             | K1                             |
| ATA/IATA Designator             | 'SEA'                            | SEA                            |
| Continuation Record No          | '1'                              | Primary Record (with Cont.)    |
| Speed Limit Altitude            | '10000'                          | 10000 ft                       |
| Longest Runway                  | '119'                            | 11900 ft                       |
| IFR Capability                  | 'Y'                              | Official                       |
| Longest Runway Surface Code     | ' '                              |                                |
| Airport Reference Pt. Latitude  | 'N47265700'                      | N47265700                      |
| Airport Reference Pt. Longitude | 'W122182910'                     | W122182910                     |
| Magnetic Variation              | 'E0199'                          | 199 E                          |
| Airport Elevation               | '00429'                          | 00429                          |
| Speed Limit                     | '250'                            | 250 knots (IAS)                |
| Recommended Navaid              | 'SEA '                           | SEA                            |
| ICAO Code (2)                   | 'K1'                             | K1                             |
| Transition Altitude             | '18000'                          | 18000 ft                       |
| Transition Level                | '18000'                          | 18000 ft                       |
| Public Military Indicator       | 'C'                              | Public / Civil                 |
| Time Zone                       | 'U00'                            | GMT +8:00                      |
| Daylight Indicator              | 'Y'                              | Yes                            |
| Magnetic/True Indicator         | ' '                              |                                |
| Datum Code                      | 'NAS'                            | NAS                            |
| Airport Name                    | 'SEATTLE-TACOMA INTL           ' | SEATTLE-TACOMA INTL            |
| File Record No                  | '04569'                          | 04569                          |
| Cycle Date                      | '8808'                           | 1988, Release 08               |
+---------------------------------+----------------------------------+--------------------------------+

Parsing a File

This function calls arinc424.parse() for every line of a given file.

path = 'path/to/arinc424_file'
arinc424.read_file(path)

The Record Class

The examples in the Getting Started section utilise the arinc424.parse() function. Under the hood this function is creating a Record object, populating the fields of the record object with data from the provided record, and then calling the decode() function. This can also be done manually.

Reading a Record

import arinc424

record = arinc424.Record()
record.read("SUSAP KSEAK1ASEA     110000119Y N47265700W122182910E019900429250SEA K11800018000CU00Y NAS    SEATTLE-TACOMA INTL           045698808")
record.decode() # returns decocded record in a table as a string. Prints the table to console by default, output=False to stop this.

Writing a Record to a File

In addition to printing to the console, decode() will return a string which can be written to a file.

f = open("output.txt", "w")

# writes the record as plaintext
f.write(record.decode())

# writes the record in JSON format
f.write(record.json())

Helper Functions

# True if primary record, otherwise False
record.primary()

# True if record is primary record with at least one continuation record to follow, otherwise False
record.hasCont()

#NOTE: both of these functions will return False if the record object has not been initialised with ARINC-424 data

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.3.0.tar.gz (82.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arinc424-0.3.0-py3-none-any.whl (59.4 kB view details)

Uploaded Python 3

File details

Details for the file arinc424-0.3.0.tar.gz.

File metadata

  • Download URL: arinc424-0.3.0.tar.gz
  • Upload date:
  • Size: 82.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arinc424-0.3.0.tar.gz
Algorithm Hash digest
SHA256 088dccf960cb75446630052b030aec7ec914b4426824ff21e0ecd5444d1e90d6
MD5 57ad7ae767531ed23161e160de56323b
BLAKE2b-256 215a15442022a381951ac4bea5901248c6a24ede60abc718a8dc5c5b28f8c418

See more details on using hashes here.

Provenance

The following attestation bundles were made for arinc424-0.3.0.tar.gz:

Publisher: create-and-publish-release.yml on jack-laverty/arinc424

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arinc424-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: arinc424-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 59.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arinc424-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84da6140195fbd9eaed96ec0f453b0711f9573820098c53a2e108abafa953fc6
MD5 4e8a35b5ddb78f0674d028658c3fb143
BLAKE2b-256 5d7e2752f8c65aeff67c35ddecdcb7a4e81ddcf13462db92570f454f6ea10912

See more details on using hashes here.

Provenance

The following attestation bundles were made for arinc424-0.3.0-py3-none-any.whl:

Publisher: create-and-publish-release.yml on jack-laverty/arinc424

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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