jacketizer / libnmea

Lightweight C library for parsing NMEA 0183 sentences
MIT License
264 stars 93 forks source link

more precise lat and lon #17

Open frankipl opened 7 years ago

frankipl commented 7 years ago

Hi,

First of all, thanks for your work. I have compiled static version and tried to use in my project, which is for tracking vehicles. After parsing nmea just degrees and minutes is not enough, It would be good to have double precision numbers like for lat 49.164512 and for lon 21.160322

Best Regards Marek

DoruLa commented 7 years ago

Check-out the nmath.h file. It has several methods to convert to required units. Also, if you display using "cout", be sure to set the precision using cout.precision(). I think for what you need, you may use "nmeaMathNdegToDegree".

jacketizer commented 7 years ago

Sorry for a very delayed answer. I will take a look at it when I have time. Mean while, maybe you could try the solution suggested by @DoruLa.