mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 07:53:35 +08:00
dds: clean up timesync
This commit is contained in:
@@ -66,7 +66,7 @@ void Timesync::update(const uint64_t now_us, const int64_t remote_timestamp_ns,
|
||||
// We reset the filter if we received 5 consecutive samples which violate our present estimate.
|
||||
// This is most likely due to a time jump on the offboard system.
|
||||
if (_high_deviation_count > MAX_CONSECUTIVE_HIGH_DEVIATION) {
|
||||
PX4_WARN("time jump detected. Resetting time synchroniser.");
|
||||
PX4_DEBUG("time jump detected. Resetting time synchroniser.");
|
||||
// Reset the filter
|
||||
reset_filter();
|
||||
}
|
||||
@@ -104,7 +104,7 @@ void Timesync::update(const uint64_t now_us, const int64_t remote_timestamp_ns,
|
||||
_high_rtt_count++;
|
||||
|
||||
if (_high_rtt_count == MAX_CONSECUTIVE_HIGH_RTT) {
|
||||
PX4_WARN("RTT too high for timesync: %llu ms", rtt_us / 1000ULL);
|
||||
PX4_DEBUG("RTT too high for timesync: %llu ms", rtt_us / 1000ULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ static constexpr uint32_t CONVERGENCE_WINDOW = 500;
|
||||
// Outlier rejection and filter reset
|
||||
//
|
||||
// Samples with round-trip time higher than MAX_RTT_SAMPLE are not used to update the filter.
|
||||
// More than MAX_CONSECUTIVE_HIGH_RTT number of such events in a row will throw a warning
|
||||
// More than MAX_CONSECUTIVE_HIGH_RTT number of such events in a row will throw a debug message
|
||||
// but not reset the filter.
|
||||
// Samples whose calculated clock offset is more than MAX_DEVIATION_SAMPLE off from the current
|
||||
// estimate are not used to update the filter. More than MAX_CONSECUTIVE_HIGH_DEVIATION number
|
||||
|
||||
Reference in New Issue
Block a user