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

Propagator kepler crashes when propagating a hyperbolic orbit 0 seconds #477

Closed
Juanlu001 opened this Issue Oct 22, 2018 · 7 comments

Comments

2 participants
@Juanlu001
Copy link
Member

Juanlu001 commented Oct 22, 2018

Comes from #474, by @TimothySHamilton

There is an untested code path that would make the kepler propagator crash if the eccentricity is greater than 1 and the propagation time is 0:

xi_new = (np.sign(tof) * (-1 / alpha)**.5 *
np.log((-2 * k * alpha * tof) /
(dot_r0v0 + np.sign(tof) *
np.sqrt(-k / alpha) * (1 - norm_r0 * alpha))))

This is similar to #328, but on a different level. It should be easy to fix, and requires us to add this code to propagate:

if time_of_flight.value == 0:
    return orbit

We should strive to make this change for all the methods, as an efficiency measure.

@aarribas

This comment has been minimized.

Copy link

aarribas commented Oct 24, 2018

Since it's an easy fix, may I take care of it as an entry point to contribute to the project?

@Juanlu001

This comment has been minimized.

Copy link
Member Author

Juanlu001 commented Oct 24, 2018

@Juanlu001

This comment has been minimized.

Copy link
Member Author

Juanlu001 commented Oct 24, 2018

@aarribas and I forgot to say: thanks so much! :)

@aarribas

This comment has been minimized.

Copy link

aarribas commented Oct 25, 2018

I had in mind to include the test(s) too, of course.

@aarribas

This comment has been minimized.

Copy link

aarribas commented Oct 25, 2018

I noticed the function documentation comments are not consistent : Kepler function has none whereas mean_motion has some. The parameters are also inconsistently commented. May I also improve on that? Incidentally, I had a look at other .py in /core and noticed that a lot of doc comments where removed when the functions where "jitted". Was this intented? I found them useful.

@Juanlu001

This comment has been minimized.

Copy link
Member Author

Juanlu001 commented Oct 25, 2018

@aarribas definitely - documentation is important to us, and if you noticed these inconsistencies we would be very happy if you fixed them as well (perhaps in separate commits though, so the review is easier). Also, we moved lots of functions to core in a rush, the day of the release, and at 3 AM local time, so I admit we probably missed lots of docstrings in the process.

@Juanlu001

This comment has been minimized.

Copy link
Member Author

Juanlu001 commented Jan 3, 2019

Fixed in #527

@Juanlu001 Juanlu001 closed this Jan 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.