I can add some explanation to the correct answer by CPallini.
To acceleration is the second derivative of the coordinate and the only measurable characteristic of motion. According to Galilean relativity principle, it is impossible to tell the difference between coordinate systems moving with different speeds and having different reference point using any mechanical measurements. According to Einstein, no physical phenomena can be used to tell that, please see:
http://en.wikipedia.org/wiki/Principle_of_relativity[
^],
http://en.wikipedia.org/wiki/Galilean_invariance[
^].
It is theoretically possible to estimate the displacement (and thus coordinates in case initial coordinate are known) of a device by measurement of the acceleration, but it needs permanent double integration of the acceleration (again, acceleration is the second derivative of the coordinates). It is quite apparent that all the errors tend to accumulate during integration. And any accelerometer is a device with inherent accuracy limitations: one can put it under conditions (certain vibration frequencies and accelerations) which could cause fatal loss of accuracy.
There is a very important technical problem here: the measurement and integration should be performed non-stop with regular time intervals which should never exceed some maximum sample rate. In other words, the computing system should be required to be a
real-time system or near real-time. I don't think Android is anything close to such system. Also, I'm not sure the device's accelerometer is a true 3D sensor.
Please see:
http://en.wikipedia.org/wiki/Real-time_computing[
^],
http://en.wikipedia.org/wiki/Real-time_operating_system[
^].
Nevertheless, such problem is successfully solved in rocket science. But motion in open space is much, much smoother and simpler than on the Earth. I would say, on Earth this problem is nearly hopeless.
—SA