Help needed on stars.dat format

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Mutos
Posts: 75
Joined: 15.07.2002
With us: 22 years 4 months
Location: France

Help needed on stars.dat format

Post #1by Mutos » 11.01.2003, 07:57

Hi everyone,


I'm developping a new version of the Hyperspace Topology Editor for my Hoshikaze 2250 Sci-Fi universe. I decided to work on the Celestia dataset as it's the best I've found around. So i'm trying to read the stars.dat file from VB. The problem is, for now I've found no doc of how the file is formatted. I'm now studing the Celestia code but as I'm somewhat allergic to C (in the classical argument btw verbose and compressed languages, I'm on the verbose side ^-^) I'm not advancing this fast ^-^ So could s/o please help me w/ just a little byte-by-byte description !


Thanks in advance,
Benoit 'Mutos' ROBIN
http://spacesims.hoshikaze.net

Topic author
Mutos
Posts: 75
Joined: 15.07.2002
With us: 22 years 4 months
Location: France

Post #2by Mutos » 11.01.2003, 09:50

Hi everybody,


Just found it, twas before my eyes all the time, it's so evident i'm utterly ashamed !

I post here the file format as it appeared to me, should someone search for it :
- First 4 bytes : number of stars : unsigned int
- Then each star, coded on 25 bytes :
* Catalog Number : unsigned int : 4 bytes,
* HD Catalog Number : unsigned int : 4 bytes,
* Right Ascension : float : 4 bytes,
* Declination : float : 4 bytes,
* Parallax : float : 4 bytes,
* Apparent Magnitude : unsigned short : 2 bytes,
* Stellar Class : unsigned short : 2 bytes,
* Parallax Error : unsigned char : 1 byte

My Celestia version is 1.2.4, stars.dat size 2 813 029 bytes, exactly corresponds to 112521 stars.

I'll get on this track & see if it does the job done. If i'm wrong i'll post corrections.


@+
Benoit 'Mutos' ROBIN

http://spacesims.hoshikaze.net

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 10 months
Location: Altair

Post #3by Rassilon » 11.01.2003, 17:20

Well if you want an easier way of filling space with hypothetical stars delete stars.dat...remove it from the config file...and use stc files instead...

You may even be able to use my globular cluster generator to fill space with random stars and planets within a matter of hours have 100000 new stars...granted the stc and ssc files would be a monster...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Topic author
Mutos
Posts: 75
Joined: 15.07.2002
With us: 22 years 4 months
Location: France

Post #4by Mutos » 11.01.2003, 17:28

Hi everybody, hi Rassilon,


The problem is, I don't want hypothetical stars but real ones, and they are all here within my reach inside the stars.dat file !

Now I'm trying to let VB read the particular LE coding of the file. Is there anyone out here who already has done it ?


Thanks, @+
Benoit 'Mutos' ROBIN

http://spacesims.hoshikaze.net

Topic author
Mutos
Posts: 75
Joined: 15.07.2002
With us: 22 years 4 months
Location: France

Post #5by Mutos » 15.01.2003, 06:48

Hi everybody,


The stars.dat reader class is up & running ! It's useable in any VB app & should s/o need it I can mail it on demand. Could even post it on a resources page...

Now I'm tweaking the 3D display. I use WebDriver but no 3D objects, I display the stars themselves on a 2D layer but use wD's 3D camera functions to project from 3D to 2D. Problem is, for 112521 stars it takes nearly 10s to display. I'm on workarounds...


@+
Benoit 'Mutos' ROBIN

http://spacesims.hoshikaze.net

Guest

Post #6by Guest » 15.01.2003, 23:19

Problem is, for 112521 stars it takes nearly 10s to display. I'm on workarounds...


I think you're about to find out what C is for!!! :wink:

Cheers,
Paul

Topic author
Mutos
Posts: 75
Joined: 15.07.2002
With us: 22 years 4 months
Location: France

Post #7by Mutos » 16.01.2003, 05:13

Hi everybody, hi ye anonymous consellor !


I've worked for some years in C, FORTRAN, MATLAB, Pascal & some others so i damn know f....g compressed langages are often faster than readable ones. Now that i only program for myself, I'd just rather deal w/ a readable langage out of real words rather than f....g hieroglyphs. That's a fully conscient choice & my remark was more of a joke than a complain ^-^


Thanks for ur kind concern anyway :)

@+
Benoit 'Mutos' ROBIN

http://spacesims.hoshikaze.net

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #8by marc » 31.01.2003, 03:56

I need to read the stars.dat file in C before the data is pushed into a Database, anyone got any source or snippets? Or alternativly i could use the C++ in celestia (yet to look at that).
Quick answers given some time ill do this, I just want to check that someone hasnt done this before.

Topic author
Mutos
Posts: 75
Joined: 15.07.2002
With us: 22 years 4 months
Location: France

Post #9by Mutos » 31.01.2003, 05:18

Hi everybody, hi Marc,


Could give u my code in VB so u could translate it. Just give me ur email so I could fwd it to u. I have looked at the Celestia code when I was coding, it's not too complex. The base file is readstars.cpp, direct url is :

http://cvs.sourceforge.net/cgi-bin/view ... cvs-markup

U could also check Selden's resources, there are always useful links there.

http://www.lns.cornell.edu/~seb/celestia/#2.1

@+
Benoit 'Mutos' ROBIN

http://spacesims.hoshikaze.net

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #10by marc » 03.02.2003, 12:22

Thanks readstars.cpp is what i want.

Guest

Database Stars.dat/ Nineplanets

Post #11by Guest » 03.03.2003, 12:26

Hi folks,

A few months ago I,ve redesigned the Stars Database builder a little bit to a more luxury version.
Together with this I've created a stars.dat converter which read the stars.dat file and write it into a semicolon separated text file. This is for comparising the data as used in Celestia with other catalogs and for educational purposes.
The modifications to BuildstarDb are that it now can be compiled with MSVS-C++ (reading of arguments); correct an error of the double star (Eri-ups) and some modifications to the different kind of verbose- and dropstar levels. With the verbose levels one can have different kind of usefull statistical information written during the building of stars.dat (Default written to screen but with *.bat file to a textfile as well)

Because I was and still not familiar with uploading these files to CVS I've sent them to Chris Laurel, first to take a look to it and then I was hoping that he will publish it on CVS so that it will be usefull to anyone. Sofar I haven't seen it yet.

Hopefully he will find these files back and will publish it on CVS. In the mean time to all who are interested drop me a message and sent it to you.

Celestia is a very usefull program for education on a school. Often they can't affort themself the too high costs of fast internet like a cable connection and so they still using a slow phoneline. For this purpose I've modified Winmain.cpp a little bit in such a way that Information will not come from the Nineplanet website but from a downloaded version of Nineplanets on the harddisc. (yes, the sun is now included to)
Same kind of principal is made as well for all well known stars belonging to a constellation (about 3200 stars). Drop a messages if you are interested.

HB

Topic author
Mutos
Posts: 75
Joined: 15.07.2002
With us: 22 years 4 months
Location: France

Post #12by Mutos » 29.03.2003, 06:45

Hi all, hi anonymous ^-^,


Just didn't follow the topic anymore so havn't got ur message 'bout Celestia in schools dling information from Nineplanets. I've got Celestia installed on my PC & didn't even know it dlded info from the internet. Thought it was an entirely offline app & dls were to be done manually. What kind of info does Celestia dl ?


@+
Benoit 'Mutos' ROBIN

http://spacesims.hoshikaze.net

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

Post #13by selden » 29.03.2003, 14:22

Mutos,

When you use the mouse to "right click" on any object in Celestia, you will get a "pop-up" menu. One of the items in the menu is "Info". If you select that item, Celestia will try to access a Web page associated with the object.

If the object is a star, it'll query Simbad. If the object is what Celestia considers a "body", it'll ask NinePlanets. When you're designing your own system, you can include the keyword "InfoURL" to specify any Web page you want.

The URL Celestia uses for Simbad queries is
"http://simbad.u-strasbg.fr/sim-id.pl?protocol=html&Ident=HIP" + number.
The URL for NinePlanets is
"http://www.nileplanets.org/" + name + ".html"

I hope this helps.
Selden

Guest

Post #14by Guest » 29.03.2003, 15:22

Hi Selden, hi all,


Of course it helps ^-^ Didn't know of this feature...


@+

Beno?t 'Mutos' ROBIN
mailto:mutos@hoshikaze.net
http://hoshikaze.net


Return to “Development”