[Kstars-devel] Binary file format for NOMAD

Akarsh Simha akarshsimha at gmail.com
Tue Jul 15 13:51:31 CEST 2008


Hi

NOMAD data can be compressed to take up 14 ~ 16 bytes, because it
doesn't have a lot of information that forced us to use the 32-byte
structure earlier.

Since size is almost the primary concern for the 1e8 and 1e9 catalogs,
I think it would be worth changing the code to use 16-bytes per star.

The organization of data will be very straightforward:

+------------------------+--------------------------+
|    Right Ascension     |        Declination       |
|       4 bytes          |          4 bytes         |
+----------+-------------+-------------+------------+
|  RM RA   |   PM Dec    |  Blue Mag   |  Vis. Mag  |
| 2 bytes  |  2 bytes    |  2 bytes    |  2 bytes   |
+----------+-------------+-------------+------------+

We could get the spectral type from B-V within the program. This will
make sure we don't lose any information, in case we would want to base
our colours on B-V or display B and V magnitudes at some point of
time.

While we could further reduce the size of the block by about 2 bytes
by squeezing in about 3 bits somewhere to indicate whether the star is
of B, A, F, G, K, M spectral classes, this would increase the
complexity of the program that reads and interprets the data. Besides,
this will reduce the final file size by about 12.5% (80MB to 70MB?),
which I don't think is worth the additional effort. Maybe we could
start supporting a 14 bytes per record format sometime in the future,
(when we would want to support the USNO A binary format, the formats
used by other popular desktop planetariums) and just version it off
differently.

I'll start working on the 16 byte structure now, and I don't mind
backtracking if someone has a better idea.

Regards
Akarsh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20080715/8b7c47fe/attachment.pgp 


More information about the Kstars-devel mailing list