Shameless self-plug: I made a catalog of the BSC5P that has 3D positions, colour, and other goodies ready for use:
It is released to public domain under CC0.
In case it's useful, I detail below how I created it.
Obtaining the raw data
I started with the BSC5P data from HEASARC,
but 95% of the stars in that catalog had no parallax information.
I then searched for an online catalog that could be queried for information. Gaia seemed like a good source, but the query engine is very complicated. I finally found the SIMBAD Astronomical Database, which has an API for obtaining star info by any name you have for that star. I wrote a script capable of querying SIMBAD. Then, using the all the star names obtained from HEASARC's BSC5P, I pulled all data SIMBAD had on each star in the BSC5P.
As a side note, if you wish to automate SIMBAD queries, please keep your queries to 4 or less per second to prevent flooding their system.
Processing the raw data
I wrote another script to process the downloaded SIMBAD data. I found that roughly 50 of the 9110 stars still had missing parallax. It's a huge improvement over 8600+ stars with missing parallax, so I kept it. For that remaining ~50, I eventually manually researched every individual one and added parallax in myself. This is done via yet another script I wrote, which exists purely as an amendment mechanism that modifies SIMBAD data mid-parse-stage to output a single unified catalog.
With all stars now having right ascension, declination, and distance, we can estimate coordinates. The only real issue here is uncertainty in distance: some stars have wildly uncertain values (Betelgeuse for example is somewhere between 153 and 196 parsecs away - that's a huge amount of variation). Being 3D however, we cannot place a single star in a range of somewhere and somewhere else - it needs to be in a single location. The compromise in this case is that we discard uncertainty and pretend the star is in the middle of that range (this is stated in the catalog's README as well).
The simplest way I could come up with to create the 3D positions are as follows:
- Create an object in a 3D space at position
0,0,0. We'll call this the center of the ecliptic.
- Align the 3D object with the world's 'forward' direction.
- Set the rotation of the object to the star's right ascension, converted from time units to degrees.
- Rotate the object along the star's declination.
- Move that object along its new forward-facing direction. Distance moved is
1 / parallax, or star distance in parsecs.
- Record the object's new 3D position.
The script that generates the 3D coordinates may be found here. It uses three.js for the 3D calculations.