Crate arinc429

Crate arinc429 

Source
Expand description

§arinc429

A Rust library for the ARINC 429 avionics data bus protocol.

Provides full support for:

  • Encoding and decoding 32-bit ARINC 429 words
  • Label bit reversal and odd parity
  • Octal label parsing (e.g., "012", "203")
  • BNR (Binary) physical value interpretation with signed/unsigned handling
  • BCD date (label 260) and UTC time (label 150) decoding
  • SSM (Sign/Status Matrix) interpretation
  • Common flight parameters (ground speed, altitude, Mach, TAT, roll angle, etc.)

§Features

  • Pure Rust, no_std compatible (with minor changes)
  • Comprehensive error handling via thiserror
  • Well-tested with unit tests and cross-validation
  • Ready for integration with flight simulators (JSBSim, FlightGear) or real hardware

§Example

use arinc429::{encode, decode, Label};

// Encode Ground Speed = 250 knots (label 012)
let word = encode(Label::GroundSpeed.raw(), 0, 2000, 3).unwrap(); // 2000 * 0.125 = 250
assert_eq!(format!("{:08X}", word), "E01F4050");

// Decode it back
let decoded = decode(word).unwrap();
assert_eq!(decoded.label, Label::GroundSpeed);
assert_eq!(decoded.to_physical(), Some(250.0));

Structs§

ArincWord
A fully decoded ARINC 429 word.

Enums§

ArincError
Errors that can occur during ARINC 429 operations.
Label
Known ARINC 429 parameter labels supported by this crate.
Ssm
Sign/Status Matrix (SSM) values as defined in ARINC 429.

Functions§

decode
Decode a 32-bit ARINC 429 word.
encode
Encode an ARINC 429 word.