3
Vote

Calculate Bearing Issue

description

this generates a result that is unexpected and does not agree with the original authors formula: var dLon = VEToolkit.Math.DiffRadian(latlng2.Longitude, latlng1.Longitude);
this generates a result that is expected and agrees with the original authors formula: var dLon = VEToolkit.Math.ToRadian(latlng2.Longitude - latlng1.Longitude);
 
Example:
 
Start point: 26.67,39.150
End point: 49.01,2.55
Result: 37.65 (this is a north easterly bearing which is incorrect)
Result with modification: 318.249 (correct north westerly bearing)
 
This is with source code 5171. I did not study the conversion functions and a mathmetician I am most definitely not.
 
Thanks for the toolkit. Its been most helpful!

comments

crpietschmann wrote Jan 25, 2009 at 4:49 PM

I'll definitely look into this.

wrote Jun 11, 2009 at 7:32 PM

wrote Dec 20, 2010 at 1:47 PM

wrote Feb 13, 2013 at 8:12 PM