Add 1 point timestamp fallback during wall clock correlation#87
Merged
Conversation
Allows insight on if the 1 point fallback is dangerous (some chunks with more than 1 point log error, and then fallback happens = bad)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves timestamp correlation robustness by allowing correlation to proceed when a chunk contains only a single GPS timestamp, using an expected 1 tick = 1 ms assumption as a fallback.
Changes:
- Add a regression fallback path for chunks with exactly one GPS point (default slope 1.0, intercept computed from the single point).
- Add/expand logging around missing GPS points and correlation failures.
- Add a post-fit slope sanity check against ~1.0.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Logging the points could lead to logging like a bazillion points
Also logs REGRESSION_FALLBACK_SLOPE for easier debugging
irvingywang
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In general, our linear regression system of correlating DAQ ticks to wall clock time is a little overkill and not required. DAQ should always (just like every other PER board) run at 1 tick = 1 ms. However, when we have the information, there is no downside to doing this correlation.
But, on the chances that there are chunks with only 1 GPS timestamp, it is acceptable to assume the time correlation of 1 tick = 1 ms.