[time-nuts] Linear or quadractic fit algorithms for small microcontrollers?

Tim Shoppa tshoppa at gmail.com
Wed Dec 26 15:53:04 UTC 2018


I know we discussed this many years ago, probably in context of the HP
Smartclock patent, but I've forgotten all the details.

Say I have a circular buffer of up to several dozen time and offset values.
The intent was to sample at regular intervals but some samples are missing.
Are there simple microcontroller-oriented algorithms - integer math, no big
scratch arrays - for doing linear or quadractic fits and maybe even
excluding some outliers?

Instead of using arrays for circular buffers, if there are algorithms that
"age out" the older samples so that they get lesser and lesser weight, and
also give linear and/or quadractic fit coefficients, that's even neater.
For example exponential smoothing.

Tim N3QE



More information about the Time-nuts_lists.febo.com mailing list