from_state_vector: Fixed circular inclined orbits having arg_pe = nan#47
Open
mgiuca wants to merge 3 commits into
Open
from_state_vector: Fixed circular inclined orbits having arg_pe = nan#47mgiuca wants to merge 3 commits into
mgiuca wants to merge 3 commits into
Conversation
Adds a missing check for the case where the eccentricity vector is in the third or fourth quadrant, requiring arg_pe to be negated. Note that this causes an edge case where arg_pe should be 0° but it comes out as 360° because we are not using modulo, but rather adding 2*pi. I didn't want to fix that in this commit because all the calculations in from_state_vector behave the same way. Fixes RazerM#39.
When negating an angle, consistently use mod 2*pi instead of adding 2*pi. This causes 0 to remain as 0 instead of becoming 2*pi.
This was caused by missing check for the case where e ~= 0 when orbits are inclined, thus dividing by the eccentricity resulted in a divide-by-zero. Fixes RazerM#38.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was caused by missing check for the case where e ~= 0 when orbits are inclined, thus dividing by the eccentricity resulted in a divide-by-zero.
Fixes #38.
This is intended to be based on top of PR #46.