Couple things to change. Rather than consider each frame the epoch, Have r0 and v0 set at the true epoch, initialization of the orbit.
Next, for the actual Newton's method calculation of x, still update x by reference as now, but consider iteration complete when t-tn is sufficiently small, not at "deltaX"
Should still converge very rapidly as x should be small. Using x by reference as I am now only makes sense when the timeOfFlight corresponds to those values of r0 and v0.
Couple things to change. Rather than consider each frame the epoch, Have r0 and v0 set at the true epoch, initialization of the orbit.
Next, for the actual Newton's method calculation of x, still update x by reference as now, but consider iteration complete when t-tn is sufficiently small, not at "deltaX"
Should still converge very rapidly as x should be small. Using x by reference as I am now only makes sense when the timeOfFlight corresponds to those values of r0 and v0.