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

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

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

Uploaded Source

Built Distribution

arinc424-0.2.1-py3-none-any.whl (58.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: arinc424-0.2.1.tar.gz
  • Upload date:
  • Size: 67.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for arinc424-0.2.1.tar.gz
Algorithm Hash digest
SHA256 39da2d00ab0e3245da389f56399c9f1d24c5047d9363d45c9219880cdfd6861c
MD5 7e3ba9dff1e7367d9da0acfae0187ade
BLAKE2b-256 759acd22a0ec6cd66d6d8a0f63afd465139a44fe4db982e1275ccccc5465bbb5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: arinc424-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 58.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for arinc424-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 880a6306085dae0ea27f67f347a9f87905205703c1bbe4b0ecf7ccbc56679979
MD5 0ed7a1cd877e71f7cba122e87d5b4839
BLAKE2b-256 5be1b6ae517f293e5c7481040bf2e06d3efc7060d54a2b444094e6e60feb80dc

See more details on using hashes here.

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