GPS Odometer

Tips and questions relating to the GPS modules from SFE

Moderator: phalanx

Post Reply
ptkacik
Posts: 18
Joined: Thu Jul 09, 2015 3:33 pm

GPS Odometer

Post by ptkacik » Thu Jul 09, 2015 3:39 pm

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

skimask
Support Volunteer
Posts: 1244
Joined: Sun Nov 09, 2008 2:11 am
Location: Minot, N.D.

Re: GPS Odometer

Post by skimask » Thu Jul 09, 2015 7:55 pm

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
I ignore "one post wonders".

jremington
Support Volunteer
Posts: 2149
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: GPS Odometer

Post by jremington » Thu Jul 09, 2015 8:22 pm

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.

ptkacik
Posts: 18
Joined: Thu Jul 09, 2015 3:33 pm

Re: GPS Odometer

Post by ptkacik » Fri Jul 10, 2015 8:04 am

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

jremington
Support Volunteer
Posts: 2149
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: GPS Odometer

Post by jremington » Sat Jul 11, 2015 8:12 am

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.

skimask
Support Volunteer
Posts: 1244
Joined: Sun Nov 09, 2008 2:11 am
Location: Minot, N.D.

Re: GPS Odometer

Post by skimask » Sat Jul 11, 2015 3:36 pm

Same theory, but using a vehicle's OBD to give me current speed. Integrate current speed over time, and you get distance.

(watch the LCD screen in the upper right hand corner of the video, that's the calculated odometer)

https://www.youtube.com/watch?v=7sUVMn4OJ58

Do the same thing with the GPS speed output instead of using OBD like I did.

Or calculate the distance between the last known position (Lat/Long/Alt) and the current position (Lat/Long/Alt), get the distance between the two, make the new current position = the last known position, add the last calculated distance between the two into an accumulator.

But, this is probably toooooo much...
I ignore "one post wonders".

Post Reply