I tried to take a look at the reference of the method coe2mee i.e. Walker 1985, which tells that there is a singularity if the inclination of the orbit is 180 degrees, although it removes any singularity problems with equatorial and/or circular orbits.
I think, due to the way np.tan works, it doesn't return any "singularity!" return value if the angle is 90 degrees, for example, but
returns a large value (of the order, say, 1e16).
So the question is, would it be a good choice the raise a warning or error if the inclination is 180 degrees instead of returning
unnecessary large values for some equinoctial elements? It also seems GMAT doesn't support modified equinoctial elements
for true retrograde equatorial orbits. But maybe such orbits could also be handled by having a retrograde factor?
This line also has a "TODO" to check for the polar case.
TODO: Check polar case (see [Walker, 1985])
Did it mean to add a test that checks for polar orbits (inclination = 90 degrees) or something else?
It seems, currently there are methods to convert from any two of the state pairs {classical, position-velocity, equinoctial}, except to convert from equinoctial to position-velocity. Would it be a good choice to add a method that does this? It looks like the description of this is given in this paper: https://doi.org/10.1007/BF01228432 under the section "5. Conversion from Equinoctial Elements to Position-Velocity ".
In this line, p is passed as a parameter but is returned unchanged. Would there be a choice to instead pass a and then calculate p = a * (1 - ecc ** 2) inside the method? Maybe p was passed intentionally for consistency reasons?
This issue is related to the
ModifiedEquinoctialState
class in twobody/states.py and its computation in core/elements.py.I tried to take a look at the reference of the method
coe2mee
i.e. Walker 1985, which tells that there is a singularity if the inclination of the orbit is 180 degrees, although it removes any singularity problems with equatorial and/or circular orbits.I think, due to the way
np.tan
works, it doesn't return any "singularity!" return value if the angle is 90 degrees, for example, but returns a large value (of the order, say,1e16
).So the question is, would it be a good choice the raise a warning or error if the inclination is 180 degrees instead of returning unnecessary large values for some equinoctial elements? It also seems GMAT doesn't support modified equinoctial elements for true retrograde equatorial orbits. But maybe such orbits could also be handled by having a retrograde factor?
This line also has a "TODO" to check for the polar case.
Did it mean to add a test that checks for polar orbits (inclination = 90 degrees) or something else?
It seems, currently there are methods to convert from any two of the state pairs {classical, position-velocity, equinoctial}, except to convert from equinoctial to position-velocity. Would it be a good choice to add a method that does this? It looks like the description of this is given in this paper: https://doi.org/10.1007/BF01228432 under the section "5. Conversion from Equinoctial Elements to Position-Velocity ".
In this line,
p
is passed as a parameter but is returned unchanged. Would there be a choice to instead passa
and then calculatep = a * (1 - ecc ** 2)
inside the method? Maybep
was passed intentionally for consistency reasons?Thanks!