EKF2: use timestamp from argument of PublishEvPosBias() (#21822)

* EKF2: use timestamp from argument of PublishEvPosBias()

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* Update src/modules/ekf2/EKF2.cpp

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
This commit is contained in:
Silvan Fuhrer 2023-07-11 11:07:39 +02:00 committed by GitHub
parent 02ab5e0704
commit 81764c43a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1057,7 +1057,7 @@ void EKF2::PublishEvPosBias(const hrt_abstime &timestamp)
if ((bias_vec - _last_ev_bias_published).longerThan(0.01f)) {
bias.timestamp_sample = _ekf.aid_src_ev_hgt().timestamp_sample;
bias.timestamp = hrt_absolute_time();
bias.timestamp = _replay_mode ? timestamp : hrt_absolute_time();
_estimator_ev_pos_bias_pub.publish(bias);
_last_ev_bias_published = Vector3f(bias.bias);