ekf2: only populate gnss pos aid src status if ref initialized

- this is a minor logging improvement when plotting the position from the beginning of the log (often a replay session)
This commit is contained in:
Daniel Agar 2024-02-15 13:13:10 -05:00 committed by GitHub
parent 84a7d42566
commit 8dc3975456
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -80,8 +80,11 @@ void Ekf::controlGpsFusion(const imuSample &imu_delayed)
}
}
updateGnssVel(gnss_sample, _aid_src_gnss_vel);
if (_pos_ref.isInitialized()) {
updateGnssPos(gnss_sample, _aid_src_gnss_pos);
}
updateGnssVel(gnss_sample, _aid_src_gnss_vel);
} else if (_control_status.flags.gps) {
if (!isNewestSampleRecent(_time_last_gps_buffer_push, _params.reset_timeout_max)) {