Skip to content

Conversation

@JoePfeiffer
Copy link
Contributor

@JoePfeiffer JoePfeiffer commented Jun 30, 2025

In a couple of places, azimuth angles were being computed using atan2(y, x) instead of atan2(x, y), which sets angle 0 facing right instead of north. This PR corrects that.

Also, replaces instances of atan(a/b) with atan2(a, b) to avoid potential divide by 0 errors.

Fixes #2811

@JoePfeiffer JoePfeiffer marked this pull request as draft June 30, 2025 20:03
…produce correct results for all four quadrants.
@JoePfeiffer JoePfeiffer marked this pull request as ready for review June 30, 2025 20:47
@JoePfeiffer JoePfeiffer marked this pull request as draft July 1, 2025 16:00
@JoePfeiffer JoePfeiffer marked this pull request as ready for review July 2, 2025 20:22
@kjhambrick
Copy link

Thank You Joe !

Your changes work !!

-- kjh

@JoePfeiffer JoePfeiffer merged commit e4d9b27 into openrocket:unstable Jul 2, 2025
1 check passed
@JoePfeiffer JoePfeiffer deleted the fix-2811 branch July 27, 2025 00:37
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.

[Bug] OR > [Plot / Export] > [Export Data] > Lateral Direction is Incorrect

2 participants