Tweaking stars.dat

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
dtessman
Posts: 44
Joined: 20.06.2002
With us: 22 years 7 months
Location: So Cal

Tweaking stars.dat

Post #1by dtessman » 05.07.2002, 21:48

For those who want to tweak stars.dat without resorting to a hex editor....

CStarsConv is a windows application that converts the stars.dat database to XML and back again. The exe and complete source code is available from SpaceGear.Org.

brunetto_64
Posts: 112
Joined: 12.05.2002
With us: 22 years 9 months
Location: Toronto

Post #2by brunetto_64 » 06.07.2002, 10:29

Hi!
I am a consumer of “CELESTIA”, and having known that your software exists for converting the file “stars.dat”, I have immediately wanted to unload him/it.
After having him/it extract I have tried to make to depart the executable one, but a called file is asked me
“XKRN2505.DLL.”
My operating system is W 98 SE.
Can you help me?
Thanks in advance, and sorry for my english, but i'm italian!!!

Bruno

Topic author
dtessman
Posts: 44
Joined: 20.06.2002
With us: 22 years 7 months
Location: So Cal

CStarsConv Requirements Update

Post #3by dtessman » 06.07.2002, 18:11

CStarsConv is written in Java and compiled to native code using Excelsior Jet 2.5 personal edition (which is free for non-commercial use). The bummer is that CStarsConv requires some DLLs from Excelsior and access to the Java JDK to run. So.... You need to have Excelsior installed and the JDK installed inorder to run CStarsConv. They are both free and easily installed. However, if you are not a Java coder, it seems a bit much. I am currently working on the problem and may actually resort to rewriting it in C. I will keep you posted.

brunetto_64
Posts: 112
Joined: 12.05.2002
With us: 22 years 9 months
Location: Toronto

Post #4by brunetto_64 » 07.07.2002, 22:39

Hi dave,
I have downloaded the excelsior program, but I have found only the last version (2.51) and in this program there are not the xkrn2505.dll, but xkrn2508.dll...and the CstarConv does not work...however I have the Java JDK 1.4 .
thanks
Bruno

Astrojockel
Posts: 28
Joined: 19.06.2002
With us: 22 years 7 months
Location: Germany

Post #5by Astrojockel » 08.07.2002, 10:05

brunetto_64 wrote:Hi dave,
I have downloaded the excelsior program, but I have found only the last version (2.51) and in this program there are not the xkrn2505.dll, but xkrn2508.dll...and the CstarConv does not work...however I have the Java JDK 1.4 .
thanks
Bruno


Hi, Bruno

i have the same problem (xkrnl25014.dll) and i just renamed the dll in xkrnl2505.dll. It works fine. :D

hope it helps

brunetto_64
Posts: 112
Joined: 12.05.2002
With us: 22 years 9 months
Location: Toronto

Post #6by brunetto_64 » 08.07.2002, 19:40

...I have tried, but dont' work...

mark02

Tweaking stars.dat

Post #7by mark02 » 08.07.2002, 20:58

Hello all again,

I've tried renaming certain files such as the xkrn2505.dll file also, and it doesn't work. I have the java and excelsior jet programs installed, and I've tried putting them all, including my CStarsConv.exe, into one folder I named "CStarsConv" in Program Files. No luck. Whenever I try to open CStarsConv.exe, a DOS prompt appears briefly but disappears. (One more thing): I try to open stars.dat with CStarsConv.exe (the application), and I'm not successful there either. I'm not even sure I am doing this correctly, but does anyone have any suggestions?

Topic author
dtessman
Posts: 44
Joined: 20.06.2002
With us: 22 years 7 months
Location: So Cal

A C version is in the works.

Post #8by dtessman » 09.07.2002, 02:33

Like many non-GUI programs, CStarsConv must be run from the command line. Go to a DOS prompt, and give it another try.

Meanwhile I am working to get rid of at least one variable in all this by rewriting the program in C. That should solve most of the issues. It has just been almost 10 years since I did any serious C coding and it is going to be painful. Java is my forte, so I was hoping that I could use Java. But there is obviously too much baggage. Pitty...

Sorry it has been such a hassle to all. I will post a notice here when the C version is ready for download from SpaceGear.Org.

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 23 years
Location: Altair

Post #9by Rassilon » 09.07.2002, 05:00

I would maybe write one in VB make it simple...where you can query a star from the dat file by HIP or HD catalog #...and add them in...have a form with many text boxes :mrgreen:...I have thought of writing one...but sadly I think VB cannot handle data conversion as well as C++ so you might have to use that...
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!

mark02

Tweaking stars.dat

Post #10by mark02 » 09.07.2002, 20:32

Well, I tried inputing several directories for the CStarsConv program into my computer's prompt (not a DOS prompt though). I've tried copying the folder into several different catagories such as C drive and others. Still, no luck :( . When I input something such as C:\Documents and Settings\All Users\Documents\CStarsConv\CStarsConv.exe for one of my directories a message shows up saying that 'C' is not one of the operating drives for the prompt or something. Oh well, I guess I'll just wait until the program is written again in C.

Guest

CStarsConv is now available in C

Post #11by Guest » 10.07.2002, 22:38

Whew.... Its been a long time since I did any C coding, so the source will probably look rather primitive to most folks. But it works, and no other stuff is required to get it to run. It is available at SpaceGear.Org. I have discontinued making the Java executable download available. The Java source and compiled classes are still available with the C source download for those who want to twiddle with Java code.

Topic author
dtessman
Posts: 44
Joined: 20.06.2002
With us: 22 years 7 months
Location: So Cal

New data table contains Celestia stellar classes

Post #12by dtessman » 11.07.2002, 03:25

The CSCTable (available at SpaceGear.Org/data) is a Comma Separated Variable (CSV) file, that contains the various stellar classes used within Celestia's stars.dat database. CStarsConv (available at SpaceGear.Org/software) was used to generate a Star System Registry (SSR) formatted file from Celesta's stars.dat database. This SSR file was then parsed to create this CSV file. Each row consists of the class name and the number of times the class name appears within Celestia's stars.dat database. This table is designed to help locate anomalous stars.dat database stellar class entries so that they may be corrected in accord with the effort to standardize class names within the SSR.

Topic author
dtessman
Posts: 44
Joined: 20.06.2002
With us: 22 years 7 months
Location: So Cal

CStarsConv version 1.2 is now available

Post #13by dtessman » 12.07.2002, 06:48

Version 1.2 of CStarsConv fixes an intermittent array overflow problem that sometimes caused improper class names to be stored in the XML file.
Available for download from SpaceGear.Org


Return to “Development”