kmartinez / dgpstracker2

4 stars 1 forks source link

Bug with NMEA Longitude to Decimal Longitude Conversion #11

Closed sua-dev closed 1 year ago

sua-dev commented 1 year ago

On inspecting the incoming converted decimal format from NMEA to decimal, I discovered that the longitude value is inconsistent with other measurements. For reference, the value I'm expecting is -1.41119 degrees according to google maps. This is not the case as the value being returned on the terminal is 2.07789. I'll inspect the nmealon2lon(l) function and try to find out why it's returning a wrong value.

sua-dev commented 1 year ago

Successfully integrated and fixed the issues pertaining to these. Some lines were added to check whether the directions were W/S to indicate values should be changed to negative. Extra minor changes were added to account for more precision up to 7 decimal places on both longitude and latitude values.