PER Firmware
Loading...
Searching...
No Matches
imu.c File Reference

IMU calibration and coordinate transformations. More...

#include "can_library/generated/TORQUE_VECTOR.h"
#include "common/utils/linear_algebra.h"
#include "sensors.h"
#include "common/utils/units.h"
#include "common/utils/clamp.h"

Enumerations

enum  decoupling_state_t { DECOUPLING_STATE_IDLE , DECOUPLING_STATE_CALIBRATING , DECOUPLING_STATE_ACTIVE }
 

Functions

void initialize_calibration (void)
 Initialize the IMU decoupling calibration data structures and state.
 
void IZZE_angular_rate_CALLBACK (void)
 Finalize the IMU decoupling calibration by deriving the rotation matrix from the accumulated accelerometer data.
 
void IZZE_acceleration_CALLBACK (void)
 Callback function for handling IZZE acceleration data.
 

Variables

imu_data_t imu_data = {0}
 

Detailed Description

IMU calibration and coordinate transformations.

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ IZZE_acceleration_CALLBACK()

void IZZE_acceleration_CALLBACK ( void )

Callback function for handling IZZE acceleration data.

In calibration mode, accumulates the raw acceleration data to derive the calibration rotation. In active mode, applies the decoupling rotation to the raw acceleration data and sends it out as IMU acceleration.

◆ IZZE_angular_rate_CALLBACK()

void IZZE_angular_rate_CALLBACK ( void )

Finalize the IMU decoupling calibration by deriving the rotation matrix from the accumulated accelerometer data.

Callback function for handling IZZE angular rate data.

In active mode, applies the decoupling rotation to the raw angular rate data and sends it out as IMU angular rate.