We have elliptical orbit and spacecraft travelling it. I need a formula to calculate a time needed for spacecraft to travel given amount of meters starting from it's current position.

Keplerian elements of orbit are known.

If I know difference between current and future true anomaly, I can use formula of orbital period to calculate that time but how to find the future anomaly by given orbital ellipse chord length (closest point) and initial true anomaly?

And also I need the same calculations for hyperbolic trajectory

  • $\begingroup$ I don't think there's any closed-form formula for arc-length along an arbitrary ellipse., and you'll likely have to result to numerical approximations. What is it that you are planning to do with this value? There may be much simpler options that give the results you want. $\endgroup$
    – notovny
    Nov 18, 2021 at 13:02
  • $\begingroup$ @notovny We can replace arc length by chord length. Is it calculable? $\endgroup$
    – Robotex
    Nov 18, 2021 at 13:07
  • 2
    $\begingroup$ As a starting point, what you want is an incomplete elliptical integral of the second kind. Some tools (e.g., Mathematica, MATLAB) provide implementations. (Most do not.) This starting point will provide the arc length from one time to another (alternatively, with a different formulation, arc length from one true anomaly to another). That's why I wrote "starting point". You want the inverse function of an incomplete elliptical integral of the second kind. I don't know of any tool that provides that. $\endgroup$ Nov 18, 2021 at 14:29

1 Answer 1


For any non-elliptical orbit (e.g. a hyperbolic orbit) or when the orbital dynamics are not just two-body dynamics with a single point mass, you'll need a numerical integrator like a Runge-Kutta 89.

You may use the local velocity vector as a bad approximation or initial guess to a Newton Raphston approach if you really don't want to use a numerical integrator, but that solution will likely not be good.

The whole reason people tend to use existing astrodynamic tools are because of the complexity in implementing orbital mechanics correctly, accurately, and fast.

  • $\begingroup$ Will it be easier if we replace the arc length by euclidean length to point (chord length)? $\endgroup$
    – Robotex
    Nov 18, 2021 at 17:05
  • 1
    $\begingroup$ @Robotex how accurate do you want the answer to be? you could certainly force some computation to give you a number, but unless you are very careful the number you find will be too wrong to be useful. One way I would advising reading ChrisR's answer is "even this seemingly simple thing requires serious numerical computation. Please learn to use an existing tool that will give you good answers, rather than try writing something from scratch that you'll never be able to test thoroughly." $\endgroup$
    – Ryan C
    Nov 18, 2021 at 22:48
  • $\begingroup$ @RyanC "Please learn to use an existing tool that will give you good answers" - I will not learn anything in that case $\endgroup$
    – Robotex
    Nov 19, 2021 at 9:05
  • 1
    $\begingroup$ @Robotex in that case, start with David Hammen's suggestion about elliptic integrals, since that will give you the exact solution if the orbit were actually an ellipse. After that, then start looking at numerical solution of the equations of motion, in order to measure the length of the curve that actually isn't an ellipse. I'm partial to predictor-corrector Adams-Bashforth-Moulton, but Runge-Kutta-Fehlberg or Dormand-Prince are also useful additions to your toolbox. $\endgroup$
    – Ryan C
    Nov 19, 2021 at 13:54
  • 1
    $\begingroup$ @ChrisR Adams methods are multistep, higher-order polynomial versions of the forward & backward Euler methods. Adams-Bashforth is the explicit predictor, and Adams-Moulton is the implicit corrector. They have good stability properties even when taking relatively large steps, at least in the sort of equations we have for orbits. I got into them because they were the best tool a software package I once needed to use had implemented so far. The book that convinced me to stick with them is Gerhard Beutler, Methods of Celestial Mechanics (2004), especially sections 7.4 & 7.5 $\endgroup$
    – Ryan C
    Nov 20, 2021 at 2:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.