Brain not working today - maths expert needed.
Discussion
Five year old daughter decided to get up at 01:30, climbed into our bed and promptly went back to sleep, I was however wide awake, took me ages to go back off to sleep (now in her bed). Brain no function today 
I've been writing some software to correct the drift in a clock by comparing it with an accurate signal coming from a satellite network. That bit is sorted but what we also wanted to do was add in a check to ensure the the drift being measured is within an expected tolerance and if it isn't to signal that there could be something wrong with the hardware.
The inaccurate clock is specified at +/- 30 ppm (parts per million).
I can calculate the ppm easily enough as I have how many milliseconds we've been monitoring it for and how many milliseconds it has drifted by
i.e.
Total time 141902903 msec
Drift 1500 msec
ppm = (1000000 / total) * drift
= (1000000 / 141902903) * 1500
= 10.57
What I need to add is a determination of when the result should be accurate i.e. if a millisecond or two of drift is recorded early on the the result will exceed 30ppm but sometime later it won't
e.g. total 20000, drift 1,
ppm = (1000000 / 20000) * 1 = 50
but after another 10 seconds it with no further drift it would be 33.3 ppm, another 10 seconds 25ppm.
Can't think how to do this at the moment. I have something about statistical confidences in my head!?!

I've been writing some software to correct the drift in a clock by comparing it with an accurate signal coming from a satellite network. That bit is sorted but what we also wanted to do was add in a check to ensure the the drift being measured is within an expected tolerance and if it isn't to signal that there could be something wrong with the hardware.
The inaccurate clock is specified at +/- 30 ppm (parts per million).
I can calculate the ppm easily enough as I have how many milliseconds we've been monitoring it for and how many milliseconds it has drifted by
i.e.
Total time 141902903 msec
Drift 1500 msec
ppm = (1000000 / total) * drift
= (1000000 / 141902903) * 1500
= 10.57
What I need to add is a determination of when the result should be accurate i.e. if a millisecond or two of drift is recorded early on the the result will exceed 30ppm but sometime later it won't
e.g. total 20000, drift 1,
ppm = (1000000 / 20000) * 1 = 50
but after another 10 seconds it with no further drift it would be 33.3 ppm, another 10 seconds 25ppm.
Can't think how to do this at the moment. I have something about statistical confidences in my head!?!
Gassing Station | The Lounge | Top of Page | What's New | My Stuff



