-
-
Notifications
You must be signed in to change notification settings - Fork 282
farnocchia
propagator returns NaN
for some orbits
#1296
Comments
Hi Yash-10, I noticed a few things:
Note: I haven't used poliastro in a while, so I am not an expert on the package. I hope this helps a bit. |
Thanks @WolfsSky for chiming in! Indeed, both orbits are hyperbolic. In any case, the problem seems to be that, while
Therefore, let's rule out |
rv
as NaN
when extracted from Ephem
farnocchia
propagator returns NaN
for some orbits
Had some time so did a bit of debugging. All outputs are
poliastro/src/poliastro/core/angles.py Line 38 in 069167a
Maybe the solution could be to raise a non-convergence warning. However, it might be also good to investigate the cause of this non-convergence. |
Thanks a lot for the thorough debugging @Yash-10 ! Do you know if it does converge increasing the number of iterations? Or does it just diverges? |
Interestingly, it does seem to converge (i.e. The default no. of iterations for poliastro/src/poliastro/core/angles.py Line 327 in 069167a
So maybe increasing |
Interesting! Well, the problem here I think is that there will always be an orbit that will not converge. Unless we set I see three options:
Thoughts? |
Oh, I see. Well, I guess slightly different initial guesses will have slightly different numerical performance. If reverting #1247 fixes this issue, then let's do that and add a regression test, so we don't forget again. Maybe Vallado didn't test his initial guess with super high eccentricity orbits like this one? And even if they seem rare, I wouldn't be surprised if orbits like this emerge in impact trajectories or things like that. |
Closed in #1444. |
I tried to create ephemerides for an orbit that had a very small period (
9.3605811e-8s
).Output
For any
t < 100 * u.s
, the values were non-nan, whereas they start to become nan from the 100s mark.I initially thought this might be because the period of the orbit is small whereas
tof
is high. I tried with another orbit, again with a small period of (8.3325481e-5s
) but I got a non-nan result:gives
Also, for an orbit with a period of
1.0245247e-7s
, the output values are nan.Any suggestions on this would be helpful. Thanks!
The text was updated successfully, but these errors were encountered: