#include </home/runner/work/mars_lib/mars_lib/source/mars/include/mars/sensors/mag/mag_utils.h>
|
| MagnetometerInit ()=default |
|
void | AddElement (const Eigen::Vector3d &mag_vector, const Eigen::Vector3d &imu_linear_acc_vector) |
| AddElement Add magnetometer and imu measurement pairs to buffer IMU and Magnetometer vectors nee to be expressed in the IMU reference frame. More...
|
|
Eigen::Matrix3d | get_rot () const |
| get_rot Get the rotation matrix for the vector pairs in the buffer More...
|
|
Eigen::Quaterniond | get_quat () const |
| get_quat Same as 'get_rot' but as quaternion More...
|
|
int | get_size () const |
| get_size Get the current size of the buffer More...
|
|
void | set_done () |
| set_done Set if the rotation initialization was done More...
|
|
bool | IsDone () const |
| IsDone Check if the initialization was done. More...
|
|
void | Reset () |
| Reset Reset the initialization module. More...
|
|
MagImuData | get_vec_mean () const |
| get_vec_mean Get the mean of the Mag and IMU vectors in the measurement buffer More...
|
|
|
static Eigen::Vector3d | mag_var_ang_to_vec (const double &dec, const double &inc, const double &r=1) |
| mag_var_ang_to_vec Perform Spherical to Cartesian conversion for a vector in the GNSS world frame More...
|
|
◆ MagnetometerInit()
mars::MagnetometerInit::MagnetometerInit |
( |
| ) |
|
|
default |
◆ AddElement()
void mars::MagnetometerInit::AddElement |
( |
const Eigen::Vector3d & |
mag_vector, |
|
|
const Eigen::Vector3d & |
imu_linear_acc_vector |
|
) |
| |
AddElement Add magnetometer and imu measurement pairs to buffer IMU and Magnetometer vectors nee to be expressed in the IMU reference frame.
- Parameters
-
mag_vector | Magnetic vector expressed in the IMU frame |
imu_linear_acc_vector | Linear acceleration vector, assuming static conditions |
◆ get_rot()
Eigen::Matrix3d mars::MagnetometerInit::get_rot |
( |
| ) |
const |
get_rot Get the rotation matrix for the vector pairs in the buffer
- Returns
- Rotation of the IMU sensor w.r.t. the world frame
◆ get_quat()
Eigen::Quaterniond mars::MagnetometerInit::get_quat |
( |
| ) |
const |
get_quat Same as 'get_rot' but as quaternion
- Returns
- Rotation of the IMU sensor w.r.t. the world frame
◆ get_size()
int mars::MagnetometerInit::get_size |
( |
| ) |
const |
get_size Get the current size of the buffer
- Returns
- Size of the buffer
◆ set_done()
void mars::MagnetometerInit::set_done |
( |
| ) |
|
set_done Set if the rotation initialization was done
◆ IsDone()
bool mars::MagnetometerInit::IsDone |
( |
| ) |
const |
IsDone Check if the initialization was done.
- Returns
- True if initialization was done
◆ Reset()
void mars::MagnetometerInit::Reset |
( |
| ) |
|
Reset Reset the initialization module.
Reset 'isDone' and clear the buffer
◆ mag_var_ang_to_vec()
static Eigen::Vector3d mars::MagnetometerInit::mag_var_ang_to_vec |
( |
const double & |
dec, |
|
|
const double & |
inc, |
|
|
const double & |
r = 1 |
|
) |
| |
|
static |
mag_var_ang_to_vec Perform Spherical to Cartesian conversion for a vector in the GNSS world frame
The GNSS world frame is rotated -90deg w.r.t. the magnetic world frame.
- Parameters
-
dec | Declination or azimuth (in degree) of the magnetic field vector |
inc | Inclination or elevation (in degree) of the magnetic field vector |
r | magnitude of the magnetic field (defaults to 1) |
- Returns
- Carthesian vector
◆ get_vec_mean()
MagImuData mars::MagnetometerInit::get_vec_mean |
( |
| ) |
const |
get_vec_mean Get the mean of the Mag and IMU vectors in the measurement buffer
- Returns
- Return the mean as 'MagImuData' type
◆ rot_init_vec_
std::vector<MagImuData> mars::MagnetometerInit::rot_init_vec_ |
|
private |
rot_init_vec_ Measurement buffer
◆ once_
bool mars::MagnetometerInit::once_ { false } |
|
private |
once_ Indicate if the intialization was done
The documentation for this class was generated from the following file: