HNBody
Version 1.0.10
|
The HNBody package can generate several types of output files. Unless explicitly disabled (see OutputHeader), these files begin with a header containing information identifying the type of file and certain parameters used in the integration. The format of the header is:
MAGIC TYPE [TYPE-dependent fields] [zero or more lines of TYPE-dependent fields] # # User-readable comment lines, as appropriate... # [main DATA lines...]
The second (tens) digit of TYPE determines the physical format of the main data lines: 100, 20x and 30x imply data lines are ordinary text; 110, 21x and 31x imply data lines are single precision binary numbers; 120, 22x and 32x imply data lines are double precision binary numbers; 23x imply data lines are single precision binary numbers, with difference encoding of slowly varying quantities to extend range. Binary data is always output in MSB (big-endian) order to facilitate file sharing. Binary data ``lines'' are not separated by newlines, nor are their fields padded in any way.
The final (ones) digit of TYPE determines the coordinate system of the output DATA: 2x0 and 3x0 imply Barycentric coordinates, 2x1 and 3x1 imply Bodycentric coordinates, and 2x2 and 3x2 imply Jacobi coordinates.
For all TYPEs (100-399), header line 2 contains the initial time (option Tinitial) followed by the effective stepsize (option StepSize or StepSizeZWPs, whichever is larger); this allows the Time field for the main DATA lines to be omitted without loss of information in simple cases, saving space at the expense of convenience. (If storage space is not a concern, it is more robust to output the Time explicitly with the DATA —and even necessary, for time-regularized integrations.) Column 3 gives the DATA sampling interval in units of the StepSize. Columns 4 and 5 of this line list the number of DATA columns, and the digits of precision (text files) or the bytes per number (binary files), respectively.
0-Time (= Epoch) 1-x1 2-x2 3-x3 4-v1 5-v2 6-v3 7-SemiMajorAxis 8-Eccentricity 9-Inclination 10-LongAscendNode 11-ArgPeriapse 12-LongPeriapse 13-TimePeriapse 14-PeriDistance 15-MeanAnomaly 16-TrueAnomaly 17-MeanLongitude 18-TrueLongitude 19-MeanLatitude 20-TrueLatitude 21-Mass 22-EncRadius 23-CaptRadius 24-IdTag 25-JacIndex
One or more comment lines may follow the initial header in files with text DATA. For binary files, the main DATA begins immediately following the newline of the last header line; no comments are permitted since the binary data itself may happen to begin with a '#' character.
Following the header and comments (if present), are the main file DATA lines. The meaning of the DATA lines is as follows: