mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-19 13:18:32 +00:00
t_imu_fusion: Add capability to get world non-gravity acceleration
This commit is contained in:
parent
21352ca338
commit
2823193302
|
@ -167,6 +167,18 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Use this to obtain the residual, world-space acceleration not
|
||||||
|
* associated with gravity, after incorporating a measurement.
|
||||||
|
*/
|
||||||
|
Eigen::Vector3d
|
||||||
|
getCorrectedWorldAccel(Eigen::Vector3d const &accel) const
|
||||||
|
{
|
||||||
|
Eigen::Vector3d adjusted_accel = accel * getAccelScaleFactor();
|
||||||
|
return (quat_ * adjusted_accel) -
|
||||||
|
(Eigen::Vector3d::UnitY() * MATH_GRAVITY_M_S2);
|
||||||
|
}
|
||||||
|
|
||||||
Eigen::Matrix3d
|
Eigen::Matrix3d
|
||||||
getRotationMatrix() const
|
getRotationMatrix() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue