ekf2-replay: best effort replay when no ekf2_timestamps

Run at sensor_combined speed and publish all other sensors occuring
between 2 sonsor_combined samples.
This allows a crude replay in case ekf2 replay was not enabled during
the flight.
This commit is contained in:
bresch
2025-03-05 10:12:24 +01:00
committed by Mathieu Bresciani
parent f583406558
commit cae4f94476
4 changed files with 73 additions and 22 deletions
+2
View File
@@ -730,6 +730,7 @@ Replay::nextDataMessage(std::ifstream &file, Subscription &subscription, int msg
subscription.next_read_pos = cur_pos;
file.seekg(subscription.timestamp_offset, ios::cur);
file.read((char *)&subscription.next_timestamp, sizeof(subscription.next_timestamp));
subscription.published = false;
done = true;
} else { //sanity check failed!
@@ -1125,6 +1126,7 @@ Replay::publishTopic(Subscription &sub, void *data)
if (published) {
++sub.publication_counter;
sub.published = true;
}
return published;