Take the 2-minute tour ×
Astronomy Stack Exchange is a question and answer site for astronomers and astrophysicists. It's 100% free, no registration required.

I am trying to build an astronomy app that will use the user's latitude and longitude, along with the current date and time, to create a 3D view of the celestial sphere as seen based on that data. However, the information I've found so far has been very general and less-than-practical, and has included virtually nothing about how to take date and time into account.

Does anybody know of a more concrete source of information on sky mapping in this way?

share|improve this question
    
It occurs to me that you could progress development in stages. Ignore the user's position, and general a stellar map of the entire sky in all directions from catalogues. Then add in solar system objects and anything else you need orbital mechanics for, and introduce the timescale. Then you can offset the user's position to a specific point on the surface of the Earth and hide (or not) the stars below the horizon. –  Jeremy Apr 17 at 23:07

3 Answers 3

If you want to use the user's co-ordinates (longitude and latitude) to calculate the topocentric co-ordinates of an object to a not very high accuracy then you should be able to find a few software libraries (e.g. libnova) that do just that. Many use the algorithms from Jean Meeus' book Astronomical Algorithms. You can use catalogues such as the Bright Star Catalogue to find the equatorial co-ordinates of a star and then use the algorithms in this book to convert to topocentric co-ordinates (also called 'apparent place of a star'). Of course if you only want to calculate the 3D positions of stars, then it would be useless to use topocentric co-ordinates as the distances to the stars are so great that the error introduced by using geocentric (centre of the earth) instead of topocentric (position on earth) is very very small compared to the distance to the stars.

If you want to calculate the position of solar system object (planets, asteroids and comets) than you would need to be able to calculate the position of these objects to a very high precision. Meeus' book and software libraries derived from his book contain these algorithms. For planets you could use VSOP, but many software libraries include these. Meeus' book also includes algorithms to calculate the positions of the Moon and Pluto and the moons of the major planets. For asteroids and comets you can get the data needed for the algorithms from the IAU Minor Planet Center.

For high accuracy the algorithms provided in these libraries will not suffice and you may need to use professional software libraries such as NOVAS or SOFA. But then you are in milliarcsecond accuracy.

share|improve this answer

I think you should think of something in the area of apps that have a (public) API, and from there you could build up your own.

APIs I can think of are those of Google Earth. You can find a reference here.

share|improve this answer

You can look at the code of the Free application Kstars. All formulas you may need are already programmed there.

That is the good about Free Software.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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