fix(ekf2): stop publishing a placeholder attitude in replay

Until the attitude became valid, replay mode published a zero-filled
vehicle_attitude carrying a null quaternion, so a replayed log opened with
samples a reader has to know to discard.

Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: bresch <brescianimathieu@gmail.com>
This commit is contained in:
bresch authored and Mathieu Bresciani committed 2026-09-22 16:01:46 +02:00
1 parent 7526943204
commit 8ee00cc618
1 file changed
-6
-6
View File
@@ -1199,12 +1199,6 @@ void EKF2::PublishAttitude(const hrt_abstime &timestamp)
_ekf.get_quat_reset(&att.delta_q_reset[0], &att.quat_reset_counter);
att.timestamp = _replay_mode ? timestamp : hrt_absolute_time();
_attitude_pub.publish(att);
} else if (_replay_mode) {
// in replay mode we have to tell the replay module not to wait for an update
// we do this by publishing an attitude with zero timestamp
vehicle_attitude_s att{};
_attitude_pub.publish(att);
}
}