# How to calculate a planets position

This topic is 5136 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 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 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 on other sites
have you looked here?
http://cfa-www.harvard.edu/iau/Ephemerides/SoftwareEls.html

##### 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 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

1. 1
2. 2
3. 3
4. 4
Rutin
12
5. 5

• 12
• 18
• 10
• 14
• 10
• ### Forum Statistics

• Total Topics
632662
• Total Posts
3007702
• ### Who's Online (See full list)

There are no registered users currently online

×