Page 1 of 1

How to access the "stars.dat" file

Posted: 22.03.2005, 17:54
by Rocket Man
What program do I use to open the "stars.dat"?

I tried Notepad, It comes out in a whole bunch of symbols and squares.
I also tried Wordpad and MS Works Word Processor. Same thing happens.

Can anyone help me?







Sorry if I repeated this question.
Thanks.

Posted: 22.03.2005, 18:14
by ajtribick
Provided you are using a version of Celestia before 1.4.0, (i.e. stars.dat version 1.18 or below) then the file format is as follows:

4 byte integer - number of stars

followed by records of the form:

4 byte int : HIP catalog number
4 byte int : HD catalog number (this is missing in the README file)
4 byte float : right ascension
4 byte float : declination
4 byte float : parallax
2 byte int : apparent magnitude
2 byte int : stellar class
1 byte : parallax error

After the coordinate systems change, this format no longer applies. I haven't seen any documentation of the new stars.dat file format.

However, there is also the file stars.txt, available at the SourceForge site, from which stars.dat is generated. This file consists of the number of stars, followed by a series of records, one per line.

The format of each record is HIP number, coordinates, the apparent magnitude as seen from Earth and spectral type. I believe the coordinates are Cartesian (x,y,z) in light years, however I do not know the orientation of the axes in real space.

Posted: 22.03.2005, 18:19
by selden
Stars.dat is a binary file, not a text file. You can't read it using a text editor. Also, the file's format is changing drastically in Celestia v1.4.0.

What are you trying to accomplish?
There may be a better way of doing it.

Posted: 23.03.2005, 18:03
by Rocket Man
Well, I'm trying to create stars that show a wobble when they had planets orbiting around them. But I trying to figure out the all the RA, Dec, etc.

Posted: 23.03.2005, 18:22
by selden
It's best to get the official values for whatever stars you want to work on. Sometimes there are errors in Celestia's database.

Simbad is the easiest source:
http://simbad.u-strasbg.fr/sim-fid.pll

Posted: 26.03.2005, 17:13
by Rocket Man
Thank you.