John Van Vliet wrote:
build the tools in the "celestia/src/tools/stardb/ " of the celestia source code
My guess would be that the proper installation of a C++ compiler environment is NOT worth roninwolf1981's efforts...
A generation of both the human readable ascii file stars.txt
and the corresponding binary stars.dat
file (to be used in Celestia) takes ony a few seconds with Andrew Tribick's Perl script 'buildstardb.pl'
, also present in the source folder celestia/src/tools/stardb/ . An installation of Perl proceeds almost automatically in ANY OS. In Linux, it is even part of the OS installation. Just place the 2 needed data catalogues (hip_main.dat and hip2.dat) into the same dir celestia/src/tools/stardb/ for simplicity. The catalogue files may be downloaded within minutes by ftp from the official Strasbourg astronomical databasehttp://cdsarc.u-strasbg.fr/viz-bin/Cat?I/239
A simple command line call from within the working dir celestia/src/tools/stardb/:
produces this log-output:
Reading Astrometric Catalog...
Read a total of 117955 records.
Reading Hipparcos Main Catalog...
Read a total of 118218 records.
106747 stars with good data included.
11208 stars dropped, of which 44 are bright stars.
Writing binary database to stars.dat
Writing text database to stars.txt
Wrote a total of 106747 stars.
.. i.e. you also find the corresponding star data files: stars.txt
in your working directory after a successful run. Then the human readable stars.txt
may be modified with your preferred editor and the corresponding binary stars.dat
file be regenerated, again by using buildstardb.pl
We use binary data files in Celestia / celestia.Sci, since these are loaded much faster than human readable ascii text files and also take only ~ half the space on your HD.
Note that Perl exists in any popular OS (including Windows). To run the buildstardb.pl
script, you need to install only one additional perl module, called Math::Trig.
I just made sure that things also work under Windows 7 precisely as I described above.
I suggest you install the free ActivePerl
distribution for Windows from here:http://www.activestate.com/activeperl
Then you install the module Math::Trig
via the included Perl package manager
Next, you start a command shell (Start ->Run.., type cmd) and cd to the Celestia src dir
Download the 2 required star catalog files, unzip them and move them to celestia\src\tools\stardb. Then type at the cmd prompt:
perl -w buildstardb.pl
Watch the log text ...