cal: transpose rotation instead of computing inverse

This is equivalent for an orthonormal matrix
This commit is contained in:
bresch
2025-04-29 10:26:51 +02:00
committed by Mathieu Bresciani
parent 03c7e7aa08
commit b5f011a31f
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ public:
matrix::Vector3f BiasCorrectedSensorOffset(const matrix::Vector3f &bias) const
{
// updated calibration offset = existing offset + bias rotated to sensor frame and unscaled
return _offset + (_rotation.I() * bias).edivide(_scale);
return _offset + (_rotation.T() * bias).edivide(_scale);
}
bool ParametersLoad();
+2 -2
View File
@@ -85,14 +85,14 @@ public:
inline matrix::Vector3f Uncorrect(const matrix::Vector3f &corrected_data) const
{
return (_rotation.I() * corrected_data) + _thermal_offset + _offset;
return (_rotation.T() * corrected_data) + _thermal_offset + _offset;
}
// Compute sensor offset from bias (board frame)
matrix::Vector3f BiasCorrectedSensorOffset(const matrix::Vector3f &bias) const
{
// updated calibration offset = existing offset + bias rotated to sensor frame
return _offset + (_rotation.I() * bias);
return _offset + (_rotation.T() * bias);
}
bool ParametersLoad();
+1 -1
View File
@@ -104,7 +104,7 @@ public:
matrix::Vector3f BiasCorrectedSensorOffset(const matrix::Vector3f &bias) const
{
// updated calibration offset = existing offset + bias rotated to sensor frame and unscaled
return _offset + (_scale.I() * _rotation.I() * bias);
return _offset + (_scale.I() * _rotation.T() * bias);
}
bool ParametersLoad();