# SparkFun Forums

### GPS Odometer

Tips and questions relating to the GPS modules from SFE

### GPS Odometer#183279

By ptkacik
#183279
I need a GPS Odometer but feel that surely somebody has already done this. I don't have much (or any) experience on making these things. It is for distance travelled by a vehicle over the road.

Does anybody know how to make a GPS odometer?

Thanks,
Peter

### Re: GPS Odometer#183281

#183281
Distance = speed x time

1 Mile = 1 Mile per hour for 1 hour
1 Mile = 60 Miles per hour for 1 minute
1 billion miles = 1 billion miles per hour for 1 hour
1 light year = Light speed for 1 year

### Re: GPS Odometer#183282

By jremington
#183282
Do you have a GPS module, and can you read the NMEA sentences?

If so, in many cases the relevant sentence (e.g. \$GPRMC) is output once per second, or you can program the module so that this is the case. Read the current speed from that sentence, see: http://www.gpsinformation.org/dale/nmea.htm#RMC

The distance traveled is just the sum of those values over whatever period of time you are summing, in units of (speed x 1 sec).

This "distance traveled" function is already built in to most of even the cheapest hand held GPS units.

### Re: GPS Odometer#183291

By ptkacik
#183291
I was really thinking somebody would have worked out the details about what needs to be purchased to make the GPS odometer, how to wire it up, and how to program it. How do you access the distance and reset it?

What if it loses power? Does it pick back up where it left off? It would be supplied by 12 VDC but lose power occasionally.

How long can it record or do you just store a single distance number?

Can a remote GPS antenna be able to withstand outdoor conditions?

Thanks,
Peter

### Re: GPS Odometer#183314

By jremington
#183314
If you have to ask those sorts of questions, a GPS odometer is way, way too much for a first project. You won't find a "canned" project explaining how to make one, but if you did, likely much of the information would be out of date. Technology changes rapidly.

I recommend to buy an Arduino and work your way through the example projects. Most of the basics are covered in various on-line tutorials, including how to receive GPS coordinates and store info on an SD card. With those done and understood, it would a straightforward couple of evenings of work to make the odometer.