MAV'RIC
|
#include <ahrs_ekf.hpp>
Classes | |
struct | conf_t |
The AHRS EKF config structure. More... | |
Public Member Functions | |
AHRS_ekf (const Imu &imu, const AHRS_ekf::conf_t config=default_config()) | |
AHRS EKF controller. | |
bool | update (void) |
Performs the EKF algorithm. | |
void | calibrating_north_vector (void) |
Performs the north vector calibration. | |
float | last_update_s (void) const |
Last update in seconds. | |
bool | is_healthy (void) const |
Indicates which estimate can be trusted. | |
quat_t | attitude (void) const |
Estimated attitude. | |
std::array< float, 3 > | angular_speed (void) const |
Estimated angular velocity. | |
std::array< float, 3 > | linear_acceleration (void) const |
Estimated linear acceleration. | |
Static Public Member Functions | |
static AHRS_ekf::conf_t | default_config () |
Default configuration structure. | |
Public Attributes | |
conf_t | config_ |
The config structure for the EKF module. | |
Protected Member Functions | |
void | init_kalman (void) |
Initialize the state and matrix of the EKF. | |
void | predict_step (void) |
Performs the prediction step of the EKF. | |
void | update_step_acc (void) |
Performs the update step with the accelerometer. | |
void | update_step_mag (void) |
Performs the update step with the magnetometer. | |
Protected Attributes | |
const Imu & | imu_ |
The Reference to the IMU structure. | |
quat_t | attitude_ |
Estimated attitude. | |
std::array< float, 3 > | angular_speed_ |
Estimated angular speed. | |
std::array< float, 3 > | linear_acc_ |
Estimated linear acceleration. | |
ahrs_state_t | internal_state_ |
Mat< 3, 3 > | R_acc_ |
The accelerometer measruement noise matrix. | |
Mat< 3, 3 > | R_acc_norm_ |
The additonal accelerometer measurement noise matrix when acceleration norm is different from 1.0g. | |
Mat< 3, 3 > | R_mag_ |
The magnetometer measurement noise matrix. | |
float | dt_s_ |
Time interval since last update in seconds. | |
float | last_update_s_ |
Last update time in seconds. |
The AHRS EKF class.
AHRS_ekf::AHRS_ekf | ( | const Imu & | imu, |
const AHRS_ekf::conf_t | config = default_config() |
||
) |
AHRS EKF controller.
imu | IMU structure (input) |
config | Configuration structure |
std::array< float, 3 > AHRS_ekf::angular_speed | ( | void | ) | const [virtual] |
quat_t AHRS_ekf::attitude | ( | void | ) | const [virtual] |
bool AHRS_ekf::is_healthy | ( | void | ) | const [virtual] |
Indicates which estimate can be trusted.
type | Type of estimate |
Implements AHRS.
float AHRS_ekf::last_update_s | ( | void | ) | const [virtual] |
std::array< float, 3 > AHRS_ekf::linear_acceleration | ( | void | ) | const [virtual] |
bool AHRS_ekf::update | ( | void | ) | [virtual] |
Performs the EKF algorithm.
Implements AHRS.