Jump to content

Calculate total distance travel by vehicle using GPS


ms123

Recommended Posts

Hi guys,

I'm using L80 quectel GPS module. Which sends the NMEA protocol data string which has latitude, longitude, UTC time, knots, etc. We are going to use this GPS module in a vehicle. We have to calculate the distance travel by the vehicle using GPS. We have to show the total distance travel by the vehicle like an odometer. Is it possible to calculate total distance travelled by vehicles using "knots" value from a GPS? If it is possible, then how to calculate?


Thanks..

Edited by ms123
Link to comment
Share on other sites

Hi Endy0816,

Thanks for the reply. The image i've attached shows the NMEA protocol string. The string data starts with $GPRMC has knots value. for example

 

$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A

Where:
RMC -Recommended Minimum sentence C
123519 -Fix taken at 12:35:19 UTC
A -Status A=active or V=Void.
4807.038,N - Latitude 48 deg 07.038' N
01131.000,E - Longitude 11 deg 31.000' E
022.4 - Speed over the ground in knots
084.4 - Track angle in degrees True
230394 - Date - 23rd of March 1994
003.1,W - Magnetic Variation
*6A - The checksum data, always begins with *

 

 

untitled1_zpslhz0f3ei.jpg

 

the image i've attached has knots 4.34, and next GPRMC data string has 4, next has 4.29, 4 and so on...

 

Here is that i have to calculate difference between two knots and time, then multiply the two values? for example 4.34 - 4= 0.34 knot and time 5 sec - 8sec = 3 sec, so the distance is 0.34*3=1.02 .? Is my calculation is correct?

Link to comment
Share on other sites

A GPS receiver only knows time and position. It then calculates speed from that, depending on the specific receiver will depend how often it does that calculation. If the location is not very accurate what will happen to the speed even if the box is stationary?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.