Item 2 of 3 Previous | Next

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!

No files are attached

comments

crpietschmann wrote Jan 25 2009 at 4:49 PM

I'll definitely look into this.