Sign in to follow this  
mdias

How to calculate a planets position

Recommended Posts

Hi, I'm trying to make an app that shows the current position of a planet (i.e. the Earth). I know there are some "orbital elements" that we must know in order to calculate a planets position, but where do I get those and how do I use it to calculate a planets position? I tried googling but with no luck. Can anyone please help me? thanks in advance.

Share this post


Link to post
Share on other sites
You'll need to know Newton's gravitational law, "f=m1*m1*G/(r*r)" and how to use forces and newton's second law (f=ma), that's it.
Look these laws up on the internet - I haven't got enough time to go into the details otherwise I would explain here.

Share this post


Link to post
Share on other sites
Do you want to simulate orbital motion of planets, or just display the results? How accurate do you want / need this to be? Do you need to run the calculations in real-time? Do you need to actual relative positions of the planets in this solar system, or is a rough representation of the solar system ok? You could ignore where everything is in its orbit, and just consider the orbits' radii by using something like (x, y) = (radius*cos(w*t), radius*sin(w*t)). You could also write a hugely complicated numerical simulation that takes into account the interactions between all the planets with eachother as well as the sun. Do you want an explanation of how to caculate the planets' movements, or just some information about what their "current" positions are in reality?

Share this post


Link to post
Share on other sites
Or here:

http://ssd.jpl.nasa.gov/horizons.html

Accurately modeling planetary motion is not a trivial task. But, you might also want to consider Kepler's third law, the law of harmonic motion. (Plantary arcs sweep out equal areas in equal times, but the orbits are elliptical).

Share this post


Link to post
Share on other sites
Thank you guys, I did it with the help of google and the help from the links you posted :)

Geoff the Medio: I just wanted to know the plants position relative to the sun so I could represent them in 3D.

Thank you very much guys, you rock :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this