To be clear. These values were returned by the GPSDriver library as latitude, longitude and altitude?
yes it is
To be clear. These values were returned by the GPSDriver library as latitude, longitude and altitude?
It looks like a problem between the GPS hardware and the driver.
You can filter out results where the latitude is not between +-180.
I've just knocked up a quick test using the converters from GPS.dll, GPSDriver.dll and my GPSSerial.dll. All should be the same converter using the same source code and for -ve and +ve latitudes the results agree but for negative longitudes they do differ. GPSConverter and GPSSerialConverter are the same, which is not surprising as I copied the code for GPSSerialConverter from the GPSDriver source, but they are different from Converter. Looks like a bug slipped in when Erel amalgamated the sources for GPSDriver.the results returned by the WGS84LatLonToUTM function is different (and in my case incorrect)?
:sign0098:A man after my own heart, pedantry rules! :sign0188:Attached a converter with mm accuracy (please excuse me but I’m a surveyor).
Please try the attached dll and see if it fixes the wrong negative values problem.
I'll later upload the other files.
The problem was with the conversion of VB .Net Fix method to C# Math.Floor which gave the wrong results for negative values (one less than what it should returned).
That Seems to have fixed it back to what it was is the GPS.dll converter.
public static double Fix(double Number)
{
if (Number >= 0.0)
{
return Math.Floor(Number);
}
return -Math.Floor(-Number);
}
It seems to be the same on the device as the desktop for me and it's hard to see how it could be different, are you sure you copied the correct GPS.dll to the device? Nevertheless it is still wrong at -6 degree longitude intervals i.e -6, -12, -18 ... Looks like the implementation of Fix needs a tweak! This is how VB .NET does it.
@bish0p, please download the updated file in the first post.
I guess that you've previously tested on the device a compiled application which used the source code of the older library.
Now after you'll update the source code (cs file) as well, the problem should be solved.