The LogYourRun application tracks distance traveled by using the GPS as well as by using the accelerometer as a pedometer. This allows the application to measure distance even when GPS reception is not available – so on those cold mornings you do not have to wait around for the iPhone to get good GPS reception before starting your run – once GPS reception becomes adequate the GPS takes over from the pedometer.
The application exist in two states:
1) Record distance using GPS
2) Record distance using pedometer
Switching from pedometer to GPS is instant – once GPS signal is adequate distance is now recorded using GPS.
Switching from GPS to pedometer will occur if an adequate GPS signal has not been received over a period of 20 seconds. At this point the pedometer will take over calculating the distance and since it had not been recording distance for the previous 20 seconds the pedometer will calculate the distance that was traveled over those 20 seconds by rolling up the number of steps that were taken since the last good GPS signal was received.