[][src]Crate mai400_api

Kubos API for interacting with Adcole Maryland Aerospace MAI-400 ADACS

All work is done against an instantiated MAI400 struct.

Examples

use mai400_api::*;

// Create a new MAI connection
let mai = MAI400::new("/dev/ttyS5")?;

// Set the GPS time to Jan 01, 2018
mai.set_gps_time(1198800018)?;

// Pull the updated time out of the next standard telemetry message
let (std, _imu, _irehs) = mai.get_message()?;

if let Some(telem) = std {
    println!("Current GPS time: {}", telem.gps_time);
}

Modules

irehs

Module for receiving and processing the IREHS telemetry message

mock

Mock objects for use with unit tests

raw_imu

Module for receiving and processing the raw IMU telemetry message

rotating

Module for extracting and saving the rotating variables from the standard telemetry messages

std_telem

Module for receiving and processing the standard telemetry message

Structs

Connection

Wrapper for UART stream

IREHSTelemetry

IR Earth Horizon Sensor telemetry data

KeplerElem

Structure for keplarian elements returned in the standard telemetry message

MAI400

Structure for MAI-400 device instance

RawIMU

Raw accelerometer and gyroscope data

RotatingTelemetry

Structure to contain all possible variables which can be returned by the standard telemetry message's rotating_variable fields

StandardTelemetry

Standard telemetry packet sent by the MAI-400 every 250ms

ThermopileFlags

Thermopile error flags

Enums

MAIError

Common Error for MAI Actions

UartError

Custom errors for UART actions

Constants

AUX_SYNC

Sync word for raw IMU and IREHS telemetry packets

Type Definitions

MAIResult

Custom error type for MAI400 operations.