Take a look at cyclemeter. I ride with my phone in my pocket and have it set to give me update every 15 minutes on average speed and distance. You can also have it send email updates to family or friends to track your location, which I really like on the off chance I'm in an accident.