dds: clean up timesync

This commit is contained in:
Alexander Lerach
2025-05-23 11:30:55 +02:00
parent 31ab3f0ac9
commit 134ee7b640
3 changed files with 10 additions and 21 deletions
+2 -2
View File
@@ -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);
}
}
+1 -1
View File
@@ -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