I've searched high and low and I haven't been able to find a formula for this.

I'm trying to calculate the time it will take to transit through a defined arc length of an elliptical orbit, whose start and end points are equidistant from a predefined point:

arc length

I already have the arc length, and I know how to find my instantaneous velocity at any point along the orbit. What I don't know is how to calculate the time it will take to complete that arc length, since the object will be constantly changing velocity through the transit.

Can I just take an average of my velocities at the start, end, and midpoint of the arc? The start and end points should be the same value, right?

Say my velocity is 9900m/s at the start of my arc, 10100m/s at periapsis, and 9900m/s again at the end of the arc. Can I just divide the length of the arc by the average of those velocities to get the transit time, or will it be more complicated?

UPDATE: I think I've solved the problem using simple geometry! I realize this would be easier with calculus, but I haven't learned it yet, so for now, I'll stick to this solution.

Here's a gif of the calculator in action: https://gfycat.com/GleefulSaneHypacrosaurus

I went with Kepler's second law, as per the answer @rob suggested. But I had to do a little trick, because I couldn't figure out how to calculate the area of the arc sector from a focus and Geogebra only lets you find the area of a sector from the center.

So, I made a triangle from the center to each end point of the arc, and subtracted that area from the area of the arc sector including the curved section, so that I only ended up with the area of the curved section.

After that, I just add the area of the curved section to the area of a triangle from the focus occupied by the planet to the two end points of the arc to get the total area swept out during that section of orbit.

Then I went ahead and divided the total area of the ellipse by the area of that sector.

Finally, I took the total orbital period, and divided that by the number returned from the previous step. This gives a number in seconds that looks reasonable, and returns correct values when the eccentricity is very close to 0.

But, I'm only about 99.99% sure it's correct. Can anybody confirm my results? I really appreciate everybody's help, but again, calculus is just a bit over my head right now.

  • $\begingroup$ Closed form solutions for the time dependent trajectories are not known, however, one can express the solutions with a set of newly defined functions as e.g. this recent publication shows: file.scirp.org/Html/12-4500390_52772.htm. In practice numerical integration is probably easier and quite cheap on a modern computer. $\endgroup$ – CuriousOne Jul 17 '16 at 5:39
  • $\begingroup$ Hi, @blorgon. I have rolled back your update because you accidentally deleted your original question. The information you added is in the edit history if some of should be included with your question, but I felt like your edit invalidated some of the answers you already had. $\endgroup$ – rob Jul 18 '16 at 2:42
  • $\begingroup$ @rob, no problem! I've updated the OP again, this time including the original question, and with the update at the bottom of the post. I hope this is okay. $\endgroup$ – blorgon Jul 18 '16 at 5:37

What you need is Kepler's equation, $$M = E - e \sin E$$ where $M$ is a quantity called the mean anomaly, e is the eccentricity of the orbit, and $E$ is called the eccentric anomaly, defined by this diagram where the sun is at $F$ and $C$is the center of the ellipse (the distance $e$ in the diagram should be $ae$). eccentric anomaly

The quantity $M$ is simply $2\pi t/T$ where $T$ is the orbital period and $t$ is measured such that $t = 0$ at periapsis (so that $M = 0$ coincides with $E = 0$). Thus if you can calculate the eccentric anomaly for two points on the orbit, say $E_1, E_2$, the transit time $\tau$ is $$\tau = \frac{T}{2\pi} (M_1 - M_2) = \frac{T}{2\pi} \bigg ( E_1 - E_2 - e (\sin E_1 - \sin E_2) \bigg)$$

It may be the case that the angle $f$ in the diagram above, called the true anomaly is easier to calculate. In that case, $f$ and $E$ are related by $$\tan \frac{f}{2} = \sqrt{\frac{1+e}{1-e}} \cdot \tan \frac{E}{2}$$ which can be solved for $E$.


Given your instantaneous velocity $\vec{v}(\vec{x})$ , and your start and end points, say $p_{1},p_{2}$ , just integrate it in space:

$$\triangle t=\intop_{p_{2}}^{p_{1}}(\frac{d\vec{x}}{dt})^{-1}d\vec{x}$$

  • $\begingroup$ Whoa. I've never done integrals before, so I'm honestly not exactly sure what I'm looking at. Am I out of luck until I learn this kind of math? $\endgroup$ – blorgon Jul 17 '16 at 6:03
  • $\begingroup$ You are not. dx/dt is your velocity, you can input your known values into any integral solver online and it will help you. I'm sure you can figure it out from there. (: Happy hoorbiting $\endgroup$ – R. Rankin Jul 17 '16 at 10:41
  • $\begingroup$ I've looked up integrals, and I think I'm starting to understand, but maybe not, so I want to run this by you. When you say to integrate p1 and p2, you're talking about p1 being 0, and p2 being the length of the arc, yes? dx/dt is analogous to m/s? Is the dx that's all by itself then equal to the length of the arc? What point do I pick for my velocity in (dx/dt)? I'm actually using Geogebra to build my ellipse, and am simulating a spacecraft as a point travelling on the ellipse. So I think I'm getting my velocity confused with the actual x-value of some points on the graph? $\endgroup$ – blorgon Jul 17 '16 at 20:03
  • $\begingroup$ If you don't have an explicit function for velocity (I thought you had), but you can find it at every point..graph it out. The function that matches that curve is the velocity. Also, as you and others have suggested, you may take an approximation $\endgroup$ – R. Rankin Jul 17 '16 at 20:16
  • $\begingroup$ Maybe I'm confused. I thought the formula for velocity was sqrt(GM((2/r) - (1/a))), which I'm using. For clarification, I'm using Geogebra to do these calculations. Specifically, I'm trying to solve for dark side transit times. So I have an ellipse that is defined by the user's input of apoapsis and periapsis, and I have the width of the planet's shadow, which defines the end points of the elliptical sectors I'm trying to find the transit time for. $\endgroup$ – blorgon Jul 17 '16 at 21:32

R. Rankin's answer gives you the general solution when the velocity along a curve is known. If you're interested in elliptical orbits due to gravitational interactions, you can use Kepler's laws.

Kepler's second law says that the time required for an object on an elliptical orbit is proportional to the area swept out by a line connecting the orbiting body to the focus of the ellipse. So one technique would be to compute the area corresponding to the arc segment you're interested as a fraction of the total area ($A=\pi a b$ for an ellipse with semi-major and -minor axes $a,b$), which gives you the time required as a fraction of the period of the orbit.

If the interval around apoapsis that interests you is small (as suggested in your figure) and your requirements for numerical precision are modest, you might be able to represent the relevant slice of ellipse with one or two triangles, whose area is quite easy to compute. If you need more precision, use more triangles to follow the curve more closely. (This is numerical integration.)

  • $\begingroup$ Thanks for this answer. Could you take a look at the OP? I've updated it with what I think is a solution that I found. $\endgroup$ – blorgon Jul 17 '16 at 23:54

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