[ntp:questions] Using NTP to calibrate sound app

Rob nomail at example.com
Sat Jan 26 10:56:05 UTC 2013

Ralph Aichinger <ralph at pangea.at> wrote:
> Rob <nomail at example.com> wrote:
>> I think the average internet connection from a device like an iPhone
>> has so much jitter that this approach will not work reasonably well.
>> (try to ping to an internet server and see what kind of jitter you
>> have, it usually is terrible over UMTS, WiFi etc)
> iPhones do have a GPS though, and there do exist apps (at least
> for Android, supposedly also for the iPhone) that sync time
> to this GPS.

I have no knowledge of the internal architecture of the iphone, but
when this GPS receiver is internally connected using an emulated
serial link that transfers NMEA packets, the accuracy of that time
sync also will leave a lot to be desired.  Fine for wristwatch
time, not so good for measurements and calibrations.  For that you
need PPS information, which is usually not provided in designs not
especially made for timekeeping.

When you want accurate measurements, you need to run an ntpd process
on the machine that continually averages the information from the
GPS and disciplines the local clock using a slow loop, and then
perform the measurement relative to this disciplined local clock.
That way you avoid the jitter of individual GPS time readings.

That said, I find it hard to believe that the same measurement cannot
be done relative to the standard iphone local clock with enough
accuracy for the original poster.  Clocks tend to run quite accurately
when compared to the precision required for typical audio applications.

More information about the questions mailing list