From baf43f0bcc9fc68abbe5307aa4b338d22f7ba026 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 6 Dec 2021 18:48:38 +0000 Subject: [PATCH] Continue to experiment with late follow-up correction weights. --- nqptp-message-handlers.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nqptp-message-handlers.c b/nqptp-message-handlers.c index fafb3a4..9eeaeed 100644 --- a/nqptp-message-handlers.c +++ b/nqptp-message-handlers.c @@ -388,9 +388,13 @@ void handle_follow_up(char *buf, __attribute__((unused)) ssize_t recv_len, if (jitter > -10000000) { // we take any positive or a limited negative jitter as a sync event - if (jitter < 0) - offset = clock_private_info->previous_offset + jitter / 32; - else if (clock_private_info->follow_up_number < + if (jitter < 0) { + if (clock_private_info->follow_up_number < + (5 * 8)) // at the beginning (8 samples per second) + offset = clock_private_info->previous_offset + jitter / 16; + else + offset = clock_private_info->previous_offset + jitter / 16; + } else if (clock_private_info->follow_up_number < (5 * 8)) // at the beginning (8 samples per second) offset = clock_private_info->previous_offset + jitter / 2; // accept positive changes quickly -- 2.47.2