You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made a bit of progress here: GetDTForTrueAnomaly can sometimes return a number greater than one period (implying that it is not the earliest occurrence of that tA), and GetDTforTrueAnomalyAtUT can return a negative number.
The connection to timewarp is that when activating warp in the second half of your orbit, your mean anomaly is negative while ObTAtEpoch is positive. When not in timewarp, your epoch is constantly updating to the current UTC and ObT and ObTAtEpoch are the same.
GetDTForTrueAnomaly should subtract a whole number of periods such that the result is always in [0,period), and GetDTforTrueAnomalyAtUT tries to do this but actually ends up ROUNDING the number of periods instead of taking the floor, which can produce a negative number when it rounded up. Fixing these two issues makes the intercept work again in timewarp. HOWEVER the intercept when not in warp starts flickering. It looks like the very end of the intercept calculation is a gradient descent solver that runs over the entire synodic period of the two orbits. This seems excessive, because we should already know roughly where the close approaches are. I'd guess that the instability of the intercept is related to that, but I haven't dug in yet.
In the attached saved game my current ship is about to encounter the Mun. If you activate timewarp, the intercept disappears.
quicksave.zip
The text was updated successfully, but these errors were encountered: