|
The reason for this error is a rounding error in the routine ConvertDegreeMinuteSecondToDegrees in the origional int32 was used.
I am assuming that the same code was used.
In my case when in Southampton UK the GPS had me located in the middle of english channel. At home 8 miles away all was ok.
/// <summary>
/// Expects input in dddmm.mmmm or ddmm.mmmm format
/// </summary>
/// <param name="input"></param>
/// <returns></returns> private double
ConvertDegreeMinuteSecondToDegrees(string input)
{
if(input == null || input.Length <=0)
return 0;
double inputvalue = Convert.ToDouble(input);
int degrees = (int)(inputvalue/100);
return degrees + (inputvalue - (degrees * 100))/60;
}
|