[][src]Struct mai400_api::RotatingTelemetry

pub struct RotatingTelemetry {
    pub b_field_igrf: [f32; 3],
    pub sun_vec_eph: [f32; 3],
    pub sc_pos_eci: [f32; 3],
    pub sc_vel_eci: [f32; 3],
    pub kepler_elem: KeplerElem,
    pub k_bdot: [f32; 3],
    pub kp: [f32; 3],
    pub kd: [f32; 3],
    pub k_unload: [f32; 3],
    pub css_bias: [i16; 6],
    pub mag_bias: [i16; 3],
    pub rws_volt: i16,
    pub rws_press: i16,
    pub att_det_mode: u8,
    pub rws_reset_cntr: [u8; 3],
    pub sun_mag_aligned: u8,
    pub minor_version: u8,
    pub mai_sn: u8,
    pub orbit_prop_mode: u8,
    pub acs_op_mode: u8,
    pub proc_reset_cntr: u8,
    pub major_version: u8,
    pub ads_op_mode: u8,
    pub css_gain: [f32; 6],
    pub mag_gain: [f32; 3],
    pub orbit_epoch: u32,
    pub true_anomoly_epoch: f32,
    pub orbit_epoch_next: u32,
    pub sc_pos_eci_epoch: [f32; 3],
    pub sc_vel_eci_epoch: [f32; 3],
    pub qb_x_wheel_speed: i16,
    pub qb_x_filter_gain: f32,
    pub qb_x_dipole_gain: f32,
    pub dipole_gain: [f32; 3],
    pub wheel_speed_bias: [i16; 3],
    pub cos_sun_mag_align_thresh: f32,
    pub unload_ang_thresh: f32,
    pub q_sat: f32,
    pub rwa_trq_max: f32,
    pub rws_motor_current: [u16; 3],
    pub rws_motor_temp: i16,

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


b_field_igrf: [f32; 3]

IGRF magnetic fields (X, Y, Z) (Tesla)

sun_vec_eph: [f32; 3]

ECI Sun Vector from Ephemeris (X, Y, Z) (Unit)

sc_pos_eci: [f32; 3]

ECI Spacecraft Position (X, Y, Z) (km)

sc_vel_eci: [f32; 3]

ECI Spacecraft Velocity (X, Y, Z) (km)

kepler_elem: KeplerElem

Keplerian elements

k_bdot: [f32; 3]

Bdot Gain Acquisition Mode (X, Y, Z)

kp: [f32; 3]

Proportional Gain Normal Mode (X, Y, Z)

kd: [f32; 3]

Derivative Gain Normal Mode (X, Y, Z)

k_unload: [f32; 3]

Unloading Gain Normal Mode (X, Y, Z)

css_bias: [i16; 6]

CSS{n} Bias (1, 2, 3, 4, 5, 6)

mag_bias: [i16; 3]

MAG Bias (X, Y, Z)

rws_volt: i16

RWS Bus Voltage (0.00483516483 v/lsb)

rws_press: i16


att_det_mode: u8

Attitude Determination Mode

rws_reset_cntr: [u8; 3]

RWS Reset Counter (X, Y, Z)

sun_mag_aligned: u8

Sun and Mag Field are aligned

minor_version: u8

Software Minor Version

mai_sn: u8

Software Unit Serial Number

orbit_prop_mode: u8

Orbit Propagation Mode

acs_op_mode: u8

ACS Mode in Operation

proc_reset_cntr: u8

ADACS Processor Reset Counter

major_version: u8

Software Major Version

ads_op_mode: u8

ADS Mode in Operation

css_gain: [f32; 6]

CSS{n} Gain (1, 2, 3, 4, 5, 6)

mag_gain: [f32; 3]

Mag Gain (X, Y, Z)

orbit_epoch: u32

Epoch of Current Orbit (GPS sec)

true_anomoly_epoch: f32

True Anomaly at Epoch – Kepler (deg)

orbit_epoch_next: u32

Epoch of Next Updated RV (GPS sec)

sc_pos_eci_epoch: [f32; 3]

ECI Position at Next Epoch (X, Y, Z) (km)

sc_vel_eci_epoch: [f32; 3]

ECI Velocity at Next Epoch (X, Y, Z) (km/sec)

qb_x_wheel_speed: i16

QbX Wheel Speed Command (rpm)

qb_x_filter_gain: f32

QbX Filter Gain

qb_x_dipole_gain: f32

QbX Dipole Gain

dipole_gain: [f32; 3]

Dipole Gain (X, Y, Z)

wheel_speed_bias: [i16; 3]

Wheel Speed Bias (X, Y, Z) (rpm)

cos_sun_mag_align_thresh: f32

Cosine of Sun/Mag Align Threshold Angle

unload_ang_thresh: f32

Max AngleToGo for Unloading (rad)

q_sat: f32

Quaternion feedback saturation.

rwa_trq_max: f32

Maximum RWA Torque (mNm)

rws_motor_current: [u16; 3]

Reaction Wheel Motor Current (X, Y, Z) (A) (0.0003663003663 A/lsb)

rws_motor_temp: i16

RWS Motor Temperature (Temperature oC = rwsMotorTemp * 0.0402930 - 50)


impl RotatingTelemetry[src]

pub fn update(&mut self, msg: &StandardTelemetry)[src]

Extract the self variables from a standard telemetry message and update the appropriate corresponding fields in a selfTelemetry structure


  • msg - Standard telemetry message to extract variables from
  • self - self variables structure to copy extracted data into


If errors are encountered, the structure will not be updated


let mai = MAI400::new("/dev/ttyS5")?;

let mut rotating = RotatingTelemetry::default();

let (std, _imu, _irehs) = mai.get_message()?;
if std.is_some() {

Trait Implementations

impl Default for RotatingTelemetry[src]

impl Clone for RotatingTelemetry[src]

impl PartialEq<RotatingTelemetry> for RotatingTelemetry[src]

impl Debug for RotatingTelemetry[src]

Auto Trait Implementations

impl Send for RotatingTelemetry

impl Unpin for RotatingTelemetry

impl Sync for RotatingTelemetry

impl UnwindSafe for RotatingTelemetry

impl RefUnwindSafe for RotatingTelemetry

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized