Astronomical data (astro.dat) File Format Specification

The astro.dat file defines the astronomical data used by X-Plane. It consists of a list of stars, their positions and brightness (magnitudes).

File structure

The file structure is similar to all other X-Plane data files.

  • The first line of each file indicates if the file was generated on a PC (“I” for Intel or IBM) or Macintosh (“A” for Apple). X-Plane uses this code to help deal with the different ways in which PCs and Macs manipulate carriage returns in text files, and big-endian/little-endian issues.
  • The second line contains a version number used by X-Plane. This usually implies the first version of X-Plane that can utilise the file format (eg. “640 version” implies that this file format was first available for use in X-Plane version 6.40). The version number is followed by Robin Peel’s long copyright message that also includes the sequential build number of the data and internal code for the metadata that drives the formatting. This copyright message is very long, and includes a reference to the GNU General Public Licence under which this data is published as modifiable freeware, and also an acknowledgement and a disclaimer for the US Department of Defense NIMA for the DAFIF data. The terms of this license require that this copyright message must be left intact if this file is modified and/or redistributed.
  • The very last line of each file is marked by a “99”.

Here is an example of the two header lines, one star and the file termination line:

740 Version - DAFIF data cycle 200502, build 1922, metadata AstroXP740, Copyright © 2005, Robin A. Peel ( This data is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program ("AptNavGNULicence.txt"); if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. This product was developed using DAFIF (the Defense Aeronautical Flight Information File), a product of the US National Imagery and Mapping Agency (NIMA). NIMA requires the following warranty statements: (A) Under 10 U.S.C. 456, no civil action may be brought against the United States on the basis of the content of a navigational aid prepared or disseminated by either the former Defense Mapping Agency (DMA) or the National Imagery and Mapping Agency (NIMA). (B) The DAFIF product is provided "as is," and no warranty, express or implied, including, but not limited to the implied warranties of merchantability and fitness for particular purpose or arising by statute or otherwise in law or from a course of dealing or usage in trade, is made by NIMA as to the accuracy and functioning of the product. (C): Neither NIMA nor its personnel will be liable for any claims, losses, or damages arising from or connected with the use of this product. The user agrees to hold harmless the United States National Imagery and Mapping Agency. The user's sole and exclusive remedy is to stop using the DAFIF product.

6.752569 -16.713143 -1.43 Sirius

Sequencing of data is conceptually unimportant. By default the segments are sorted by the initial “from” fix and then by the “to” fix.

Example data

This file contains each star’s position (Right Ascension and Declination), visible magnitude and an optional name. X-Plane dynamically converts these astronomical co-ordinates into positions in the sky appropriate to your location, date and time. So you should recognise appropriate constellations as you fly. To fully understand the use of Right Ascension, Declination, sidereal time, and other astronomical issues, you may need to look at a basic reference book on astronomy.

Example lines of data from astro.dat are:

6.752569 -16.713143 -1.43 Sirius
19.846301 8.867385 0.77 Altair
2.529743 89.264138 1.97 Polaris

The meaning of the first line of this data for Sirius (the brightest star in the sky) is:

Meaning of example star data (star.dat)
Star example Example Usage
6.752569 Right Ascension in decimal hours.  Always a positive number.
-16.713143 Declination in decimal degrees.  Positive declinations are north of the celestial equator (eg. the pole star, Polaris, is at a declination of 89.264138 degrees).
-1.43 Visible magnitude of the star.  This is a weird logarithmic scale (low numbers are brightest), and stars to a magnitude of +6.5 are considered visible to the naked eye (though this will vary hugely with your local seeing conditions, light pollution, altitude, etc.).  Sirius (the brightest star in the night sky) has a negative magnitude (-1.43) because it is very, very bright.
Sirius Star name (optional – not used by X-Plane).
  • Facebook
  • Reddit
  • StumbleUpon
  • Twitter
  • Google Buzz
  • LinkedIn