Skip to content

Add 1 point timestamp fallback during wall clock correlation#87

Merged
LelsersLasers merged 9 commits into
masterfrom
millan/correlate_fallback_slope
Jul 3, 2026
Merged

Add 1 point timestamp fallback during wall clock correlation#87
LelsersLasers merged 9 commits into
masterfrom
millan/correlate_fallback_slope

Conversation

@LelsersLasers

Copy link
Copy Markdown
Member

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.

Allows insight on if the 1 point fallback is dangerous (some chunks with more than 1 point log error, and then fallback happens = bad)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/daq_log_parse/correlate.rs Outdated
Comment thread src/daq_log_parse/correlate.rs
Comment thread src/daq_log_parse/correlate.rs Outdated
Comment thread src/daq_log_parse/correlate.rs Outdated
Logging the points could lead to logging like a bazillion points
Also logs REGRESSION_FALLBACK_SLOPE for easier debugging
@LelsersLasers LelsersLasers marked this pull request as ready for review July 3, 2026 05:13
@LelsersLasers LelsersLasers requested a review from irvingywang July 3, 2026 05:13
@LelsersLasers LelsersLasers merged commit dd8df71 into master Jul 3, 2026
1 check passed
@LelsersLasers LelsersLasers deleted the millan/correlate_fallback_slope branch July 3, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants