AP_WheelEncoder: Wheel encoder's offsets are properly propagated to EKF3.

This commit is contained in:
Pavlo Kolomiiets
2019-01-23 17:01:13 +09:00
committed by Randy Mackay
parent 753f360d06
commit 2c909cf83b
3 changed files with 7 additions and 6 deletions
@@ -224,12 +224,12 @@ float AP_WheelEncoder::get_wheel_radius(uint8_t instance) const
return _wheel_radius[instance];
}
// get the total distance travelled in meters
Vector3f AP_WheelEncoder::get_position(uint8_t instance) const
// return a 3D vector defining the position offset of the center of the wheel in meters relative to the body frame origin
const Vector3f &AP_WheelEncoder::get_pos_offset(uint8_t instance) const
{
// for invalid instances return zero vector
if (instance >= WHEELENCODER_MAX_INSTANCES) {
return Vector3f();
return pos_offset_zero;
}
return _pos_offset[instance];
}