| < 3.4 Description of the grav file | 3.6 Description of the log file > |
The data exported out can be used or changed by other programs as well, which can be reimported into the Gravity program. The export/import file contains in text form the major parameters or the System and the data of Bodies. This file is divided into sections, which are separated by a blank line. The first one is the section for the system. The others are for the bodies.
The system section contains the program name, gravitational constant, time unit, refresh time, simulation length, zoom and the number of bodies.
A body section contains the program name, x and y components of the position vector, x and y components of the velocity vector, the mass, diameter, color and group identifier of its own.
An example of export/import file is contained in Table 26:
| Section | Line name (at the beginning of the line) |
Data (after the first tab) |
Data (after the second tab) |
| System | Application: | Gravity | 1.3 |
| System name: | Sun + Earth | ||
| Grav. const: | 6.6742149999999994e-011 | ||
| Time unit (s): | 540 | ||
| Refresh (s): | 100000 | ||
| Length (s): | 100000000 | ||
| Zoom: | 1.8e-010 | ||
| Bodies: | 2 | ||
| <blank line> | |||
| Body (1) | Name (1): | Sun | |
| Position (x,y): | 0 | 0 | |
| Velocity (x,y): | -14 | 0 | |
| Mass (kg): | 2e+030 | ||
| Diameter (m): | 1400000000 | ||
| Color (RGB): | 0xffff | ||
| Group: | 0 | ||
| <blank line> | |||
| Body (2) | Name (2): | Earth | |
| Position (x,y): | 0 | -149000000000 | |
| Velocity (x,y): | -29790 | 0 | |
| Mass (kg): | 5.9800000000000005e+024 | ||
| Diameter (m): | 12756000 | ||
| Color (RGB): | 0xff0000 | ||
| Group: | 0 | ||
Table 26. Export/import file (example)
| < 3.4 Description of the grav file | 3.6 Description of the log file > |