The present disclosure provides a method of measuring a path length using a handheld electronic device comprising an acceleration sensor. The method comprises: sensing an acceleration of the handheld electronic device while the handheld electronic device is translated over the path, thereby obtaining an acceleration plot of the handheld device; and calculating the path length from the acceleration plot using an integration procedure. In some cases projection of a distance over a required measured path is used.