mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 09:00:35 +08:00
ekf2: GNSS yaw, use reported yaw accuracy when available
This commit is contained in:
@@ -173,6 +173,13 @@ void EstimatorInterface::setGpsData(const gpsMessage &gps)
|
||||
_gps_yaw_offset = 0.0f;
|
||||
}
|
||||
|
||||
if (PX4_ISFINITE(gps.yaw_accuracy)) {
|
||||
gps_sample_new.yaw_acc = gps.yaw_accuracy;
|
||||
|
||||
} else {
|
||||
gps_sample_new.yaw_acc = 0.f;
|
||||
}
|
||||
|
||||
// Only calculate the relative position if the WGS-84 location of the origin is set
|
||||
if (collect_gps(gps)) {
|
||||
gps_sample_new.pos = _pos_ref.project((gps.lat / 1.0e7), (gps.lon / 1.0e7));
|
||||
|
||||
Reference in New Issue
Block a user