> On 6/08/2015, at 12:26 am, Miroslav Lichvar <[email protected]> wrote: > > That makes sense. The precompensation I was thinking was about moving > the mean offset closer to zero. For example, if the clock has a drift > of 100 ppm, the offset would be moving somewhere around around 0 +/- > 50 microseconds, instead of 50 +/- 50 microseconds. > > Something like this (not tested): > > @@ -119,7 +119,7 @@ start_adjust(void) > } > > UTI_DiffTimevalsToDouble(&elapsed, &T1, &T0); > - accrued_error = elapsed * current_freq; > + accrued_error = (elapsed + DRIFT_REMOVAL_INTERVAL / 2.0) * current_freq; > > adjust_required = - (accrued_error + offset_register);
This changes the effective drift (as seen in tracking.log) from 18ppm to 6ppm but System time still hovers around -10us -- To unsubscribe email [email protected] with "unsubscribe" in the subject. For help email [email protected] with "help" in the subject. Trouble? Email [email protected].
