add_observation
Description:
The time master of the master clock and the time slave of the slave clock are added to the list of observations.
If enough observations are available, a linear regression algorithm is run on the observations and this is recalibrated.
If this functions returns true, r_squared will contain the correlation coefficient of the
interpolation. A value of 1.0 means a perfect regression was performed. This value can be used to control the sampling frequency of the master
and slave clocks.
Parameters:
| this |
a Clock |
| slave |
a time on the slave |
| master |
a time on the master |
| r_squared |
a pointer to hold the result |
Returns:
|
true if enough observations were added to run the regression algorithm. |