Expand description
Timestamp post-processing for LSL. SPEC.md 8.5.
Three stages run in a fixed order: clock sync, then jitter removal, then
monotonic clamping (src/time_postprocessor.cpp:60-105).
§Float discipline
The jitter filter is a recursive least squares fit. Every operation here keeps the order of the C++ source, because a different order gives a different result in the last bits.
Three rules hold for every line of the filter:
- Do not reassociate an expression to make it read better.
- Do not use
mul_add, because the source uses a separate multiply and add. - Keep the integer baseline subtraction.
liblsl builds with plain IEEE semantics, and no fast-math flag appears in its build configuration. Bit-exact agreement is therefore a target. It is not a promise across every platform.
Modules§
- flags
- The post-processing stages, as a bit set.
Structs§
- Dejitterer
- The recursive least squares filter that removes jitter.
- Fixed
Source - A source with values that a test sets by hand.
- Post
Processor - Applies the three stages to every timestamp. SPEC.md 8.5.
Constants§
- DEFAULT_
SMOOTHING_ HALFTIME - The default half-time of the jitter filter, in seconds.
- MIN_
CLOCKSYNC_ INTERVAL - The shortest time between two clock offset queries, in seconds.
- SAMPLES_
BETWEEN_ CLOCKSYNCS - How many samples pass between two clock offset queries.
Traits§
- Offset
Source - Reads the clock offset that the time sync channel measured.