How to access the "stars.dat" file

General discussion about Celestia that doesn't fit into other forums.
Topic author
Rocket Man
Posts: 87
Joined: 06.01.2005
With us: 19 years 10 months
Location: Marysville, Ohio

How to access the "stars.dat" file

Post #1by Rocket Man » 22.03.2005, 17:54

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.
"Knowledge is truth of reality, Wisdom is the reality of the truth."
-Rocket Man

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 3 months

Post #2by ajtribick » 22.03.2005, 18:14

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.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #3by selden » 22.03.2005, 18:19

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.
Selden

Topic author
Rocket Man
Posts: 87
Joined: 06.01.2005
With us: 19 years 10 months
Location: Marysville, Ohio

Post #4by Rocket Man » 23.03.2005, 18:03

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.
"Knowledge is truth of reality, Wisdom is the reality of the truth."

-Rocket Man

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #5by selden » 23.03.2005, 18:22

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
Selden

Topic author
Rocket Man
Posts: 87
Joined: 06.01.2005
With us: 19 years 10 months
Location: Marysville, Ohio

Post #6by Rocket Man » 26.03.2005, 17:13

Thank you.
"Knowledge is truth of reality, Wisdom is the reality of the truth."

-Rocket Man


Return to “Celestia Users”