Theoretically the accelerometers in the iPhone can be used to track distance using interpolation over time.
What is the estimated error for tracking distances between 1 and 10 meters?
Is there any iPhone app that work as a measuring tape?
From what I've heard, the iPhone accelerometer output is very noisy - most applications that utilize it for any sort of moderate precision work do a lot of filtering and output modification to smooth out the noise. The iPhone can be placed flat on a table, and the accelerometer will still output a fair bit of data. I imagine you could certainly use it to measure longer distances (>10m), but I probably wouldn't trust it for high resolution measurements.
Answered by patjbs on July 21, 2009.
There are plenty of pedometer apps, so you might check their reviews. Also, in terms of accuracy, here's one stackoverflow answer:
and another about implementing a pedometer with around 20m accuracy:
Answered by John on July 21, 2009.
Content from Superuser of Stack Exchange. Original article at Superuser.