It is currently Fri, 22-09-17, 2:35 GMT

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat, 05-03-16, 16:20 GMT 
Offline

Joined: Fri, 01-05-15, 5:14 GMT
Posts: 27
:wall: :wall: :wall:
I have not been able to successfully read the stars.dat file, or make any changes to it. When I attempt to open a copy as an .txt, it gives me this gigantic mess of jargonish windings. How is one able to successfully edit a stars.dat file, let alone read a stars.dat file?
:wall: :wall: :wall:

_________________
History abhors a Paradox.


Top
 Profile  
 
PostPosted: Sat, 05-03-16, 20:16 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 766
Location: N 42.38846 W 83.45456
that is because it is NOT a ascii text file
it is a binary data file

you use a hex editor , but it will be in hex format or in binary

the first 32 bits
Code:
43 45 4C 53 54 41 52 53
--- ascii ---
CELSTARS


use the code in the source folder celestia/src/tools/stardb/ to make a new file

_________________
"I don't pitch Linux to my friends, I let Microsoft do that for me."
Using OpenSUSE 42.1 & Scientific Linux 6.7


Top
 Profile  
 
PostPosted: Sun, 06-03-16, 3:08 GMT 
Offline

Joined: Fri, 01-05-15, 5:14 GMT
Posts: 27
John Van Vliet wrote:
that is because it is NOT a ascii text file
it is a binary data file

you use a hex editor , but it will be in hex format or in binary

the first 32 bits
Code:
43 45 4C 53 54 41 52 53
--- ascii ---
CELSTARS


use the code in the source folder celestia/src/tools/stardb/ to make a new file


What could be used as a "hex editor?"

_________________
History abhors a Paradox.


Top
 Profile  
 
PostPosted: Sun, 06-03-16, 4:43 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 766
Location: N 42.38846 W 83.45456
on linux i use the KDE default "okteta" or ghex

but if you do not know what a hex editor and is for ,then you will likely not know how to use it .
as it is i use one very rarely

build the tools in the "celestia/src/tools/stardb/ " of the celestia source code

the svn pull of celestia builds using qt-creator
the tools should build on MS Windows using gcc and mingw

_________________
"I don't pitch Linux to my friends, I let Microsoft do that for me."
Using OpenSUSE 42.1 & Scientific Linux 6.7


Top
 Profile  
 
PostPosted: Sun, 06-03-16, 11:01 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4495
Location: Hamburg, Germany
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 database

http://cdsarc.u-strasbg.fr/viz-bin/Cat?I/239
and
http://cdsarc.u-strasbg.fr/viz-bin/Cat?I/311

A simple command line call from within the working dir celestia/src/tools/stardb/:

Code:
 perl buildstardb.pl


produces this log-output:
Code:
Reading Astrometric Catalog...
  Read a total of 117955 records.
Reading Hipparcos Main Catalog...
  Read a total of 118218 records.
Fixing data...
  Fixed.
Checking data...
  106747 stars with good data included.
  11208 stars dropped, of which 44 are bright stars.
Writing databases...
  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 and stars.dat 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.

Good luck,
Fridger

EDIT: 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 (ActivePerl).

Next, you start a command shell (Start ->Run.., type cmd) and cd to the Celestia src dir
celestia\src\tools\stardb
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 ...

That's all

_________________
Image


Top
 Profile  
 
PostPosted: Sun, 15-05-16, 7:40 GMT 
Offline

Joined: Fri, 01-05-15, 5:14 GMT
Posts: 27
t00fri wrote:
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 database

http://cdsarc.u-strasbg.fr/viz-bin/Cat?I/239
and
http://cdsarc.u-strasbg.fr/viz-bin/Cat?I/311

A simple command line call from within the working dir celestia/src/tools/stardb/:

Code:
 perl buildstardb.pl


produces this log-output:
Code:
Reading Astrometric Catalog...
  Read a total of 117955 records.
Reading Hipparcos Main Catalog...
  Read a total of 118218 records.
Fixing data...
  Fixed.
Checking data...
  106747 stars with good data included.
  11208 stars dropped, of which 44 are bright stars.
Writing databases...
  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 and stars.dat 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.

Good luck,
Fridger

EDIT: 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 (ActivePerl).

Next, you start a command shell (Start ->Run.., type cmd) and cd to the Celestia src dir
celestia\src\tools\stardb
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 ...

That's all

I installed ActivePerl, but I'm at a loss as to how to install the module Math::Trig. I have the Perl Package Manager open, but I don't know what I'm looking for.

_________________
History abhors a Paradox.


Top
 Profile  
 
PostPosted: Sun, 15-05-16, 9:10 GMT 
Offline
User avatar

Joined: Mon, 07-01-08, 13:30 GMT
Posts: 339
Location: Switzerland
It's been a while since I did much with Perl (somewhat longer for Perl on Windows), but I think Math::Trig is already provided by ActivePerl, no need to download it.


Top
 Profile  
 
PostPosted: Sun, 15-05-16, 9:25 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4495
Location: Hamburg, Germany
Why not google for it, so we don't have to repeat things.
Typical search patterns (leading to what you want)

activeperl install module
activeperl add module

Plenty of instruction pages will then be shown.

Fridger
...

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group