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,
Help needed on stars.dat format
Help needed on stars.dat format
Benoit 'Mutos' ROBIN
http://spacesims.hoshikaze.net
http://spacesims.hoshikaze.net
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.
@+
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.
@+
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...
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!
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...
@+
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...
@+
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 :)
@+
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 :)
@+
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.
Quick answers given some time ill do this, I just want to check that someone hasnt done this before.
Marc Griffith http://mostlyharmless.sf.net
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
@+
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
@+
Database Stars.dat/ Nineplanets
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
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
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 ?
@+
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 ?
@+
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.
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
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
Of course it helps ^-^ Didn't know of this feature...
@+
Beno?t 'Mutos' ROBIN
mailto:mutos@hoshikaze.net
http://hoshikaze.net