After reading many researches and papers beside to many forums about how to measure the distance based on the acceleration data I found the double integration method, but th
If there is a base map and you are assured that the sensor is traveling along a known path (such as a road), you can use the base map to correct noisy readings. See Jun Han, Emmanuel Owusu, Thanh-Le Nguyen, Adrian Perrig, and Joy Zhang "ACComplice: Location Inference using Accelerometers on Smartphones" In Proceedings of the 4th International Conference on Communication Systems and Networks (COMSNETS 2012), Bangalore, India, January 3-7, 2012.
http://www.netsec.ethz.ch/publications/papers/han_ACComplice_comsnets12.pdf