How Can I Calculate the Distance of an Object in an Elliptical Orbit Over Time?

Click For Summary
SUMMARY

The discussion focuses on calculating the distance of an object in an elliptical orbit over time, specifically using Kepler's laws of planetary motion. The participants emphasize that there is no analytic solution for this problem, necessitating the use of numerical methods such as Newton's method for approximation. A practical approach involves using a spreadsheet to compute the mean anomaly and eccentric anomaly, ultimately allowing for the plotting of distance as a function of time. The example provided includes simulating orbits with varying eccentricities and periods using Gravity Simulator.

PREREQUISITES
  • Understanding of Kepler's laws of planetary motion
  • Familiarity with mean anomaly and eccentric anomaly calculations
  • Basic knowledge of numerical methods, particularly Newton's method
  • Proficiency in using spreadsheet software for data analysis and plotting
NEXT STEPS
  • Study Kepler's laws of planetary motion in detail
  • Learn about Newton's method for solving equations numerically
  • Explore the use of spreadsheets for plotting mathematical functions
  • Investigate simulation tools like Gravity Simulator for orbital mechanics
USEFUL FOR

Astronomy students, physicists, and anyone interested in orbital mechanics and numerical simulations of celestial bodies will benefit from this discussion.

Texas2011
Messages
2
Reaction score
0
What would the equation be for the distance of an object orbiting another object in an elliptical orbit with time as the variable? How would I derive this equation?

A comet would be an example. I am looking for the equation that would plot the distance from the sun at any given time.
 
Astronomy news on Phys.org
Welcome to PF!

The short answer is that, depending on your background, it may be a little bit involved. You can get a short summary of what is needed at [1]. If you want a more thorough introduction there should be plenty of astronomy textbooks to choose from at various levels. If you have specific questions to this derivation or to astronomy in general you are of course free to ask them here.

[1] http://en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion#Position_as_a_function_of_time
 
Although I did it in college and generally understand it, it has been a while since I have tried to use polar coordinates and calculus. I will probably have to devote some time if I want to understand the derivation.

If I wanted to plot the distance as a function of time with t=0 being the closest the object would get, how would I do it? I appreciate your help.
 
I'm wondering if there is an analytic solution. I've seen this question asked before, but never answered. Googling for "eliptical orbit distance as a function of time" returns a thread from this forum started by me 4 years ago.
 
Texas2011 said:
If I wanted to plot the distance as a function of time with t=0 being the closest the object would get, how would I do it? I appreciate your help.
Follow the steps in the WP article. To do step #2, you will have to do some kind of iterative method such as Newton's method: http://en.wikipedia.org/wiki/Newton's_method

tony873004 said:
I'm wondering if there is an analytic solution.
No, there isn't.
 
Texas2011 said:
...I am looking for the equation that would plot the distance from the sun at any given time.

bcrowell said:
...No, there isn't.
With no equation, you'll have to plot it using numerical methods. Here's my attempt. In Gravity Simulator, I created 10 planets with semi-major axes of 100,000,000 km from the Sun. This gives them a period of 200 days. I gave them eccentricities of 0.0 to 0.9. I then output their positions to Excel once a day for 200 days. I then computed their distances from their positions and plotted the results. Along the x-axis, time is expressed as a fraction of 200 days, so 1 means 200 days. Along the y-axis, I expressed distance is a fraction of semi-major axis, so 1 = 100,000,000 km. These 2 axes should scale to any planet at any distance.

http://orbitsimulator.com/BA/distanceVStime.GIF
 
Texas2011 said:
If I wanted to plot the distance as a function of time with t=0 being the closest the object would get, how would I do it?

If you have access to a spreadsheet or similar you can fairly easy make such a plot based on an approximation of the radius.

First you have mean anomaly

M = \frac{2 \pi T}{P}

where T is the time since last periapsis passage and P is period, both values expressed in same time unit. From M you now have to solve Keplers equation to get eccentric anomaly E which relates to mean anomaly M as

M = E -e\sin E

In a program you would normally solve this equation numerically by iteration until a desired accuracy is obtained. In a spreadsheet you can instead use a fixed approximation like (taken from [1])

E \approx M+\left(e-\frac{e^3}{8}\right)\sin M + \frac{1}{2}e^2 \sin 2M + \frac{3}{8}e^3 \sin 3M

if eccentricity is not too large, or you can set up a fixed number of fast converging iterations, like using Newton's method (see for instance [2]) to get

E_{i+1} = E_i + \frac{M+e\sin E_i - E_i}{1-e\cos E_i}

with all angles in radians and E_0 = M for e < 0.8 and E_0 = \pi otherwise. In a spreadsheet you can set up a fixed number of successive columns to calculate E_i and then use the last approximation as E.

From eccentric anomaly E you can calculate the normalized radius as

\rho = \frac{r}{a} = 1 - e \cos E

where a is the semi-major axis. In a spreadsheet you can now plot \rho as a function of time or mean anomaly. Notice that I skipped calculating the so-called true anomaly and went straight to radius. The true anomaly would for instance be needed in addition to the radius if you wanted to plot the 2D position instead of only the radius.

As you can see, apart from finding a good approximation for E, the rest is rather simple. Feel free to ask if some of the above is too hazy for you.


[1] Orbital Motion, A.E. Roy, Adam Hilger, 1988.
[2] Weisstein, Eric W. "Kepler's Equation." From MathWorld -- http://mathworld.wolfram.com/KeplersEquation.html
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 30 ·
2
Replies
30
Views
3K
  • · Replies 27 ·
Replies
27
Views
7K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K