Rockbox Development > Feature Ideas
compensate for drifting RTC
Llorean:
It seems to me that if you're going to manually run the plugin again, you could also simply manually look at your wristwatch and set the time.
To clarify: If the drift is constant enough, a manual plugin is silly as we could just automatically adjust for drift every boot, or similar. If the drift is not constant enough for this to be accurate, then a manual plugin is as pointless as a background fix.
pabouk:
--- Quote from: Llorean on June 18, 2008, 10:35:14 AM ---It seems to me that if you're going to manually run the plugin again, you could also simply manually look at your wristwatch and set the time.
--- End quote ---
I think that it is much easier to run a plug-in than to set the clock manually and in addition you do not have to have a clock :)
Of course the automatic way is much better - for example calculate the accumulated drift every boot and when it reaches let's say 5 seconds then adjust the RTC. This would minimize accumulating the inaccuracy added by every RTC adjustment.
The same functionality is used on UNIX systems. See the part "The Adjust Function" in http://man.he.net/man8/clock.
PaulJam:
--- Quote from: Llorean on June 18, 2008, 10:35:14 AM ---To clarify: If the drift is constant enough, a manual plugin is silly as we could just automatically adjust for drift every boot, or similar. If the drift is not constant enough for this to be accurate, then a manual plugin is as pointless as a background fix.
--- End quote ---
I have now found some time to test how constant the drift of the RTC in my device (H300 which uses the PCF50606) is:
--- Code: ---Date Time Seconds between Drift Drift/day between
measurements in seconds 2 measurements
20.08 13:50 - -1,07 ( -) -
21.08 17:55 Δ=101100 8,58 (Δ= 9,65) 8,25
23.08 16:25 Δ=167400 24,81 (Δ=16,23) 8,38
26.08 09:05 Δ=232800 47,24 (Δ=22,43) 8,32
27.08 13:30 Δ=102300 56,79 (Δ= 9,55) 8,07
28.08 13:50 Δ= 87600 65,28 (Δ= 8,49) 8,37
--- End code ---
The calculated drift per day varies between 8,07 and 8,38 seconds. I think that this is constant enough that such a functionality would make sense (at least for targets using the same RTC chip).
Maybe this thread could be moved to the "Feature Ideas" forum?
soap:
Theoretically, how constant will the drift be?
Is RTC drift dependant on temperature? On voltage supply? On sunspots? ;)
Rincewind:
I made an internship at a firm that sells data loggers for windparks. They use a compensation for the RTC that is dependant on the temperature (which is logged anyway). Every device is connected to a frequency counter where the amount of drift at room temperature is measured and programmed into the device before selling. From this the compensation is scaled based on temperature.
Testing with a climate fridge that tests the devices at desert and freezing temperatures over a few days showed that without compensation the drift shifted the clock by about half a minute in 4 days. With compensation it was a few seconds.
I think compensation in rockbox is possible when we assume that a device is operated and stored at room temperature most of the time. It would still need user interaction once to calibrate the drift parameter.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version