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§
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§
Constants§
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.