Jump to content
• Advertisement

# How to calculate sun and planets positions around the Earth by real date and time?

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

If you intended to correct an error in the post then please contact us.

## Recommended Posts

Hello! Hello!

This is very interesting question! Ive read a lot of articles saw a lot of sources and dont understand yet. But first of all.

I m making Google Earth like 3d Earth programm, and interesting how to place the Sun to the right place respect the Earth. I have date and time. Could you help me(and maybe other google searching people) to understand how to place the sun(and maybe other planets) to the right place in 3d cartesian space by date time.

Thank You!

#### Share this post

##### Share on other sites
Advertisement

Celestia is an open source piece of software that shows positions of these objects at any given time. You could just look at their source code: http://www.shatters.net/celestia/index.html

#### Share this post

##### Share on other sites

Great sources so much help functions! Thank you for advice. But It's hard to understand whole algrorithm step by step.

#### Share this post

##### Share on other sites

Great sources so much help functions! Thank you for advice. But It's hard to understand whole algrorithm step by step.

You could also look at this: https://en.wikibooks.org/wiki/Celestia/Trajectories#Introduction (try the elliptical orbits part) and this:

if you're not familiar with what those parameters discussed are.

#### Share this post

##### Share on other sites

how to place the Sun to the right place respect the Earth

place the earth in it correct position with respect to the sun, then move the camera to the earth (or solve for where the sun would be w/ respect to the earth - IE reverse everything).

starting from a known time and position, you can solve for position at any given time, since you know the average orbit radius and the period of orbit.

#### Share this post

##### Share on other sites

Thanks! And another one question: I see that celestia app use in TAI time only seconds but what about milliseconds? Is it necessary if I want use sattellites for example?

And I see that celestia uses VSOP87 is it model for calculation ephemerides, do I understand right?

Edited by Turbochist

#### Share this post

##### Share on other sites

Thanks! And another one question: I see that celestia app use in TAI time only seconds but what about milliseconds? Is it necessary if I want use sattellites for example?

Milliseconds should not be needed for anything you are likely to program orbiting anything else.

And I see that celestia uses VSOP87 is it model for calculation ephemerides, do I understand right?

Yes.

#### Share this post

##### Share on other sites

What do you think is a good idea to use VSOP87 model for real time earth moon etc. positioning? Or may be better to use some easier model? I'm working on "google earth like" program and wand to chose more effective and fast method for visualization. What do you think?

#### Share this post

##### Share on other sites

What do you think is a good idea to use VSOP87 model for real time earth moon etc. positioning? Or may be better to use some easier model? I'm working on "google earth like" program and wand to chose more effective and fast method for visualization. What do you think?

Celestia basically is a "Google Earth" type program that models (chiefly) our sector of the galaxy, including real time orbits and positions, and they seem to be using VSOP87 just fine.

#### Share this post

##### Share on other sites

What do you think is a good idea to use VSOP87 model for real time earth moon etc. positioning? Or may be better to use some easier model? I'm working on "google earth like" program and wand to chose more effective and fast method for visualization. What do you think?

Celestia basically is a "Google Earth" type program that models (chiefly) our sector of the galaxy, including real time orbits and positions, and they seem to be using VSOP87 just fine.

Yep, but i work with javascript realtime rendering, and am fraid that it couldbe hard for VSOP87.

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
Rutin
21
3. 3
4. 4
A4L
15
5. 5
khawk
14
• Advertisement

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633742
• Total Posts
3013634
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!