Page 1 of 1

Adding stars from Hipparcos catalog

Posted: 17.07.2002, 21:14
by hal8999
i read in the readme that stars.dat came from the Hipparcos catalog.
does some one have the software that converted the data :?:

in specific i am looking to add specific stars from the catalog of the open cluster m44

Posted: 17.07.2002, 21:30
by Rassilon
You can manually update the dat file fairly easily...read the adding stars thread...

What I would like is a comprehensive catalog of the stars plotted at galactic center...

float data type

Posted: 19.07.2002, 02:53
by hal8999
after hiting the float wall head on i found (using vb5 pro) "Put"ing a "single"(float) data type to a "Binary" file

here is the vb code

Code: Select all


Const h! = 13.31
'-------------------------
Private Sub Form_Load()
Open "c:\float.dat" For Binary Access Write As 1
Put #1, 1, h!
End Sub



Using WinHex('s) (a hex editor) (http://www.winhex.com/)
data interpeter the 13.31 came out as 1.331e+1 or C3 F5 54 41
:D

p.s. try NASA's Astronomica Data Center for many many catalogs (http://adc.gsfc.nasa.gov/)

Posted: 20.07.2002, 01:48
by Guest
Const h! = 13.31
'-------------------------
Private Sub Form_Load()
Open "c:\float.dat" For Binary Access Write As 1
Put #1, 1, h!
End Sub



Don't you mean
Open "c:\float.dat" For Binary Access Write As #1

And what does h! mean? I've never come across that before.

CStarConv

Posted: 20.07.2002, 20:38
by dtessman
You can use CStarsConv to export stars.dat to XML tweak it add stars, whatever, and then import it back again. Click here for download information.

Posted: 22.07.2002, 00:24
by DBrant
In VB you can use characters like !, &, $, and % to quickly specify the data type of a variable. So for example, instead of saying

Code: Select all

Dim f as Single


you could just say

Code: Select all

Dim f!


Similarly, & means Long, $ means String, and % means integer. This is a "feature" that has leaked in all the way from QBasic.
And you can indeed omit the # sign when specifying the file number.

Posted: 25.07.2002, 22:13
by Guest
You learn something every day. I was always under the impression that to omit the # you had the make the file a "FreeFile". But then again I never tried it a different way.

I remember those functions in the QBasic days, although I only knew the $ one, not the other ones.

Posted: 29.07.2002, 12:59
by Guest
I would recommend Perl for this kind of work. Vb has some seriously messed up syntax.