fix(udpscope): bound accumulated-burst chaining so packet loss cannot displace the trace
Forward-chaining each accumulated burst onto the previous one suppresses arrival jitter, but an unchecked chain never recovers: one lost datagram, or a declared sampling rate that differs from the producer's real one, dates every later sample early for the rest of the run. The chain is now a prediction, compared each packet against the arrival anchor and abandoned beyond kBurstResyncThresholdS, which bounds the error instead of accumulating it. Plan amended so the hrt-fit fallback (unusable here: the fit needs 32 packets and is itself corrupted by bursty arrivals) cannot come back. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
5a8479cda9
commit
892e3eae28
@@ -54,8 +54,11 @@ private:
|
||||
bool lastAccValid = false;
|
||||
uint32_t prevAccCount = 0;
|
||||
/** For accumulated scalars with a declared sampling rate: end timestamp
|
||||
* of the most recently emitted burst, used as a forward-chain anchor
|
||||
* that is immune to arrival-time jitter. */
|
||||
* of the most recently emitted burst. The next burst is PREDICTED to
|
||||
* start one sample period after it — immune to arrival-time jitter —
|
||||
* but the prediction is discarded when arrival time disagrees with it
|
||||
* by more than a delivery backlog can explain, so packet loss cannot
|
||||
* displace the trace permanently. */
|
||||
double lastEmittedEnd = 0.0;
|
||||
bool lastEmittedValid = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user