Skip to content

Commit

Permalink
ekf2: only populate gnss pos aid src status if ref initialized
Browse files Browse the repository at this point in the history
- this is a minor logging improvement when plotting the position from the beginning of the log (often a replay session)
  • Loading branch information
dagar authored Feb 15, 2024
1 parent 84a7d42 commit 8dc3975
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/ekf2/EKF/gps_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ void Ekf::controlGpsFusion(const imuSample &imu_delayed)
}
}

if (_pos_ref.isInitialized()) {
updateGnssPos(gnss_sample, _aid_src_gnss_pos);
}

updateGnssVel(gnss_sample, _aid_src_gnss_vel);
updateGnssPos(gnss_sample, _aid_src_gnss_pos);

} else if (_control_status.flags.gps) {
if (!isNewestSampleRecent(_time_last_gps_buffer_push, _params.reset_timeout_max)) {
Expand Down

0 comments on commit 8dc3975

Please sign in to comment.