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

Rotations appear to be counter clockwise? #55

Open
alkirkby opened this issue Oct 1, 2024 · 1 comment
Open

Rotations appear to be counter clockwise? #55

alkirkby opened this issue Oct 1, 2024 · 1 comment

Comments

@alkirkby
Copy link
Collaborator

alkirkby commented Oct 1, 2024

I think rotations are being applied in the wrong direction (counter-clockwise).
When I rotate my site by -(angle) I get the same result as if I rotate by +(angle) in geotools.

The rotation matrix given in utils.calculator.rotate_matrix_with_errors is:
[[cos(phi) -sin(phi)]
[sin(phi) cos(phi)]]

but in Simpson and Bahr it is:
[[cos(phi) sin(phi)]
[-sin(phi) cos(phi)]]
to rotate a coordinate clockwise from north (+x).

@kujaku11
Copy link
Contributor

kujaku11 commented Oct 2, 2024

@alkirkby You're correct, I don't know how this got changed to counter-clockwise. I feel like we do this about once a year. I'll work on the fix. PR #57

@kujaku11 kujaku11 mentioned this issue Oct 3, 2024
5 tasks
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

No branches or pull requests

2 participants