1

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

Robotex
  • 604
  • 6
  • 13
  • 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. – notovny Nov 18 '21 at 13:02
  • @notovny We can replace arc length by chord length. Is it calculable? – Robotex Nov 18 '21 at 13:07
  • 2
    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. – David Hammen Nov 18 '21 at 14:29

1 Answers1

2

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.

ChrisR
  • 6,220
  • 19
  • 43
  • Will it be easier if we replace the arc length by euclidean length to point (chord length)? – Robotex Nov 18 '21 at 17:05
  • 1
    @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." – Ryan C Nov 18 '21 at 22:48
  • @RyanC "Please learn to use an existing tool that will give you good answers" - I will not learn anything in that case – Robotex Nov 19 '21 at 09:05
  • 1
    @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. – Ryan C Nov 19 '21 at 13:54
  • @Robotex, apologies if that's how my answer came across. What I tried to say is to use a Runge Kutta 89 numerical integrator (or write one if you want). Then, write the equations of motion for orbital dynamics using Cartesian coordinates (I believe that Keplerians EOMs will fail with hyperbolic orbits because of negative SMA, but in any case, they aren't precise). Then, program an interpolation scheme (Hermite or other) to interpolate the trajectory. Finally, implement a Brent solver to search the trajectory for the desired true anomaly. – ChrisR Nov 19 '21 at 17:07
  • @RyanC I'm curious about your thoughts on Adams Bashforth compared to Runge Kutta. I've always used RKs, but could be convinced to switch Adams Bashforth. Isn't it an implicit integrator? – ChrisR Nov 19 '21 at 17:38
  • @ChrisR too hard for my brain ) – Robotex Nov 19 '21 at 19:14
  • 1
    @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 – Ryan C Nov 20 '21 at 02:22
  • Can you give me some example? – Robotex Nov 25 '21 at 11:14
  • @Robotex an example on what? – ChrisR Nov 27 '21 at 00:27