Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2723
  • Last Modified:

Convert NMEA Lat and Lon to........

I need to convert NMEA Lat and Lon values to.....well I don't know.  I need to convert them to the typical format I am used to seeing.  

Right now I am getting them in the following formats:

Latitude, ddmm.mmmm format.
Longitude, dddmm.mmmm format.

I need to put them in the format traditional people are used to seeing:

Like:

      lat ="42.938660";
      long="-85.486363";

Can you help me or point me to the formula for this.

Thanks

jfill
0
jfill89
Asked:
jfill89
  • 2
1 Solution
 
imarshadCommented:
Formula is

dd + mm.mmmm/60   (For latitude)
ddd + mm.mmmm/60 (For Longitude)

Imran
0
 
jfill89Author Commented:
Ok good deal, thanks.  Now when I test a few way points for example starting at

lat ="42.938660";
long="-85.486363";

And going to:

lat ="42.907554";
long="-85.512090";

If I look at the data coming in it is not returning the long as a negitive number?  It is returning it as a positive.  Do I just need to mult. by -1??

jfill
0
 
imarshadCommented:
Yes you can...... -ve Longitude means you are in west.... and you will be receiving your longitudes as xxx.xxxxW

Imran
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now