Skip to main content

Crate ahrs2

Crate ahrs2 

Source
Expand description

This module contains code for determing attitude and heading, as well a sensor fusion with locaiton.

To determine attitude, it fuses acceleeration, gyro, and mag data, 3D each.

Conventions We define +X to be right, +Y to be forward and +Z to be u. We use the right hand rule for rotations along these axes.

Magnetic inclination chart: https://upload.wikimedia.org/wikipedia/commons/d/de/World_Magnetic_Inclination_2015.pdf https://www.magnetic-declination.com/

Re-exports§

pub use crate::attitude::Ahrs;
pub use crate::params::Params;

Modules§

attitude
Calculate attitude gven a 9-axis IMU.
params
This module contains code that stores and updates flight parameters: Attitude, angular rates, altitude etc.
ppks
Present-position keeping system. Fuses GPS, and dead-reckoning.

Structs§

Fix
In a format conducive to being parsed from the UBX PVT. (UBX-NAV-PVT) Note: For position and elevation, we use the same units as Ublox reports; we can convert to floats as required downstream.
ImuReadings
Represents sensor readings from a 6-axis accelerometer + gyro. Accelerometer readings are in m/2^2. Gyroscope readings are in radians/s.

Enums§

CalResult
DeviceOrientation
FixType

Constants§

DEG_SCALE_1E8
FORWARD
G
RIGHT
UP

Functions§

cal_accel
Utility function to be called from firmware; designed to be run from a main loop or similar function.
interpret_accel_or_gyro
Convert raw accelerometer or gyro readings to their value in SI units, floating point. Output: m/s^2 for accelerometer; rad/s for gyro.
print_quat
Utility function to print a quaternion by axes.