Public Member Functions | |
boolean | add (double latency) |
double | getMedian () |
LatencyOutlierFilter (int sampleSize, double threshold) | |
Private Attributes | |
final Queue< Double > | latencies |
final int | sampleSize |
final double | threshold |
Uses a sliding window and percentile range to detect latency outliers.
When receiving remote uptime measurements, the latency of the measurement is used to estimate the local uptime at the point when the remote uptime was measured. This calculation assumes that any measurement latency is symmetrical. The larger the latency, the larger the potential error in our estimate of local uptime at the measured remote uptime.
To reduce the effect of measurements with higher uncertainty, we filter out measurements with latencies that exceed the specified percentile within our sliding window.
Definition at line 117 of file RemoteUptimeClock.java.
org.ros.time.RemoteUptimeClock.LatencyOutlierFilter.LatencyOutlierFilter | ( | int | sampleSize, |
double | threshold | ||
) | [inline] |
Definition at line 123 of file RemoteUptimeClock.java.
boolean org.ros.time.RemoteUptimeClock.LatencyOutlierFilter.add | ( | double | latency | ) | [inline] |
latency |
true
false
Definition at line 136 of file RemoteUptimeClock.java.
double org.ros.time.RemoteUptimeClock.LatencyOutlierFilter.getMedian | ( | ) | [inline] |
Definition at line 151 of file RemoteUptimeClock.java.
final Queue<Double> org.ros.time.RemoteUptimeClock.LatencyOutlierFilter.latencies [private] |
Definition at line 121 of file RemoteUptimeClock.java.
final int org.ros.time.RemoteUptimeClock.LatencyOutlierFilter.sampleSize [private] |
Definition at line 119 of file RemoteUptimeClock.java.
final double org.ros.time.RemoteUptimeClock.LatencyOutlierFilter.threshold [private] |
Definition at line 120 of file RemoteUptimeClock.java.