-
Notifications
You must be signed in to change notification settings - Fork 5
Orbital JSONs
- What's an orbital
- Orbital Mechanics
- Orbital Path Reference
- Directory structure
- Compilation
- NASA JPL Horizons database
- JSON data
An orbital is an object that orbits something (e.g., planet, satellite, comet, etc). Moreover, an orbital has a parent-child relationship with the thing it orbits. For example, Jupiter is an orbital of the Sun/Solar System barycenter (i.e. the <0>
vector in the scene); the Moon is an orbital of the Earth barycenter.
-
A
– Minor, orbiting body -
B
– Major body being orbited by A -
C
– Reference plane, e.g. the ecliptic -
D
– Orbital plane of A -
E
– Descending node -
F
– Periapsis -
G
– Ascending node -
H
– Apoapsis -
i
– Inclination -
J
– Reference direction; for orbits in or near the ecliptic, usually the vernal point -
Ω
– Longitude of the ascending node -
ω
– Argument of the periapsis
-
a
– Semimajor axis -
b
– Semiminor axis -
f
– Focus of the ellipse
JSON files for each orbital lives in the directory public/static/data/orbitals/<system>
. If an orbital has satellites, it is listed in the satellites
array, and lives in its own <system>
folder. The name of the JSON file will be the assumed identifier (id
) of the orbital, so no two orbital JSONs should have the same name.
Suppose 'Jupiter' is an orbital and it has a moon 'Io.' Jupiter obviously has satellites (Io), but Io has no satellites. In this case, the file structure would look like the following:
./public/static/data/orbitals
|-- ./jupiter
|-- ./jupiter.json
`-- ./io.json
The script yarn orbitals
will search for all planet systems directly in the orbitals/
folder, take all JSON files it finds, and creates a key-value map of id -> data. For each satellite specified in the satellites
parameter, it will map its respective satellite data to it, and exclude it from the top level of the JSON data.
The compiled file will be in the path public/static/data/orbitals.json
.
The NASA/Jet Propulsion Laboratory provides ephemeris data for major Solar System bodies.
The script yarn ephemeris
will probe the Horizons' database for the latest ephemeris data for the planets specified in the orbital JSON files and update these files with the following information:
The prerequisite data is an object should be defined in the ephemeris
object. This is data that will be used by the script to look up ephemeris data.
- it requires significant effort to look up precise periapses, especially for slow-moving bodies
- ephemerides may change over time due to gravitational aberrations, new discoveries or some unforeseen cosmic calamity
- flexibility to add more planetary data without much work
String
Name of the orbital. Displayed in UI (labels, modal title, etc). Required.
Number
Radius of the orbital, in kilometers. Required
Number
Sidereal time of the orbital, in sidereal days. Presumed synchronous if none specified.
String
Path to markdown file for the description. Required.
Markdown should live in the path: public/static/data/markdown
.
Number
Mass, in kilograms, of the orbital. Required.
Number
Mass, in kilograms, of the body that this orbital is orbiting. For planets, this value should be the mass of the Sun ( 1.9891e+30 kilograms). Required.
Number
Axial tilt of the orbital, in degrees.
Angle of inclination. See: See: i
in Orbital Mechanics.
Number
Argument of the periapsis. Automatically generated by the yarn ephemeris
script. See: ω
in Orbital Mechanics.
Number
Longitude of the ascending node. Automatically generated by the yarn ephemeris
. See: Ω
in Orbital Mechanics.
Number
Semimajor axis of the orbital, in kilometers. Automatically generated by the yarn ephemeris
. See a
in Orbital Path Reference.
Number
Semiminor axis of the orbital, in kilometers. Automatically generated by the yarn ephemeris
. See b
in Orbital Path Reference.
Number
Orbital eccentricity. Automatically generated by the yarn ephemeris
. See e
in Orbital Path Reference.
Object
Periapses epochs, in UNIX time (in milliseconds), of any given periapsis event and the one proceeding it. A periapsis event is defined to be the precise moment when an orbital is closest in distance to the thing it's orbiting during its revolution period.
Automatically generated by the yarn ephemeris
.
Number
Last periapsis epoch, in UNIX time (in milliseconds). Required
Number
Last periapsis epoch, in UNIX time (in milliseconds). Required
Number
Color of the atmosphere. The orbital path ("planet trail") will also take on this color. Defaults to 0x000000
.
String[]
List of satellites that orbit this orbital. The satellites should match the id
of the orbital (i.e., the file name).
Object
The ring data of the orbital, if any.
Number
The radius of the ring set. Required
The path to the ring texture of the orbital. Required
Object
Textures of the orbital.
String
Path to the specular map texture.
String
Path to the bump map texture.
String
Path to the alpha map texture.
String
Path to the emissive map texture.
Data that will be used by the script to look up ephemeris data from the NASA/JPL Horizons database.
String
Order of the period, in Earth time, that it takes for the given orbital to make one full revolution around its system's barycenter. For example, Jupiter takes ~11 years to make one revolution, so the revolution order would be years. Io takes ~3 days to make one full revolution, so its revolution order would be days.
Valid values are:
-
y
years -
mo
months -
d
days -
m
minutes -
s
seconds
String
NASA Horizons code for the orbital lookup. Required.
String
NASA Horizons code for the barycenter lookup. Required.
Coming soon.