Skip to content

implementing self-calibration #40

@drmatthewclark

Description

@drmatthewclark

I've implemented a self calibration. It depends on the computer clock being regulated to at least one second per day. On Linux systems NTPD regulates the time far more accurately. By comparing the sound data frame count to the clock one can accurately calibrate the actual frequency. Since the computer OS is not real time, one has to wait considerable time to get a horologically accurate rate, between 12 and 24 hours.

The self calibration watches a window average of the computed calibration correction, and when it is less than 0.001 s/day it will start updating the calibration every 10 minutes. I've attached two graphs of calibration value vs runtime. One can see that the calibration varies a lot a first, but after about 24 hours the variation is far less than the 0.1 s/day increment that the program currently uses to set the calibration. Just leave your computer running with the tg-timer for a day and you are all set.

calibration

calibration-close

if someone else has a fork, I could add it to yours if you like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions