chore: aggregate ClockDiffMeasurements to reduce susceptibility to noise#3
Merged
Conversation
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
|
mojomex
added a commit
that referenced
this pull request
Jan 28, 2026
…noise (#3) * chore: add median aggregation for clock diff measurements Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp> * docs: clarify in/outputs for measurement aggregate Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp> * chore: rename measurement aggregator to more generic name Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp> * chore: use update aggregator in diag master Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp> --------- Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
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.



ClockDiffMeasurements are used to gain information on delays between clocks that cannot be gathered through other means. The most common use case is for sensors that do not support PTP management protocol and which do not report delay information through other means.The measurement mechanism usually has to be implemented in software (userspace) and thus is subject to scheduling and other sources of measurement noise.
To prevent noise from triggering an ERROR diagnostic status, this PR implements a median filter that aggregates the measurements on each measurement link for the whole timed update queue. The
ClockDiffMeasurements are then removed and each link's aggregate is inserted into the graph.