[time-nuts] LTE-Lite module

Charles Steinmetz csteinmetz at yandex.com
Sat Oct 25 11:23:57 EDT 2014


Bob wrote:

>PHK has a roughly 6 line code snippet that does a basic PLL. Add two 
>more lines to check / clamp the integrator if you wish. That's 8 
>lines. If you want a D term (to give it an FLL component) add 2 more 
>lines. We're up to 10 lines.
>
>It's just a control loop, not a full GPSDO. There's not a lot to it.

There's a bit more to it than that.  For any loop slow (narrowband) 
enough to be useful disciplining a good OCXO, I consider a dual- or 
triple-rate loop filter to be essential.  There is also always a fair 
amount of error-trapping, and other overhead.  These can add lines 
fairly quickly.

I'm sure I have lots more to learn about writing efficient 
code.  (But note that there is a difference between coding one's 
chosen algorithm more efficiently and choosing a different algorithm 
that is not really what you want, just because it is more efficient.)

Best regards,

Charles





More information about the time-nuts mailing list