|
|
|
|
|
by potatolicious
4174 days ago
|
|
The accelerometer and gyroscope. The double integral of acceleration is displacement. On iPhones/iOS it's extremely accurate to the point where you can integrate displacement from it and not be far off from the real result - over short timespans/distances anyways. One of the lesser-appreciated qualities of Apple hardware (more accurately, hardware and drivers) is the quality and accuracy of their sensors. |
|
In my experience moving and the stopping the phone would always end up with the two accelerations not exactly canceling out so that the calculated position would drift away from the true position at a constant rate.
Even applying a floor to velocity to eliminate the drift, the distances calculated for simple linear motions were consistently off by ~50% in either direction.
This was a few years ago so sensors may have improved - have you actually done this in practice and found it to work?