Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System-wide replay running at the clock used in the replayed log (rather than the system time of host) #23055

Open
wangwwno1 opened this issue Apr 25, 2024 · 0 comments

Comments

@wangwwno1
Copy link
Contributor

Describe problem solved by the proposed feature

Existing replay module only align the timestamp of each message (timestamp field) to the current system time. This create a discrepancy to other timestamps (e.g., timestamp_sample) and does not consistent with the goal: to replay the flight log as-is.

Describe your preferred solution

At the start of the replay, the replay module calculate the time offset between the system time and the log file timestamp.
In replay mode, we can take this offset as the hrt_absolute_time_offset. When the firmware calls hrt_absolute_time, it returns the timestamp relative to the clock used in the flight log (rather than the host system time).

Describe possible alternatives

  1. Make other timestamps relative to the main timestamp, as suggested in the doc.
  2. Identify timestamp fields with rules (e.g., prefix) and align them to the current system time.
  3. Use lockstep to manage the system time update.

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant