mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
lib/sensor_calibration: BiasCorrectedSensorOffset() don't incorporate thermal offsets
- the thermal offsets are an optional correction applied to the raw data, so when updating an existing calibration offset with new learned bias we don't want this incorporated
This commit is contained in:
parent
e153d1defc
commit
661eb2adb4
@ -87,7 +87,8 @@ public:
|
||||
// Compute sensor offset from bias (board frame)
|
||||
matrix::Vector3f BiasCorrectedSensorOffset(const matrix::Vector3f &bias) const
|
||||
{
|
||||
return (_rotation.I() * bias).edivide(_scale) + _thermal_offset + _offset;
|
||||
// updated calibration offset = existing offset + bias rotated to sensor frame and unscaled
|
||||
return _offset + (_rotation.I() * bias).edivide(_scale);
|
||||
}
|
||||
|
||||
bool ParametersLoad();
|
||||
|
||||
@ -91,7 +91,8 @@ public:
|
||||
// Compute sensor offset from bias (board frame)
|
||||
matrix::Vector3f BiasCorrectedSensorOffset(const matrix::Vector3f &bias) const
|
||||
{
|
||||
return (_rotation.I() * bias) + _thermal_offset + _offset;
|
||||
// updated calibration offset = existing offset + bias rotated to sensor frame
|
||||
return _offset + (_rotation.I() * bias);
|
||||
}
|
||||
|
||||
bool ParametersLoad();
|
||||
|
||||
@ -89,7 +89,8 @@ public:
|
||||
// Compute sensor offset from bias (board frame)
|
||||
matrix::Vector3f BiasCorrectedSensorOffset(const matrix::Vector3f &bias) const
|
||||
{
|
||||
return _scale.I() * _rotation.I() * bias + _offset;
|
||||
// updated calibration offset = existing offset + bias rotated to sensor frame and unscaled
|
||||
return _offset + (_scale.I() * _rotation.I() * bias);
|
||||
}
|
||||
|
||||
bool ParametersLoad();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user