Skip to content

Commit

Permalink
Update src/modules/ekf2/EKF2.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Mathieu Bresciani <[email protected]>
  • Loading branch information
dirksavage88 and bresch authored Nov 5, 2024
1 parent 116711d commit 1b2a27b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/ekf2/EKF2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,7 @@ void EKF2::UpdateGpsSample(ekf2_timestamps_s &ekf2_timestamps)
if (fabsf(_param_ekf2_gps_yaw_off.get()) > 0.f) {
if (!PX4_ISFINITE(vehicle_gps_position.heading_offset) && PX4_ISFINITE(vehicle_gps_position.heading)) {
// Apply offset
float raw_yaw_offset = matrix::wrap_pi(_param_ekf2_gps_yaw_off.get());
float raw_yaw_offset = matrix::wrap_pi(math::radians(_param_ekf2_gps_yaw_off.get()));
vehicle_gps_position.heading_offset = raw_yaw_offset;
vehicle_gps_position.heading -= raw_yaw_offset;
}
Expand Down

0 comments on commit 1b2a27b

Please sign in to comment.