Not positive, but I think the iPhone, on its own, uses its three-axis (3D) accelerometer chip to calculate steps/distance (unless a separate program is used that takes advantage of the GPS). An article I read says that "as you walk, the accelerations can be used to compute both the number of steps, and - separately, the distance you travelled. So it is acceleration and a little math, that is how distance is measured."