mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-13 17:20:09 +00:00
t/calib: Add IMU intrinsics struct
This commit is contained in:
parent
05b8e320a5
commit
02abc49313
src/xrt/auxiliary/tracking
|
@ -356,3 +356,25 @@ t_calibration_gui_params_load_or_default(struct t_calibration_params *p)
|
|||
t_calibration_gui_params_parse_from_json(scene, p);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
t_inertial_calibration_dump(struct t_inertial_calibration *c)
|
||||
{
|
||||
U_LOG_RAW("t_inertial_calibration {");
|
||||
dump_mat("transform", c->transform);
|
||||
dump_vector("offset", c->offset);
|
||||
dump_vector("bias_std", c->bias_std);
|
||||
dump_vector("noise_std", c->noise_std);
|
||||
U_LOG_RAW("}");
|
||||
}
|
||||
|
||||
void
|
||||
t_imu_calibration_dump(struct t_imu_calibration *c)
|
||||
{
|
||||
U_LOG_RAW("t_imu_calibration {");
|
||||
U_LOG_RAW("accel = ");
|
||||
t_inertial_calibration_dump(&c->accel);
|
||||
U_LOG_RAW("gyro = ");
|
||||
t_inertial_calibration_dump(&c->gyro);
|
||||
U_LOG_RAW("}");
|
||||
}
|
||||
|
|
|
@ -215,6 +215,59 @@ bool
|
|||
t_stereo_camera_calibration_save(const char *calib_path, struct t_stereo_camera_calibration *data);
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* IMU calibration data.
|
||||
*
|
||||
*/
|
||||
|
||||
/*!
|
||||
* @brief Parameters for accelerometer and gyroscope calibration.
|
||||
* @see slam_tracker::imu_calibration for a more detailed description and references.
|
||||
*/
|
||||
struct t_inertial_calibration
|
||||
{
|
||||
//! Linear transformation for raw measurements alignment and scaling.
|
||||
double transform[3][3];
|
||||
|
||||
//! Offset to apply to raw measurements.
|
||||
double offset[3];
|
||||
|
||||
//! Modeled sensor bias. @see slam_tracker::imu_calibration.
|
||||
double bias_std[3];
|
||||
|
||||
//! Modeled measurement noise. @see slam_tracker::imu_calibration.
|
||||
double noise_std[3];
|
||||
};
|
||||
|
||||
/*!
|
||||
* @brief Combined IMU calibration data.
|
||||
*/
|
||||
struct t_imu_calibration
|
||||
{
|
||||
//! Accelerometer calibration data.
|
||||
struct t_inertial_calibration accel;
|
||||
|
||||
//! Gyroscope calibration data.
|
||||
struct t_inertial_calibration gyro;
|
||||
};
|
||||
/*!
|
||||
* Prints a @ref t_inertial_calibration struct
|
||||
*
|
||||
* @relates t_camera_calibration
|
||||
*/
|
||||
void
|
||||
t_inertial_calibration_dump(struct t_inertial_calibration *c);
|
||||
|
||||
/*!
|
||||
* Small helper function that dumps the imu calibration data to logging.
|
||||
*
|
||||
* @relates t_camera_calibration
|
||||
*/
|
||||
void
|
||||
t_imu_calibration_dump(struct t_imu_calibration *c);
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Conversion functions.
|
||||
|
|
Loading…
Reference in a new issue