GPS time correlation on log file parsing#71
Conversation
There was a problem hiding this comment.
Pull request overview
Adds GPS-based time correlation to DAQ log parsing so parsed CSV outputs can include a “real” timestamp derived from GPS time messages, and correlated chunks can be named with the time of the first message.
Changes:
- Introduces a
daq_log_parse::correlatemodule that extractsgps_timemessages per chunk and fits a linear regression between DAQ ms and Unix ms. - Updates the log parsing UI flow to run correlation after chunking and pass correlated chunks into CSV generation.
- Extends CSV output to include a correlated time column and optionally suffixes output filenames with the first correlated timestamp.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/ui/log_parser.rs | Runs chunk time-correlation before writing CSV tables. |
| src/daq_log_parse/table.rs | Accepts correlated chunks, adds correlated time column, and names output files with correlated first time when available. |
| src/daq_log_parse/mod.rs | Exposes the new correlate module. |
| src/daq_log_parse/correlate.rs | Implements GPS timestamp extraction and linear regression correlation per chunk. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Currently gives weird results: DAQ ticks are 1 ms so the slope should be exactly 1 and the RMS is very high, but from debug printing the algorithm is working correctly, it is the data itself that is noisy |
|
Okay updates: so it turns out the clock rate was set wrong on DAQ + some of the other boards (ex: Dash) so that's why the slope was not 1.... Seems to work fine.... |
table not updated yet
timestamps not folded under the row headers
2530a76 to
efbc62c
Compare


out_###_TimeOfFirstMessage