VE seems to have incorrect latitude and longitude references
Hi,
Every single latllong that I go to on VE seems to be out by about 15km. I have used several different handheld GPS units to get latlong's of my local area and these match up exactly with google earth but are out by about 15km with VE. I have also downloaded WinformsEarthV2 and this seems to be having the same problem. Further to that I have taken an exact copy of sample code from the sdk and tried setting the center to one of my local latlongs and once again it was out by approximately 15km which gives me the impression that it's a VE problem not one with my code, but I don't think this is very likely. Therefore I must be doing something wrong!
Can anyone please point out what I am doing wrong?
Cheers,
Scott.
[764 byte] By [
say_2000] at [2007-12-24]
Thanks for that I knew it would be something stupid that I was doing. I was using the format (DDD
?MM'SS.SSSS") and VE seems to use (DDD.DDDD). My question now is how do I convert from one to the other?
mmm i will add this to my blog of tips and tricks
John
private double degreesMinutesSecondsToDecimal(string degminsec)
{
//Divide the number of seconds by 60, 28.79 ÷ 60 = 0.5166.
//Add the result to the number of minutes, 31 + .47983.
//Divide the result by 60, 31.47983 ÷ 60 = 0.52466383.
//Now add that to the number degrees, 48 + .52466383.
//The result is 48.52466383°
double seconds = Double.Parse(degminsec.Substring(degminsec.Length - 4, 4));
double minutes = Double.Parse(degminsec.Substring(degminsec.Length - 6, 2));
double degrees = Double.Parse(degminsec.Substring(0, degminsec.Length - 6));
return (((seconds / 100 / 60) + minutes) / 60) + degrees;
}
Not quite awesome enough....
If the value is negative then this is wrong so i quickly changed it to:
private double degreesMinutesSecondsToDecimal(string degminsec)
{
//Divide the number of seconds by 60, 28.79 ÷ 60 = 0.5166.
//Add the result to the number of minutes, 31 + .47983.
//Divide the result by 60, 31.47983 ÷ 60 = 0.52466383.
//Now add that to the number degrees, 48 + .52466383.
//The result is 48.52466383°
double seconds = Double.Parse(degminsec.Substring(degminsec.Length - 4, 4));
double minutes = Double.Parse(degminsec.Substring(degminsec.Length - 6, 2));
double degrees = Double.Parse(degminsec.Substring(0, degminsec.Length - 6));
if (degrees > 0)
{
return (((seconds / 100 / 60) + minutes) / 60) + degrees;
}
else
{
return degrees - (((seconds / 100 / 60) + minutes) / 60);
}
}