ntp: improve dispersion calculation
Instead of adding precision (sum of the local and remote precision) to the TX and RX timestamp error, include only the maximum.
This commit is contained in:
parent
ab99373cfc
commit
96cc80ffc8
1 changed files with 2 additions and 1 deletions
|
@ -1435,7 +1435,8 @@ receive_packet(NCR_Instance inst, NTP_Local_Address *local_addr,
|
|||
skew = (source_freq_hi - source_freq_lo) / 2.0;
|
||||
|
||||
/* and then calculate peer dispersion */
|
||||
dispersion = precision + inst->local_tx.err + rx_ts_err + skew * fabs(local_interval);
|
||||
dispersion = MAX(precision, MAX(inst->local_tx.err, rx_ts_err)) +
|
||||
skew * fabs(local_interval);
|
||||
|
||||
/* Additional tests required to pass before accumulating the sample */
|
||||
|
||||
|
|
Loading…
Reference in a new issue