<p>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. <a href="http://libnova.sourceforge.net" rel="nofollow">libnova</a>) that do just that. Many use the algorithms from Jean Meeus' book Astronomical Algorithms. You can use catalogues such as the <a href="http://cdsarc.u-strasbg.fr/viz-bin/Cat?V/50" rel="nofollow">Bright Star Catalogue</a> 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.</p>

<p>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 <a href="http://cdsarc.u-strasbg.fr/cgi-bin/myqcat3?VI/81/" rel="nofollow">VSOP</a>, 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 <a href="http://www.minorplanetcenter.net/iau/Ephemerides/EphemOrbEls.html" rel="nofollow">IAU Minor Planet Center</a>.</p>

<p>For high accuracy the algorithms provided in these libraries will not suffice and you may need to use professional software libraries such as <a href="http://aa.usno.navy.mil/software/novas/novas_info.php" rel="nofollow">NOVAS</a> or <a href="http://www.iausofa.org" rel="nofollow">SOFA</a>. But then you are in milliarcsecond accuracy.</p>

CC BY-SA 3.0
2014-06-23T13:48:46.623Z
2014-06-23T13:48:46.623Z
Dieudonné
<p>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.</p>

<p>APIs I can think of are those of Google Earth. You can find a reference <a href="https://developers.google.com/earth/documentation/reference/" rel="nofollow">here</a>.</p>

CC BY-SA 3.0
2014-04-23T21:32:07.640Z
2014-04-23T21:32:07.640Z
harogaston
<p>You can look at the code of the Free application Kstars. All formulas you may need are already programmed there.</p>

<p>That is the good about Free Software.</p>

CC BY-SA 3.0
2014-07-23T16:54:53.150Z
2014-07-23T16:54:53.150Z
Envite
<p>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.</p>

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

CC BY-SA 3.0
2014-04-17T23:07:59.970Z
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
<star-gazing><algorithm>
Are there standard algorithms and procedures for creating unique sky maps based on latitude/longitude/date/time?
John
# Are there standard algorithms and procedures for creating unique sky maps based on latitude/longitude/date/time?

(Asked by: username_0 on 2014-04-16)

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?

**Tags:** star-gazing, algorithm
> **Comments:**
> **username_1**: 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.  

---

## 3 answers

### Answer by username_2 on 2014-06-23. Score: 2

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](http://libnova.sourceforge.net)) that do just that. Many use the algorithms from Jean Meeus' book Astronomical Algorithms. You can use catalogues such as the [Bright Star Catalogue](http://cdsarc.u-strasbg.fr/viz-bin/Cat?V/50) 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](http://cdsarc.u-strasbg.fr/cgi-bin/myqcat3?VI/81/), 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](http://www.minorplanetcenter.net/iau/Ephemerides/EphemOrbEls.html).

For high accuracy the algorithms provided in these libraries will not suffice and you may need to use professional software libraries such as [NOVAS](http://aa.usno.navy.mil/software/novas/novas_info.php) or [SOFA](http://www.iausofa.org). But then you are in milliarcsecond accuracy.


---

### Answer by username_3 on 2014-04-23. Score: 0

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](https://developers.google.com/earth/documentation/reference/).


---

### Answer by username_4 on 2014-07-23. Score: 0

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.


---

