mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 15:53:56 -04:00
AP_NavEKF3: ensure extnav angle error is at least 5deg
This commit is contained in:
parent
e9b939ccb5
commit
45e6896d95
@ -978,7 +978,10 @@ void NavEKF3_core::writeExtNavData(const Vector3f &pos, const Quaternion &quat,
|
||||
// extract yaw from the attitude
|
||||
float roll_rad, pitch_rad, yaw_rad;
|
||||
quat.to_euler(roll_rad, pitch_rad, yaw_rad);
|
||||
writeEulerYawAngle(yaw_rad, angErr, timeStamp_ms, 2);
|
||||
|
||||
// ensure yaw accuracy is no better than 5 degrees (some callers may send zero)
|
||||
const float yaw_accuracy_rad = MAX(angErr, radians(5.0f));
|
||||
writeEulerYawAngle(yaw_rad, yaw_accuracy_rad, timeStamp_ms, 2);
|
||||
|
||||
storedExtNav.push(extNavDataNew);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user