Implementing a Kalman filter for position, velocity, acceleration
This is the best one that I know of

Full derivation with explanation

Kalman

This is a good resource for learning about the Kalman filter. If you are more concerned with getting the smartphone app working I would suggest looking for a pre-existing implementation of the Kalman filter. Why reinvent the wheel? For example if you are developing for android, openCV has an implementation of the Kalman filter. See Android OpenCV

Bradski and Kaehler is a good resource on image processing in general and includes a section on the Kalman filter including code examples.