Star Catalogue Format
m (→Star Data Records) |
|||
| (15 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| + | {{ActualVersion|0.10.6}} | ||
This document describes how Stellarium records it's star catalogues, and the related file formats. | This document describes how Stellarium records it's star catalogues, and the related file formats. | ||
| Line 14: | Line 15: | ||
===General Description=== | ===General Description=== | ||
Stellarium's star catalogue data is kept in the stars/default sub-directory of the Installation Directory and/or User Directory (see section | Stellarium's star catalogue data is kept in the stars/default sub-directory of the Installation Directory and/or User Directory (see section | ||
| − | [ | + | [[Advanced_Use#Files_and_Directories|Files and Directories]]). |
The main catalogue data is split into several files: | The main catalogue data is split into several files: | ||
| Line 38: | Line 39: | ||
A given catalogue file models stars for one and only one level (i.e. for a fixed number of zones), which is recorded in the header of the file. Individual star records do not contain full positional coordinates, instead they contain coordinates relative to the central position of the zone they occupy. Thus, when parsing star catalogues, it is necessary to know about the zone model to be able to extract positional data. | A given catalogue file models stars for one and only one level (i.e. for a fixed number of zones), which is recorded in the header of the file. Individual star records do not contain full positional coordinates, instead they contain coordinates relative to the central position of the zone they occupy. Thus, when parsing star catalogues, it is necessary to know about the zone model to be able to extract positional data. | ||
| − | {| class=" | + | {| class="guidetable" |
|+ Stellarium's star catalogue files | |+ Stellarium's star catalogue files | ||
| ''File'' | | ''File'' | ||
| Line 45: | Line 46: | ||
| ''Geodesic Level'' | | ''Geodesic Level'' | ||
| ''#Records'' | | ''#Records'' | ||
| − | | ''Notes'' | + | !class="rbn"| ''Notes'' |
| − | |- | + | |- |
| − | | stars_0_0v0_1.cat | + | |stars_0_0v0_1.cat |
| − | | 0 | + | |0 |
| − | | 28 bytes | + | |28 bytes |
| − | | 0 | + | |0 |
| − | | 5,013 | + | |5,013 |
| − | | Hipparcos | + | |class="rbn"|Hipparcos |
| − | |- | + | |- |
| − | | stars_1_0v0_1.cat | + | |stars_1_0v0_1.cat |
| − | | 0 | + | |0 |
| − | | 28 bytes | + | |28 bytes |
| − | | 1 | + | |1 |
| − | | 21,999 | + | |21,999 |
| − | | Hipparcos | + | |class="rbn"|Hipparcos |
| − | |- | + | |- |
| − | | stars_2_0v0_1.cat | + | |stars_2_0v0_1.cat |
| − | | 0 | + | |0 |
| − | | 28 bytes | + | |28 bytes |
| − | | 2 | + | |2 |
| − | | 151,516 | + | |151,516 |
| − | | Hipparcos | + | |class="rbn"|Hipparcos |
| − | |- | + | |- |
| − | | stars_3_1v0_0.cat | + | |stars_3_1v0_0.cat |
| − | | 1 | + | |1 |
| − | | 10 bytes | + | |10 bytes |
| − | | 3 | + | |3 |
| − | | 434,064 | + | |434,064 |
| − | | Tycho | + | |class="rbn"|Tycho |
| − | |- | + | |- |
| − | | stars_4_1v0_0.cat | + | |stars_4_1v0_0.cat |
| − | | 1 | + | |1 |
| − | | 10 bytes | + | |10 bytes |
| − | | 4 | + | |4 |
| − | | 1,725,497 | + | |1,725,497 |
| − | | Tycho | + | |class="rbn"|Tycho |
| − | |- | + | |- |
| − | | stars_5_2v0_0.cat | + | |stars_5_2v0_0.cat |
| − | | 2 | + | |2 |
| − | | 8 bytes | + | |8 bytes |
| − | | 5 | + | |5 |
| − | | 7,669,011 | + | |7,669,011 |
| − | | NOMAD | + | |class="rbn"|NOMAD |
| − | |- | + | |- |
| − | | stars_6_2v0_0.cat | + | |stars_6_2v0_0.cat |
| − | | 2 | + | |2 |
| − | | 8 bytes | + | |8 bytes |
| − | | 6 | + | |6 |
| − | | 26,615,233 | + | |26,615,233 |
| − | | NOMAD | + | |class="rbn"|NOMAD |
| − | |- | + | |- |
| − | | stars_7_2v0_0.cat | + | |stars_7_2v0_0.cat |
| − | | 2 | + | |2 |
| − | | 8 bytes | + | |8 bytes |
| − | | 7 | + | |7 |
| − | | 57,826,266 | + | |57,826,266 |
| − | | NOMAD | + | |class="rbn"|NOMAD |
| − | |- | + | |- |
| − | | stars_8_2v0_0.cat | + | |stars_8_2v0_0.cat |
| − | | 2 | + | |2 |
| − | | 8 bytes | + | |8 bytes |
| − | | 7 | + | |7 |
| − | | 116,923,084 | + | |116,923,084 |
| − | | NOMAD | + | |class="rbn"|NOMAD |
|} | |} | ||
| − | For a given catalogue file, there may be one of three formats for the actual star data. The variation comes from the source of the data - the larger catalogues of fainter stars providing less data per star than the brighter star catalogues. See tables | + | For a given catalogue file, there may be one of three formats for the actual star data. The variation comes from the source of the data - the larger catalogues of fainter stars providing less data per star than the brighter star catalogues. See tables ''Stellarium's star catalogue'' and for details. |
===File Sections=== | ===File Sections=== | ||
The catalogue files are split into three main sections as described in table ''File sections''. | The catalogue files are split into three main sections as described in table ''File sections''. | ||
| − | {| class=" | + | {| class="guidetable" |
|+ File sections | |+ File sections | ||
| ''Section'' | | ''Section'' | ||
| ''Offset'' | | ''Offset'' | ||
| − | | ''Description'' | + | |class="rbn"| ''Description'' |
|- | |- | ||
| File Header Record | | File Header Record | ||
| 0 | | 0 | ||
| − | | Contains magic number, geodesic subdivision level, and magnitude range | + | |class="rbn"| Contains magic number, geodesic subdivision level, and magnitude range |
|- | |- | ||
| Zone Records | | Zone Records | ||
| 32 | | 32 | ||
| − | | A list of how many records there are for each zone. The length of the zones section depends on the level value from the header | + | |class="rbn"| A list of how many records there are for each zone. The length of the zones section depends on the level value from the header |
|- | |- | ||
| Star Data Records | | Star Data Records | ||
| 32+4''n'' | | 32+4''n'' | ||
| − | | This section of the file contains fixed-size star records, as described below. Records do not contain zone information, which must be inferred by counting how many records have been read so far and switching zones when enough have been read to fill the number of stars for the zone, as specified in the zones section above. The value of ''n'' used in the offset description is the number of zones, as described above. | + | |class="rbn"| This section of the file contains fixed-size star records, as described below. Records do not contain zone information, which must be inferred by counting how many records have been read so far and switching zones when enough have been read to fill the number of stars for the zone, as specified in the zones section above. The value of ''n'' used in the offset description is the number of zones, as described above. |
|} | |} | ||
| + | |||
===Record Types=== | ===Record Types=== | ||
====File Header Record==== | ====File Header Record==== | ||
The File Header Record describes file-wide settings. It also contains a magic number which servers as a file type identifier. See table ''Header Record''. | The File Header Record describes file-wide settings. It also contains a magic number which servers as a file type identifier. See table ''Header Record''. | ||
| − | {| class=" | + | {| class="guidetable" |
|+ Header Record | |+ Header Record | ||
| ''Name'' | | ''Name'' | ||
| Line 141: | Line 143: | ||
| ''Type'' | | ''Type'' | ||
| ''Size'' | | ''Size'' | ||
| − | | ''Description'' | + | |class="rbn"| ''Description'' |
|- | |- | ||
| Magic | | Magic | ||
| Line 147: | Line 149: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | The magic number which identifies the file as a star catalogue. 0xde0955a3 | + | |class="rbn"| The magic number which identifies the file as a star catalogue. 0xde0955a3 |
|- | |- | ||
| Data Type | | Data Type | ||
| Line 153: | Line 155: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | This describes the type of the file, which defines the size and structure of the Star Data record for the file. | + | |class="rbn"| This describes the type of the file, which defines the size and structure of the Star Data record for the file. |
|- | |- | ||
| Major Version | | Major Version | ||
| Line 159: | Line 161: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | The file format major version number | + | |class="rbn"| The file format major version number |
|- | |- | ||
| Minor Version | | Minor Version | ||
| Line 165: | Line 167: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | The file format minor version number | + | |class="rbn"| The file format minor version number |
|- | |- | ||
| Level | | Level | ||
| Line 171: | Line 173: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | Sets the level of sub-division of the geodesic sphere used to create the zones. 0 means an icosahedron (20 sizes), subsequent levels of sub-division lead to numbers of zones as described in section [ | + | |class="rbn"| Sets the level of sub-division of the geodesic sphere used to create the zones. 0 means an icosahedron (20 sizes), subsequent levels of sub-division lead to numbers of zones as described in section [[Star_Catalogue#Zones|Zones]] |
|- | |- | ||
| Magnitude Minimum | | Magnitude Minimum | ||
| Line 177: | Line 179: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | The low bound of the magnitude scale for values in this file. Note that this is still an integer in Stellarium's own internal representation | + | |class="rbn"| The low bound of the magnitude scale for values in this file. Note that this is still an integer in Stellarium's own internal representation |
|- | |- | ||
| Magnitude Range | | Magnitude Range | ||
| Line 183: | Line 185: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | The range of magnitudes expressed in this file | + | |class="rbn"| The range of magnitudes expressed in this file |
|- | |- | ||
| Magnitude Steps | | Magnitude Steps | ||
| Line 189: | Line 191: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | The number of steps used to describes values in the range | + | |class="rbn"| The number of steps used to describes values in the range |
|} | |} | ||
| + | |||
====Zone Records==== | ====Zone Records==== | ||
| − | The ''Zone Records'' section of the file lists the number of star records there are per zone. The number of zones is determined from the level value in the File Header Record, as described in section [ | + | The ''Zone Records'' section of the file lists the number of star records there are per zone. The number of zones is determined from the level value in the File Header Record, as described in section [[Star_Catalogue#Zones|Zones]]. The Zones section is simply a list of integer values which describe the number of stars for each zone. The total length of the Zones section depends on the number of zones. See table ''Zones section''. |
| − | {| class=" | + | {| class="guidetable" |
|+ Zones section | |+ Zones section | ||
| ''Name'' | | ''Name'' | ||
| Line 199: | Line 202: | ||
| ''Type'' | | ''Type'' | ||
| ''Size'' | | ''Size'' | ||
| − | | ''Description'' | + | |class="rbn"| ''Description'' |
|- | |- | ||
| num stars in zone 0 | | num stars in zone 0 | ||
| Line 205: | Line 208: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | The number of records in this file which are in zone 0 | + | |class="rbn"| The number of records in this file which are in zone 0 |
|- | |- | ||
| num stars in zone 1 | | num stars in zone 1 | ||
| Line 211: | Line 214: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | The number of records is this file which are in zone 1 | + | |class="rbn"| The number of records is this file which are in zone 1 |
|- | |- | ||
| ... | | ... | ||
| Line 217: | Line 220: | ||
| | | | ||
| | | | ||
| − | | | + | |class="rbn"| |
|- | |- | ||
| num stars in zone ''n'' | | num stars in zone ''n'' | ||
| Line 223: | Line 226: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | The number of records is this file which are in zone ''n'' | + | |class="rbn"| The number of records is this file which are in zone ''n'' |
|} | |} | ||
| + | |||
====Star Data Records==== | ====Star Data Records==== | ||
After the Zones section, the actual star data starts. The star data records themselves do not contain the zone in which the star belongs. Instead, the zone is inferred from the position of the record in the file. For example, if the Zone Records section of the file says that the first 100 records are for zone 0, the next 80 for zone 1 and so on, it is possible to infer the zone for a given record by counting how many records have been read so far. | After the Zones section, the actual star data starts. The star data records themselves do not contain the zone in which the star belongs. Instead, the zone is inferred from the position of the record in the file. For example, if the Zone Records section of the file says that the first 100 records are for zone 0, the next 80 for zone 1 and so on, it is possible to infer the zone for a given record by counting how many records have been read so far. | ||
| Line 234: | Line 238: | ||
It should be noted that although the positional data loses accuracy as one progresses though the Star Record Types, this is compensated for by the face that the number of zones is much higher for the files where the smaller precision position fields are used, so the actual resolution on the sky isn't significantly worse for the type 1 and 2 records in practice. | It should be noted that although the positional data loses accuracy as one progresses though the Star Record Types, this is compensated for by the face that the number of zones is much higher for the files where the smaller precision position fields are used, so the actual resolution on the sky isn't significantly worse for the type 1 and 2 records in practice. | ||
| − | {| class=" | + | {| class="guidetable" |
|+ Star Data Record Type 0 | |+ Star Data Record Type 0 | ||
| ''Name'' | | ''Name'' | ||
| Line 240: | Line 244: | ||
| ''Type'' | | ''Type'' | ||
| ''Size'' | | ''Size'' | ||
| − | | ''Description'' | + | |class="rbn"| ''Description'' |
|- | |- | ||
| hip | | hip | ||
| Line 246: | Line 250: | ||
| int | | int | ||
| 3 | | 3 | ||
| − | | Hipparcos catalogue number | + | |class="rbn"| Hipparcos catalogue number |
|- | |- | ||
| component_ids | | component_ids | ||
| Line 252: | Line 256: | ||
| unsigned char | | unsigned char | ||
| 1 | | 1 | ||
| − | | This is an index to an array of catalogue number suffixes. The list is read from the '''stars_hip_component_ids.cat''' file. The value of this field turns out to be the line number in the file - 1 | + | |class="rbn"| This is an index to an array of catalogue number suffixes. The list is read from the '''stars_hip_component_ids.cat''' file. The value of this field turns out to be the line number in the file - 1 |
|- | |- | ||
| x0 | | x0 | ||
| Line 258: | Line 262: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | This is the position of the star relative to the central point in the star's zone, in axis 1 | + | |class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 1 |
|- | |- | ||
| x1 | | x1 | ||
| Line 264: | Line 268: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | This is the position of the star relative to the central point in the star's zone, in axis 2 | + | |class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 2 |
|- | |- | ||
| b_v | | b_v | ||
| Line 270: | Line 274: | ||
| unsigned char | | unsigned char | ||
| 1 | | 1 | ||
| − | | This is the | + | |class="rbn"| This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file |
|- | |- | ||
| mag | | mag | ||
| Line 276: | Line 280: | ||
| unsigned char | | unsigned char | ||
| 1 | | 1 | ||
| − | | This is the | + | |class="rbn"| This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file |
|- | |- | ||
| sp_int | | sp_int | ||
| Line 282: | Line 286: | ||
| unsigned short int | | unsigned short int | ||
| 2 | | 2 | ||
| − | | This is the index in an array of spectral type descriptions which is taken from the file '''stars_hip_sp.cat''', the index corresponds to the line number in the file - 1 | + | |class="rbn"| This is the index in an array of spectral type descriptions which is taken from the file '''stars_hip_sp.cat''', the index corresponds to the line number in the file - 1 |
|- | |- | ||
| dx0 | | dx0 | ||
| Line 288: | Line 292: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | This is the proper | + | |class="rbn"| This is the proper motion of the star in axis 1 |
|- | |- | ||
| dx1 | | dx1 | ||
| Line 294: | Line 298: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | This is the proper motion of the star in axis 2 | + | |class="rbn"| This is the proper motion of the star in axis 2 |
|- | |- | ||
| plx | | plx | ||
| Line 300: | Line 304: | ||
| int | | int | ||
| 4 | | 4 | ||
| − | | This is the | + | |class="rbn"| This is the parallax of the star. To get the actual value, divide by 10000. |
|} | |} | ||
| − | {| class=" | + | {| class="guidetable" |
|+ Star Data Record Type 1 | |+ Star Data Record Type 1 | ||
| ''Name'' | | ''Name'' | ||
| Line 309: | Line 313: | ||
| ''Type'' | | ''Type'' | ||
| ''Size'' | | ''Size'' | ||
| − | | ''Description'' | + | |class="rbn"| ''Description'' |
|- | |- | ||
| − | | x0 | + | | x0 |
| + | | 0 | ||
| + | | int | ||
| + | | 20 bits | ||
| + | |class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 1 | ||
|- | |- | ||
| − | | x1 | + | | x1 |
| + | | 20 bits | ||
| + | | int | ||
| + | | 20 bits | ||
| + | |class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 2 | ||
|- | |- | ||
| − | | dx0 | + | | dx0 |
| + | | 40 bits | ||
| + | | int | ||
| + | | 14 bits | ||
| + | |class="rbn"| This is the proper motion of the star in axis 1 | ||
|- | |- | ||
| − | | dx1 | + | | dx1 |
| + | | 54 bits | ||
| + | | int | ||
| + | | 14 bits | ||
| + | |class="rbn"| This is the proper motion of the star in axis 2 | ||
|- | |- | ||
| − | | b_v | + | | b_v |
| + | | 68 bits | ||
| + | | unsigned int | ||
| + | | 7 bits | ||
| + | |class="rbn"| This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file | ||
|- | |- | ||
| − | | mag | + | | mag |
| + | | 75 bits | ||
| + | | unsigned int | ||
| + | | 5 bits | ||
| + | |class="rbn"| This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file | ||
|} | |} | ||
| − | {| class=" | + | {| class="guidetable" |
|+ Star Data Record Type 2 | |+ Star Data Record Type 2 | ||
| ''Name'' | | ''Name'' | ||
| Line 330: | Line 358: | ||
| ''Type'' | | ''Type'' | ||
| ''Size'' | | ''Size'' | ||
| − | | ''Description'' | + | |class="rbn"| ''Description'' |
|- | |- | ||
| − | | x0 | + | | x0 |
| + | | 0 | ||
| + | | int | ||
| + | | 18 bits | ||
| + | |class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 1 | ||
|- | |- | ||
| − | | x1 | + | | x1 |
| + | | 18 bits | ||
| + | | int | ||
| + | | 18 bits | ||
| + | |class="rbn"| This is the position of the star relative to the central point in the star's zone, in axis 2 | ||
|- | |- | ||
| − | | b_v | + | | b_v |
| + | | 36 bits | ||
| + | | unsigned int | ||
| + | | 7 bits | ||
| + | |class="rbn"| This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file | ||
|- | |- | ||
| − | | mag | + | | mag |
| + | | 43 bits | ||
| + | | unsigned int | ||
| + | | 5 bits | ||
| + | |class="rbn"| This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file | ||
|} | |} | ||
| + | |||
| + | {{Template:LRCNavigation|TUI Commands|Stellarium User Guide|Creating a Personalised Landscape for Stellarium}} | ||
[[Category:Stellarium User Guide]] | [[Category:Stellarium User Guide]] | ||
Latest revision as of 05:29, 25 August 2011
This document describes how Stellarium records it's star catalogues, and the related file formats.
Contents |
[edit] Stellarium's Sky Model
[edit] Zones
The celestial sphere is split into zones, which correspond to the triangular faces of a geodesic sphere. The number of zones (faces) depends on the level of sub-division of this sphere. The lowest level, 0, is an icosahedron (20 faces), subsequent levels, L, of sub-division give the number of zones, n as:
n=20•4L
Stellarium uses levels 0 to 7 in the existing star catalogues. Star Data Records contain the position of a star as an offset from the central position of the zone in which that star is located, thus it is necessary to determine the vector from the observer to the centre of a zone, and add the star's offsets to find the absolute position of the star on the celestial sphere.
This position for a star is expressed as a 3-dimensional vector which points from the observer (at the centre of the geodesic sphere) to the position of the star as observed on the celestial sphere.
[edit] Star Catalogue File Format
[edit] General Description
Stellarium's star catalogue data is kept in the stars/default sub-directory of the Installation Directory and/or User Directory (see section Files and Directories).
The main catalogue data is split into several files:
- stars_0_0v0_1.cat
- stars_1_0v0_1.cat
- stars_2_0v0_1.cat
- stars_3_0v0_0.cat
- stars_4_1v0_0.cat
- stars_5_1v0_0.cat
- stars_6_2v0_0.cat
- stars_7_2v0_0.cat
- stars_8_2v0_0.cat
There also exist some control and reference files:
- stars_hip_cids_0v0_0.cat
- stars_hip_sp_0v0_0.cat
- stars.ini
- name.fab
When Stellarium starts, it reads the stars.ini file, from which it determines the names of the other files, which it then loads.
The stars_hip_cids_0v0_0.cat and stars_hip_sp_0v0_0.cat files contain reference data for the main catalogue files.
A given catalogue file models stars for one and only one level (i.e. for a fixed number of zones), which is recorded in the header of the file. Individual star records do not contain full positional coordinates, instead they contain coordinates relative to the central position of the zone they occupy. Thus, when parsing star catalogues, it is necessary to know about the zone model to be able to extract positional data.
| File | Data Type | Data Record Size | Geodesic Level | #Records | Notes |
|---|---|---|---|---|---|
| stars_0_0v0_1.cat | 0 | 28 bytes | 0 | 5,013 | Hipparcos |
| stars_1_0v0_1.cat | 0 | 28 bytes | 1 | 21,999 | Hipparcos |
| stars_2_0v0_1.cat | 0 | 28 bytes | 2 | 151,516 | Hipparcos |
| stars_3_1v0_0.cat | 1 | 10 bytes | 3 | 434,064 | Tycho |
| stars_4_1v0_0.cat | 1 | 10 bytes | 4 | 1,725,497 | Tycho |
| stars_5_2v0_0.cat | 2 | 8 bytes | 5 | 7,669,011 | NOMAD |
| stars_6_2v0_0.cat | 2 | 8 bytes | 6 | 26,615,233 | NOMAD |
| stars_7_2v0_0.cat | 2 | 8 bytes | 7 | 57,826,266 | NOMAD |
| stars_8_2v0_0.cat | 2 | 8 bytes | 7 | 116,923,084 | NOMAD |
For a given catalogue file, there may be one of three formats for the actual star data. The variation comes from the source of the data - the larger catalogues of fainter stars providing less data per star than the brighter star catalogues. See tables Stellarium's star catalogue and for details.
[edit] File Sections
The catalogue files are split into three main sections as described in table File sections.
| Section | Offset | Description |
| File Header Record | 0 | Contains magic number, geodesic subdivision level, and magnitude range |
| Zone Records | 32 | A list of how many records there are for each zone. The length of the zones section depends on the level value from the header |
| Star Data Records | 32+4n | This section of the file contains fixed-size star records, as described below. Records do not contain zone information, which must be inferred by counting how many records have been read so far and switching zones when enough have been read to fill the number of stars for the zone, as specified in the zones section above. The value of n used in the offset description is the number of zones, as described above. |
[edit] Record Types
[edit] File Header Record
The File Header Record describes file-wide settings. It also contains a magic number which servers as a file type identifier. See table Header Record.
| Name | Offset | Type | Size | Description |
| Magic | 0 | int | 4 | The magic number which identifies the file as a star catalogue. 0xde0955a3 |
| Data Type | 4 | int | 4 | This describes the type of the file, which defines the size and structure of the Star Data record for the file. |
| Major Version | 8 | int | 4 | The file format major version number |
| Minor Version | 12 | int | 4 | The file format minor version number |
| Level | 16 | int | 4 | Sets the level of sub-division of the geodesic sphere used to create the zones. 0 means an icosahedron (20 sizes), subsequent levels of sub-division lead to numbers of zones as described in section Zones |
| Magnitude Minimum | 20 | int | 4 | The low bound of the magnitude scale for values in this file. Note that this is still an integer in Stellarium's own internal representation |
| Magnitude Range | 24 | int | 4 | The range of magnitudes expressed in this file |
| Magnitude Steps | 28 | int | 4 | The number of steps used to describes values in the range |
[edit] Zone Records
The Zone Records section of the file lists the number of star records there are per zone. The number of zones is determined from the level value in the File Header Record, as described in section Zones. The Zones section is simply a list of integer values which describe the number of stars for each zone. The total length of the Zones section depends on the number of zones. See table Zones section.
| Name | Offset | Type | Size | Description |
| num stars in zone 0 | 0 | int | 4 | The number of records in this file which are in zone 0 |
| num stars in zone 1 | 4 | int | 4 | The number of records is this file which are in zone 1 |
| ... | ||||
| num stars in zone n | 4n | int | 4 | The number of records is this file which are in zone n |
[edit] Star Data Records
After the Zones section, the actual star data starts. The star data records themselves do not contain the zone in which the star belongs. Instead, the zone is inferred from the position of the record in the file. For example, if the Zone Records section of the file says that the first 100 records are for zone 0, the next 80 for zone 1 and so on, it is possible to infer the zone for a given record by counting how many records have been read so far.
The actual record structure depends on the value of the Data Type, as found in the File Header Record.
See tables Star Data Record Type 0, Star Data Record Type 1 and Star Data Record Type 2 for record structure details.
It should be noted that although the positional data loses accuracy as one progresses though the Star Record Types, this is compensated for by the face that the number of zones is much higher for the files where the smaller precision position fields are used, so the actual resolution on the sky isn't significantly worse for the type 1 and 2 records in practice.
| Name | Offset | Type | Size | Description |
| hip | 0 | int | 3 | Hipparcos catalogue number |
| component_ids | 3 | unsigned char | 1 | This is an index to an array of catalogue number suffixes. The list is read from the stars_hip_component_ids.cat file. The value of this field turns out to be the line number in the file - 1 |
| x0 | 4 | int | 4 | This is the position of the star relative to the central point in the star's zone, in axis 1 |
| x1 | 8 | int | 4 | This is the position of the star relative to the central point in the star's zone, in axis 2 |
| b_v | 9 | unsigned char | 1 | This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file |
| mag | 10 | unsigned char | 1 | This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file |
| sp_int | 11 | unsigned short int | 2 | This is the index in an array of spectral type descriptions which is taken from the file stars_hip_sp.cat, the index corresponds to the line number in the file - 1 |
| dx0 | 13 | int | 4 | This is the proper motion of the star in axis 1 |
| dx1 | 17 | int | 4 | This is the proper motion of the star in axis 2 |
| plx | 21 | int | 4 | This is the parallax of the star. To get the actual value, divide by 10000. |
| Name | Offset | Type | Size | Description |
| x0 | 0 | int | 20 bits | This is the position of the star relative to the central point in the star's zone, in axis 1 |
| x1 | 20 bits | int | 20 bits | This is the position of the star relative to the central point in the star's zone, in axis 2 |
| dx0 | 40 bits | int | 14 bits | This is the proper motion of the star in axis 1 |
| dx1 | 54 bits | int | 14 bits | This is the proper motion of the star in axis 2 |
| b_v | 68 bits | unsigned int | 7 bits | This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file |
| mag | 75 bits | unsigned int | 5 bits | This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file |
| Name | Offset | Type | Size | Description |
| x0 | 0 | int | 18 bits | This is the position of the star relative to the central point in the star's zone, in axis 1 |
| x1 | 18 bits | int | 18 bits | This is the position of the star relative to the central point in the star's zone, in axis 2 |
| b_v | 36 bits | unsigned int | 7 bits | This is the magnitude level in B-V colour. This value refers to one of 256 discrete steps in the magnitude range for the file |
| mag | 43 bits | unsigned int | 5 bits | This is the magnitude level in the V-I colour. This value refers to one of 256 discrete steps in the magnitude range for the file |