Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct the equation for computeHeading() in Spherical.js, incorrect delta Longitude #1413

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrmattson
Copy link

The current implementation of OpenLayers.Spherical.computeHeading() is wrong based on the relevant link listed in Spherical.js. The delta of the longitudes is reversed in both the 'y' and the 'x' portion of the equations. Instead of from.lon - to.lon, it should be to.lon - from.lon.

The current implementation of OpenLayers.Spherical.computeHeading() is wrong based on the relevant [link](http://www.movable-type.co.uk/scripts/latlong.html) listed in Spherical.js. The delta of the longitudes is reversed in both the 'y' and the 'x' portion of the equations. Instead of `from.lon - to.lon`, it should be `to.lon - from.lon`.
@mrmattson mrmattson changed the title Update Spherical.js Correct the equation for computeHeading() in Spherical.js, incorrect delta Longitude Dec 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant