This commit is contained in:
Leon Liu 2025-08-15 09:59:59 +09:00
parent 945784a7cf
commit ee4590276a
8 changed files with 290 additions and 682 deletions

View File

@ -1,152 +0,0 @@
curl -s "https://ssd.jpl.nasa.gov/api/horizons.api?format=text&COMMAND=%27399%27&CENTER=%27%40sun%27&EPHEM_TYPE=%27VECTORS%27&OUT_UNITS=%27AU-D%27&START_TIME=%272000-01-01%2012:00%27&STOP_TIME=%272000-01-01%2012:01%27&STEP_SIZE=%271%20m%27&VEC_TABLE=2&REF_PLANE=%27ECLIPTIC%27&REF_SYSTEM=%27J2000%27"
API VERSION: 1.2
API SOURCE: NASA/JPL Horizons API
*******************************************************************************
Revised: April 12,
2021 Earth 399
GEOPHYSICAL PROPERTIES (revised May 9,
2022):
Vol. Mean Radius (km) = 6371.01+-0.02 Mass x10^24 (kg)= 5.97219+-0.0006
Equ. radius, km = 6378.137 Mass layers:
Polar axis, km = 6356.752 Atmos = 5.1 x 10^18 kg
Flattening = 1/298.257223563 oceans = 1.4 x 10^21 kg
Density, g/cm^3 = 5.51 crust = 2.6 x 10^22 kg
J2 (IERS 2010) = 0.00108262545 mantle = 4.043 x 10^24 kg
g_p, m/s^2 (polar) = 9.8321863685 outer core = 1.835 x 10^24 kg
g_e, m/s^2 (equatorial) = 9.7803267715 inner core = 9.675 x 10^22 kg
g_o, m/s^2 = 9.82022 Fluid core rad = 3480 km
GM, km^3/s^2 = 398600.435436 Inner core rad = 1215 km
GM 1-sigma, km^3/s^2 = 0.0014 Escape velocity = 11.186 km/s
Rot. Rate (rad/s) = 0.00007292115 Surface area:
Mean sidereal day, hr = 23.9344695944 land = 1.48 x 10^8 km
Mean solar day 2000.0, s = 86400.002 sea = 3.62 x 10^8 km
Mean solar day 1820.0, s = 86400.0 Love no., k2 = 0.299
Moment of inertia = 0.3308 Atm. pressure = 1.0 bar
Mean surface temp (Ts), K= 287.6 Volume, km^3 = 1.08321 x 10^12
Mean effect. temp (Te), K= 255 Magnetic moment = 0.61 gauss Rp^3
Geometric albedo = 0.367 Vis. mag. V(1,
0)= -3.86
Solar Constant (W/m^2) = 1367.6 (mean),
1414 (perihelion),
1322 (aphelion)
HELIOCENTRIC ORBIT CHARACTERISTICS:
Obliquity to orbit, deg = 23.4392911 Sidereal orb period = 1.0000174 y
Orbital speed, km/s = 29.79 Sidereal orb period = 365.25636 d
Mean daily motion, deg/d = 0.9856474 Hill's sphere radius = 234.9
*******************************************************************************
*******************************************************************************
Ephemeris / API_USER Wed Aug 13 04: 00: 37 2025 Pasadena, USA / Horizons
*******************************************************************************
Target body name: Earth (399) {source: DE441
}
Center body name: Sun (10) {source: DE441
}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2000-Jan-01 12: 00: 00.0000 TDB
Stop time : A.D. 2000-Jan-01 12: 01: 00.0000 TDB
Step-size : 1 minutes
*******************************************************************************
Center geodetic : 0.0,
0.0,
0.0 {E-lon(deg),Lat(deg),Alt(km)
}
Center cylindric: 0.0,
0.0,
0.0 {E-lon(deg),Dxy(km),Dz(km)
}
Center radii : 695700.0,
695700.0,
695700.0 km {Equator_a, b, pole_c
}
Output units : AU-D
Calendar mode : Mixed Julian/Gregorian
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
JDTDB
X Y Z
VX VY VZ
*******************************************************************************
$$SOE
2451545.000000000 = A.D. 2000-Jan-01 12: 00: 00.0000 TDB
X =-1.771350992727098E-01 Y = 9.672416867665306E-01 Z =-4.085281582511366E-06
VX=-1.720762506872895E-02 VY=-3.158782144324866E-03 VZ= 1.049888594613343E-07
2451545.000694444 = A.D. 2000-Jan-01 12: 01: 00.0000 TDB
X =-1.771470489993106E-01 Y = 9.672394930949845E-01 Z =-4.085208640488331E-06
VX=-1.720758754114626E-02 VY=-3.158991907845201E-03 VZ= 1.050842029536420E-07
$$EOE
*******************************************************************************
TIME
Barycentric Dynamical Time ("TDB" or T_eph) output was requested. This
continuous coordinate time is equivalent to the relativistic proper time
of a clock at rest in a reference frame co-moving with the solar system
barycenter but outside the system's gravity well. It is the independent
variable in the solar system relativistic equations of motion.
TDB runs at a uniform rate of one SI second per second and is independent
of irregularities in Earth's rotation.
CALENDAR SYSTEM
Mixed calendar mode was active such that calendar dates after AD 1582-Oct-15
(if any) are in the modern Gregorian system. Dates prior to 1582-Oct-5 (if any)
are in the Julian calendar system, which is automatically extended for dates
prior to its adoption on 45-Jan-1 BC. The Julian calendar is useful for
matching historical dates. The Gregorian calendar more accurately corresponds
to the Earth's orbital motion and seasons. A "Gregorian-only" calendar mode is
available if such physical events are the primary interest.
REFERENCE FRAME AND COORDINATES
Ecliptic at the standard reference epoch
Reference epoch: J2000.0
X-Y plane: adopted Earth orbital plane at the reference epoch
Note: IAU76 obliquity of 84381.448 arcseconds wrt ICRF X-Y plane
X-axis : ICRF
Z-axis : perpendicular to the X-Y plane in the directional (+ or -) sense
of Earth's north pole at the reference epoch.
Symbol meaning [
1 au= 149597870.700 km,
1 day= 86400.0 s
]:
JDTDB Julian Day Number, Barycentric Dynamical Time
X X-component of position vector (au)
Y Y-component of position vector (au)
Z Z-component of position vector (au)
VX X-component of velocity vector (au/day)
VY Y-component of velocity vector (au/day)
VZ Z-component of velocity vector (au/day)
ABERRATIONS AND CORRECTIONS
Geometric state vectors have NO corrections or aberrations applied.
Computations by ...
Solar System Dynamics Group, Horizons On-Line Ephemeris System
4800 Oak Grove Drive, Jet Propulsion Laboratory
Pasadena, CA 91109 USA
General site: https: //ssd.jpl.nasa.gov/
Mailing list: https: //ssd.jpl.nasa.gov/email_list.html
System news : https: //ssd.jpl.nasa.gov/horizons/news.html
User Guide : https: //ssd.jpl.nasa.gov/horizons/manual.html
Connect : browser https: //ssd.jpl.nasa.gov/horizons/app.html#/x
API https: //ssd-api.jpl.nasa.gov/doc/horizons.html
command-line telnet ssd.jpl.nasa.gov 6775
e-mail/batch https: //ssd.jpl.nasa.gov/ftp/ssd/horizons_batch.txt
scripts https: //ssd.jpl.nasa.gov/ftp/ssd/SCRIPTS
Author : Jon.D.Giorgini@jpl.nasa.gov
*******************************************************************************

219
assets/initial_state.ron Normal file
View File

@ -0,0 +1,219 @@
// mass kg f64
// radius km f64
// position au f64
// velocity au/day f64
(
bodies: [
(
name: "Sun",
mass: 1.98841e30,
radius: 695700.0,
position: (0.0, 0.0, 0.0),
velocity: (0.0, 0.0, 0.0),
),
(
name: "Mercury",
mass: 3.302e23,
radius: 2439.4,
position: (-3.873030085256687e-01, -1.617241946342014e-01, 2.230772540124238e-02),
velocity: (5.024430196457658e-03, -2.474345331076241e-02, -2.482923861184285e-03),
),
(
name: "Venus",
mass: 4.8685e24,
radius: 6051.84,
position: (4.534187654737982e-01, 5.622160792960551e-01, -1.844136025242647e-02),
velocity: (-1.580627428004959e-02, 1.261006264179427e-02, 1.085217883057661e-03),
),
(
name: "Earth",
mass: 5.97219e24,
radius: 6371.01,
position: (-1.786834409731047e-01, 9.669827953774551e-01, -5.109423915082682e-05),
velocity: (-1.720473858166942e-02, -3.193533189307208e-03, 5.457174067040888e-09),
),
(
name: "Mars",
mass: 6.4171e23,
radius: 3389.92,
position: (-5.216858665681381e-01, 1.525234576802456e+00, 4.475559803760917e-02),
velocity: (-1.271183490340250e-02, -3.338839586395265e-03, 2.417788175776839e-04),
),
(
name: "Jupiter",
mass: 1.89819e27,
radius: 69911.0,
position: (1.056033545576702e+00, 4.971452162023883e+00, -4.427806378454757e-02),
velocity: (-7.476272400979211e-03, 1.924466075080766e-03, 1.592575331437652e-04),
),
(
name: "Saturn",
mass: 5.6834e26,
radius: 58232.0,
position: (9.461067271500818e+00, -1.764614720843175e+00, -3.458764004169705e-01),
velocity: (7.093807804551229e-04, 5.475097536527790e-03, -1.232345969963958e-04),
),
(
name: "Uranus",
mass: 8.6813e25,
radius: 25362.0,
position: (1.110362881512566e+01, 1.609448391218202e+01, -8.419833258524990e-02),
velocity: (-3.273728238819980e-03, 2.053528328895527e-03, 5.008589052969062e-05),
),
(
name: "Neptune",
mass: 1.02409e26,
radius: 24624.0,
position: (2.987992735576156e+01, -6.341879950443392e-01, -6.754997950415415e-01),
velocity: (3.941595250081164e-05, 3.160389775728832e-03, -6.636996572427530e-05),
),
(
name: "Pluto",
mass: 1.307e22,
radius: 1188.3,
position: (1.822881632666475e+01, -3.000801293901950e+01, -2.059815785829023e+00),
velocity: (2.758977855246929e-03, 9.457264850164455e-04, -8.880815395819214e-04),
),
(
name: "Moon",
mass: 7.349e22,
radius: 1737.53,
position: (-1.776670337217189e-01, 9.646511868801392e-01, -2.560710414773878e-04),
velocity: (-1.666610342674751e-02, -2.935662211368250e-03, 2.214641479437884e-05),
),
(
name: "Phobos",
mass: 1.08e16,
radius: 11.1,
position: (-5.216607506283159e-01, 1.525290094552813e+00, 4.474552444674667e-02),
velocity: (-1.371531677510715e-02, -2.797359927923991e-03, 7.604209362929195e-04),
),
(
name: "Deimos",
mass: 1.80e15,
radius: 6.2,
position: (-5.215476623931578e-01, 1.525280501692070e+00, 4.469744727198185e-02),
velocity: (-1.290124900899404e-02, -2.594527535740538e-03, 3.799855876623048e-04),
),
(
name: "Io",
mass: 8.93e22,
radius: 1821.49,
position: (1.053815818667817e+00, 4.969715993299296e+00, -4.437108516416628e-02),
velocity: (-1.329530996368361e-03, -5.983335980023409e-03, -3.295420474951598e-05),
),
(
name: "Europa",
mass: 4.80e22,
radius: 1560.8,
position: (1.060479105966296e+00, 4.971193788432235e+00, -4.418907806556983e-02),
velocity: (-6.967074192246404e-03, 9.896683771810605e-03, 4.296001484155991e-04),
),
(
name: "Ganymede",
mass: 1.48e23,
radius: 2631.2,
position: (1.062520398626604e+00, 4.968458682597362e+00, -4.429967587277176e-02),
velocity: (-4.841408463186764e-03, 7.634290231598638e-03, 4.147177169244575e-04),
),
(
name: "Callisto",
mass: 1.08e23,
radius: 2410.3,
position: (1.046927187861326e+00, 4.980213520221207e+00, -4.412635447845523e-02),
velocity: (-1.076662893789138e-02, -1.453153071657253e-03, 9.400054299331563e-06),
),
(
name: "Mimas",
mass: 3.75e19,
radius: 198.8,
position: (9.462113317387443e+00, -1.764120396234732e+00, -3.462575454806998e-01),
velocity: (-3.600569225193193e-03, 1.195945377622506e-02, -3.321658418910402e-03),
),
(
name: "Enceladus",
mass: 1.0805e20,
radius: 252.3,
position: (9.462107070733344e+00, -1.763590731315564e+00, -3.465134777458668e-01),
velocity: (-4.799068161710644e-03, 9.904458072213898e-03, -1.910803547584920e-03),
),
(
name: "Tethys",
mass: 6.176e20,
radius: 536.3,
position: (9.463028141754283e+00, -1.764725184828637e+00, -3.460263238634043e-01),
velocity: (8.124741088132637e-04, 1.132977234261396e-02, -3.072248079372077e-03),
),
(
name: "Dione",
mass: 1.09572e21,
radius: 562.5,
position: (9.460669031566509e+00, -1.762393870120674e+00, -3.470001695782450e-01),
velocity: (-4.995042476514132e-03, 4.898468069198046e-03, 7.315317142172153e-04),
),
(
name: "Rhea",
mass: 2.309e21,
radius: 764.5,
position: (9.463441058546145e+00, -1.766997606737125e+00, -3.448366300385151e-01),
velocity: (4.307393238751094e-03, 8.273257376182423e-03, -1.932435874857194e-03),
),
(
name: "Titan",
mass: 1.34553e23,
radius: 2575.5,
position: (9.468440328490537e+00, -1.762284834421733e+00, -3.478122131916790e-01),
velocity: (-4.611400435334967e-04, 8.260265884102586e-03, -1.443082816825538e-03),
),
(
name: "Iapetus",
mass: 1.8059e21,
radius: 734.5,
position: (9.454548058738080e+00, -1.786906158368561e+00, -3.394196336672040e-01),
velocity: (2.477125925502744e-03, 4.942920731685813e-03, -3.564738618756286e-04),
),
(
name: "Miranda",
mass: 6.59e19,
radius: 235.8,
position: (1.110338075481133e+01, 1.609470886437212e+01, -8.339848717695617e-02),
velocity: (2.787135511093017e-04, 1.302160355796409e-03, 1.366210183434322e-03),
),
(
name: "Ariel",
mass: 1.25e21,
radius: 578.9,
position: (1.110453239435098e+01, 1.609416926126415e+01, -8.504238243640228e-02),
velocity: (-5.417334967749265e-03, 2.196892645955784e-03, -2.298152372242362e-03),
),
(
name: "Umbriel",
mass: 1.28e21,
radius: 584.7,
position: (1.110253678329407e+01, 1.609490555702174e+01, -8.286998450094619e-02),
velocity: (-1.219602563560983e-03, 1.849034126664038e-03, 1.801100761916168e-03),
),
(
name: "Titania",
mass: 3.34e21,
radius: 788.9,
position: (1.110510884778205e+01, 1.609382177197045e+01, -8.661833178512783e-02),
velocity: (-5.032495225759578e-03, 2.280002002691279e-03, -1.088327315015861e-03),
),
(
name: "Oberon",
mass: 3.08e21,
radius: 761.4,
position: (1.110301190463219e+01, 1.609515778477002e+01, -8.040210462613612e-02),
velocity: (-1.519780917379062e-03, 1.720169702110850e-03, 3.926675849694972e-04),
),
(
name: "Triton",
mass: 2.14e22,
radius: 1352.6,
position: (2.987802053077272e+01, -6.355569689698364e-01, -6.751627943073906e-01),
velocity: (-6.787804924900204e-04, 4.636375429506899e-03, 1.865945736548040e-03),
),
],
)

View File

@ -1,219 +0,0 @@
// mass kg f64
// radius km f64
// position au f64
// velocity au/day f64
{
bodies: [
{
name: "Sun",
mass: 1.98841e30,
radius: 695700.0,
position: [0.0, 0.0, 0.0],
velocity: [0.0, 0.0, 0.0],
},
{
name: "Mercury",
mass: 3.302e23,
radius: 2439.4,
position: [-3.873030085256687e-01, -1.617241946342014e-01, 2.230772540124238e-02],
velocity: [5.024430196457658e-03, -2.474345331076241e-02, -2.482923861184285e-03],
},
{
name: "Venus",
mass: 4.8685e24,
radius: 6051.84,
position: [4.534187654737982e-01, 5.622160792960551e-01, -1.844136025242647e-02],
velocity: [-1.580627428004959e-02, 1.261006264179427e-02, 1.085217883057661e-03],
},
{
name: "Earth",
mass: 5.97219e24,
radius: 6371.01,
position: [-1.786834409731047e-01, 9.669827953774551e-01, -5.109423915082682e-05],
velocity: [-1.720473858166942e-02, -3.193533189307208e-03, 5.457174067040888e-09],
},
{
name: "Mars",
mass: 6.4171e23,
radius: 3389.92,
position: [-5.216858665681381e-01, 1.525234576802456e+00, 4.475559803760917e-02],
velocity: [-1.271183490340250e-02, -3.338839586395265e-03, 2.417788175776839e-04],
},
{
name: "Jupiter",
mass: 1.89819e27,
radius: 69911.0,
position: [1.056033545576702e+00, 4.971452162023883e+00, -4.427806378454757e-02],
velocity: [-7.476272400979211e-03, 1.924466075080766e-03, 1.592575331437652e-04],
},
{
name: "Saturn",
mass: 5.6834e26,
radius: 58232.0,
position: [9.461067271500818e+00, -1.764614720843175e+00, -3.458764004169705e-01],
velocity: [7.093807804551229e-04, 5.475097536527790e-03, -1.232345969963958e-04],
},
{
name: "Uranus",
mass: 8.6813e25,
radius: 25362.0,
position: [1.110362881512566e+01, 1.609448391218202e+01, -8.419833258524990e-02],
velocity: [-3.273728238819980e-03, 2.053528328895527e-03, 5.008589052969062e-05],
},
{
name: "Neptune",
mass: 1.02409e26,
radius: 24624.0,
position: [2.987992735576156e+01, -6.341879950443392e-01, -6.754997950415415e-01],
velocity: [3.941595250081164e-05, 3.160389775728832e-03, -6.636996572427530e-05],
},
{
name: "Pluto",
mass: 1.307e22,
radius: 1188.3,
position: [1.822881632666475e+01, -3.000801293901950e+01, -2.059815785829023e+00],
velocity: [2.758977855246929e-03, 9.457264850164455e-04, -8.880815395819214e-04],
},
{
name: "Moon",
mass: 7.349e22,
radius: 1737.53,
position: [-1.776670337217189e-01, 9.646511868801392e-01, -2.560710414773878e-04],
velocity: [-1.666610342674751e-02, -2.935662211368250e-03, 2.214641479437884e-05],
},
{
name: "Phobos",
mass: 1.08e16,
radius: 11.1,
position: [-5.216607506283159e-01, 1.525290094552813e+00, 4.474552444674667e-02],
velocity: [-1.371531677510715e-02, -2.797359927923991e-03, 7.604209362929195e-04],
},
{
name: "Deimos",
mass: 1.80e15,
radius: 6.2,
position: [-5.215476623931578e-01, 1.525280501692070e+00, 4.469744727198185e-02],
velocity: [-1.290124900899404e-02, -2.594527535740538e-03, 3.799855876623048e-04],
},
{
name: "Io",
mass: 8.93e22,
radius: 1821.49,
position: [1.053815818667817e+00, 4.969715993299296e+00, -4.437108516416628e-02],
velocity: [-1.329530996368361e-03, -5.983335980023409e-03, -3.295420474951598e-05],
},
{
name: "Europa",
mass: 4.80e22,
radius: 1560.8,
position: [1.060479105966296e+00, 4.971193788432235e+00, -4.418907806556983e-02],
velocity: [-6.967074192246404e-03, 9.896683771810605e-03, 4.296001484155991e-04],
},
{
name: "Ganymede",
mass: 1.48e23,
radius: 2631.2,
position: [1.062520398626604e+00, 4.968458682597362e+00, -4.429967587277176e-02],
velocity: [-4.841408463186764e-03, 7.634290231598638e-03, 4.147177169244575e-04],
},
{
name: "Callisto",
mass: 1.08e23,
radius: 2410.3,
position: [1.046927187861326e+00, 4.980213520221207e+00, -4.412635447845523e-02],
velocity: [-1.076662893789138e-02, -1.453153071657253e-03, 9.400054299331563e-06],
},
{
name: "Mimas",
mass: 3.75e19,
radius: 198.8,
position: [9.462113317387443e+00, -1.764120396234732e+00, -3.462575454806998e-01],
velocity: [-3.600569225193193e-03, 1.195945377622506e-02, -3.321658418910402e-03],
},
{
name: "Enceladus",
mass: 1.0805e20,
radius: 252.3,
position: [9.462107070733344e+00, -1.763590731315564e+00, -3.465134777458668e-01],
velocity: [-4.799068161710644e-03, 9.904458072213898e-03, -1.910803547584920e-03],
},
{
name: "Tethys",
mass: 6.176e20,
radius: 536.3,
position: [9.463028141754283e+00, -1.764725184828637e+00, -3.460263238634043e-01],
velocity: [8.124741088132637e-04, 1.132977234261396e-02, -3.072248079372077e-03],
},
{
name: "Dione",
mass: 1.09572e21,
radius: 562.5,
position: [9.460669031566509e+00, -1.762393870120674e+00, -3.470001695782450e-01],
velocity: [-4.995042476514132e-03, 4.898468069198046e-03, 7.315317142172153e-04],
},
{
name: "Rhea",
mass: 2.309e21,
radius: 764.5,
position: [9.463441058546145e+00, -1.766997606737125e+00, -3.448366300385151e-01],
velocity: [4.307393238751094e-03, 8.273257376182423e-03, -1.932435874857194e-03],
},
{
name: "Titan",
mass: 1.34553e23,
radius: 2575.5,
position: [9.468440328490537e+00, -1.762284834421733e+00, -3.478122131916790e-01],
velocity: [-4.611400435334967e-04, 8.260265884102586e-03, -1.443082816825538e-03],
},
{
name: "Iapetus",
mass: 1.8059e21,
radius: 734.5,
position: [9.454548058738080e+00, -1.786906158368561e+00, -3.394196336672040e-01],
velocity: [2.477125925502744e-03, 4.942920731685813e-03, -3.564738618756286e-04],
},
{
name: "Miranda",
mass: 6.59e19,
radius: 235.8,
position: [1.110338075481133e+01, 1.609470886437212e+01, -8.339848717695617e-02],
velocity: [2.787135511093017e-04, 1.302160355796409e-03, 1.366210183434322e-03],
},
{
name: "Ariel",
mass: 1.25e21,
radius: 578.9,
position: [1.110453239435098e+01, 1.609416926126415e+01, -8.504238243640228e-02],
velocity: [-5.417334967749265e-03, 2.196892645955784e-03, -2.298152372242362e-03],
},
{
name: "Umbriel",
mass: 1.28e21,
radius: 584.7,
position: [1.110253678329407e+01, 1.609490555702174e+01, -8.286998450094619e-02],
velocity: [-1.219602563560983e-03, 1.849034126664038e-03, 1.801100761916168e-03],
},
{
name: "Titania",
mass: 3.34e21,
radius: 788.9,
position: [1.110510884778205e+01, 1.609382177197045e+01, -8.661833178512783e-02],
velocity: [-5.032495225759578e-03, 2.280002002691279e-03, -1.088327315015861e-03],
},
{
name: "Oberon",
mass: 3.08e21,
radius: 761.4,
position: [1.110301190463219e+01, 1.609515778477002e+01, -8.040210462613612e-02],
velocity: [-1.519780917379062e-03, 1.720169702110850e-03, 3.926675849694972e-04],
},
{
name: "Triton",
mass: 2.14e22,
radius: 1352.6,
position: [2.987802053077272e+01, -6.355569689698364e-01, -6.751627943073906e-01],
velocity: [-6.787804924900204e-04, 4.636375429506899e-03, 1.865945736548040e-03],
},
],
}

View File

@ -1,127 +0,0 @@
curl -s "https://ssd.jpl.nasa.gov/api/horizons.api?format=text&COMMAND=%27301%27&CENTER=%27%40sun%27&EPHEM_TYPE=%27VECTORS%27&OUT_UNITS=%27AU-D%27&START_TIME=%272025-01-01%2000:00%27&STOP_TIME=%272025-01-01%2000:01%27&STEP_SIZE=%271%20m%27&VEC_TABLE=2&REF_PLANE=%27ECLIPTIC%27&REF_SYSTEM=%27J2000%27"
API VERSION: 1.2
API SOURCE: NASA/JPL Horizons API
*******************************************************************************
Revised: July 31, 2013 Moon / (Earth) 301
GEOPHYSICAL DATA (updated 2018-Aug-15):
Vol. mean radius, km = 1737.53+-0.03 Mass, x10^22 kg = 7.349
Radius (gravity), km = 1738.0 Surface emissivity = 0.92
Radius (IAU), km = 1737.4 GM, km^3/s^2 = 4902.800066
Density, g/cm^3 = 3.3437 GM 1-sigma, km^3/s^2 = +-0.0001
V(1,0) = +0.21 Surface accel., m/s^2 = 1.62
Earth/Moon mass ratio = 81.3005690769 Farside crust. thick. = ~80 - 90 km
Mean crustal density = 2.97+-.07 g/cm^3 Nearside crust. thick.= 58+-8 km
Heat flow, Apollo 15 = 3.1+-.6 mW/m^2 Mean angular diameter = 31'05.2"
Heat flow, Apollo 17 = 2.2+-.5 mW/m^2 Sid. rot. rate, rad/s = 0.0000026617
Geometric Albedo = 0.12 Mean solar day = 29.5306 d
Obliquity to orbit = 6.67 deg Orbit period = 27.321582 d
Semi-major axis, a = 384400 km Eccentricity = 0.05490
Mean motion, rad/s = 2.6616995x10^-6 Inclination = 5.145 deg
Apsidal period = 3231.50 d Nodal period = 6798.38 d
Perihelion Aphelion Mean
Solar Constant (W/m^2) 1414+-7 1323+-7 1368+-7
Maximum Planetary IR (W/m^2) 1314 1226 1268
Minimum Planetary IR (W/m^2) 5.2 5.2 5.2
********************************************************************************
*******************************************************************************
Ephemeris / API_USER Wed Aug 13 04:01:18 2025 Pasadena, USA / Horizons
*******************************************************************************
Target body name: Moon (301) {source: DE441}
Center body name: Sun (10) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2000-Jan-01 12:00:00.0000 TDB
Stop time : A.D. 2000-Jan-01 12:01:00.0000 TDB
Step-size : 1 minutes
*******************************************************************************
Center geodetic : 0.0, 0.0, 0.0 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.0, 0.0, 0.0 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : 695700.0, 695700.0, 695700.0 km {Equator_a, b, pole_c}
Output units : AU-D
Calendar mode : Mixed Julian/Gregorian
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
JDTDB
X Y Z
VX VY VZ
*******************************************************************************
$$SOE
2451545.000000000 = A.D. 2000-Jan-01 12:00:00.0000 TDB
X =-1.790843809223965E-01 Y = 9.654035607264573E-01 Z = 2.383726922995396E-04
VX=-1.683595459141215E-02 VY=-3.580960720855671E-03 VZ=-6.540550604528720E-06
2451545.000694444 = A.D. 2000-Jan-01 12:01:00.0000 TDB
X =-1.790960725225740E-01 Y = 9.654010738956424E-01 Z = 2.383681475637660E-04
VX=-1.683585392087164E-02 VY=-3.581112024431721E-03 VZ=-6.548288423082821E-06
$$EOE
*******************************************************************************
TIME
Barycentric Dynamical Time ("TDB" or T_eph) output was requested. This
continuous coordinate time is equivalent to the relativistic proper time
of a clock at rest in a reference frame co-moving with the solar system
barycenter but outside the system's gravity well. It is the independent
variable in the solar system relativistic equations of motion.
TDB runs at a uniform rate of one SI second per second and is independent
of irregularities in Earth's rotation.
CALENDAR SYSTEM
Mixed calendar mode was active such that calendar dates after AD 1582-Oct-15
(if any) are in the modern Gregorian system. Dates prior to 1582-Oct-5 (if any)
are in the Julian calendar system, which is automatically extended for dates
prior to its adoption on 45-Jan-1 BC. The Julian calendar is useful for
matching historical dates. The Gregorian calendar more accurately corresponds
to the Earth's orbital motion and seasons. A "Gregorian-only" calendar mode is
available if such physical events are the primary interest.
REFERENCE FRAME AND COORDINATES
Ecliptic at the standard reference epoch
Reference epoch: J2000.0
X-Y plane: adopted Earth orbital plane at the reference epoch
Note: IAU76 obliquity of 84381.448 arcseconds wrt ICRF X-Y plane
X-axis : ICRF
Z-axis : perpendicular to the X-Y plane in the directional (+ or -) sense
of Earth's north pole at the reference epoch.
Symbol meaning [1 au= 149597870.700 km, 1 day= 86400.0 s]:
JDTDB Julian Day Number, Barycentric Dynamical Time
X X-component of position vector (au)
Y Y-component of position vector (au)
Z Z-component of position vector (au)
VX X-component of velocity vector (au/day)
VY Y-component of velocity vector (au/day)
VZ Z-component of velocity vector (au/day)
ABERRATIONS AND CORRECTIONS
Geometric state vectors have NO corrections or aberrations applied.
Computations by ...
Solar System Dynamics Group, Horizons On-Line Ephemeris System
4800 Oak Grove Drive, Jet Propulsion Laboratory
Pasadena, CA 91109 USA
General site: https://ssd.jpl.nasa.gov/
Mailing list: https://ssd.jpl.nasa.gov/email_list.html
System news : https://ssd.jpl.nasa.gov/horizons/news.html
User Guide : https://ssd.jpl.nasa.gov/horizons/manual.html
Connect : browser https://ssd.jpl.nasa.gov/horizons/app.html#/x
API https://ssd-api.jpl.nasa.gov/doc/horizons.html
command-line telnet ssd.jpl.nasa.gov 6775
e-mail/batch https://ssd.jpl.nasa.gov/ftp/ssd/horizons_batch.txt
scripts https://ssd.jpl.nasa.gov/ftp/ssd/SCRIPTS
Author : Jon.D.Giorgini@jpl.nasa.gov
*******************************************************************************

View File

@ -1,126 +0,0 @@
curl -s "https://ssd.jpl.nasa.gov/api/horizons.api?format=text&COMMAND=%27%40sun%27&CENTER=%27%40sun%27&EPHEM_TYPE=%27VECTORS%27&OUT_UNITS=%27AU-D%27&START_TIME=%272000-01-01%2012:00%27&STOP_TIME=%272000-01-01%2012:01%27&STEP_SIZE=%271%20m%27&VEC_TABLE=2&REF_PLANE=%27ECLIPTIC%27&REF_SYSTEM=%27J2000%27"
API VERSION: 1.2
API SOURCE: NASA/JPL Horizons API
*******************************************************************************
Revised: July 31, 2013 Sun 10
PHYSICAL PROPERTIES (updated 2024-Oct-30):
GM, km^3/s^2 = 132712440041.93938 Mass, 10^24 kg = ~1988410
Vol. mean radius, km = 695700 Volume, 10^12 km^3 = 1412000
Solar radius (IAU2015)= 695700 km Mean density, g/cm^3 = 1.408
Radius (photosphere) = 696500 km Angular diam at 1 AU = 1919.3"
Photosphere temp., K = 6600 (bottom) Photosphere temp., K = 4400(top)
Photospheric depth = ~500 km Chromospheric depth = ~2500 km
Flatness, f = 0.00005 Adopted sid. rot. per.= 25.38 d
Surface gravity = 274.0 m/s^2 Escape speed, km/s = 617.7
Pole (RA,DEC), deg. = (286.13, 63.87) Obliquity to ecliptic = 7.25 deg.
Solar constant (1 AU) = 1367.6 W/m^2 Luminosity, 10^24 J/s = 382.8
Mass-energy conv rate = 4.260 x 10^9 kg/s Effective temp, K = 5772
Sunspot cycle = 11.4 yr Cycle 24 sunspot min. = 2008 A.D.
Motion relative to nearby stars = apex : R.A.= 271 deg.; DEC.= +30 deg.
speed: 19.4 km/s (0.0112 au/day)
Motion relative to 2.73K BB/CBR = apex : l= 264.7 +- 0.8; b= 48.2 +- 0.5 deg.
speed: 369 +-11 km/s
*******************************************************************************
*******************************************************************************
Ephemeris / API_USER Wed Aug 13 04:05:18 2025 Pasadena, USA / Horizons
*******************************************************************************
Target body name: Sun (10) {source: DE441}
Center body name: Sun (10) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2000-Jan-01 12:00:00.0000 TDB
Stop time : A.D. 2000-Jan-01 12:01:00.0000 TDB
Step-size : 1 minutes
*******************************************************************************
Center geodetic : 0.0, 0.0, 0.0 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.0, 0.0, 0.0 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : 695700.0, 695700.0, 695700.0 km {Equator_a, b, pole_c}
Output units : AU-D
Calendar mode : Mixed Julian/Gregorian
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
JDTDB
X Y Z
VX VY VZ
*******************************************************************************
$$SOE
2451545.000000000 = A.D. 2000-Jan-01 12:00:00.0000 TDB
X = 0.000000000000000E+00 Y = 0.000000000000000E+00 Z = 0.000000000000000E+00
VX= 0.000000000000000E+00 VY= 0.000000000000000E+00 VZ= 0.000000000000000E+00
2451545.000694444 = A.D. 2000-Jan-01 12:01:00.0000 TDB
X = 0.000000000000000E+00 Y = 0.000000000000000E+00 Z = 0.000000000000000E+00
VX= 0.000000000000000E+00 VY= 0.000000000000000E+00 VZ= 0.000000000000000E+00
$$EOE
*******************************************************************************
TIME
Barycentric Dynamical Time ("TDB" or T_eph) output was requested. This
continuous coordinate time is equivalent to the relativistic proper time
of a clock at rest in a reference frame co-moving with the solar system
barycenter but outside the system's gravity well. It is the independent
variable in the solar system relativistic equations of motion.
TDB runs at a uniform rate of one SI second per second and is independent
of irregularities in Earth's rotation.
CALENDAR SYSTEM
Mixed calendar mode was active such that calendar dates after AD 1582-Oct-15
(if any) are in the modern Gregorian system. Dates prior to 1582-Oct-5 (if any)
are in the Julian calendar system, which is automatically extended for dates
prior to its adoption on 45-Jan-1 BC. The Julian calendar is useful for
matching historical dates. The Gregorian calendar more accurately corresponds
to the Earth's orbital motion and seasons. A "Gregorian-only" calendar mode is
available if such physical events are the primary interest.
REFERENCE FRAME AND COORDINATES
Ecliptic at the standard reference epoch
Reference epoch: J2000.0
X-Y plane: adopted Earth orbital plane at the reference epoch
Note: IAU76 obliquity of 84381.448 arcseconds wrt ICRF X-Y plane
X-axis : ICRF
Z-axis : perpendicular to the X-Y plane in the directional (+ or -) sense
of Earth's north pole at the reference epoch.
Symbol meaning [1 au= 149597870.700 km, 1 day= 86400.0 s]:
JDTDB Julian Day Number, Barycentric Dynamical Time
X X-component of position vector (au)
Y Y-component of position vector (au)
Z Z-component of position vector (au)
VX X-component of velocity vector (au/day)
VY Y-component of velocity vector (au/day)
VZ Z-component of velocity vector (au/day)
ABERRATIONS AND CORRECTIONS
Geometric state vectors have NO corrections or aberrations applied.
Computations by ...
Solar System Dynamics Group, Horizons On-Line Ephemeris System
4800 Oak Grove Drive, Jet Propulsion Laboratory
Pasadena, CA 91109 USA
General site: https://ssd.jpl.nasa.gov/
Mailing list: https://ssd.jpl.nasa.gov/email_list.html
System news : https://ssd.jpl.nasa.gov/horizons/news.html
User Guide : https://ssd.jpl.nasa.gov/horizons/manual.html
Connect : browser https://ssd.jpl.nasa.gov/horizons/app.html#/x
API https://ssd-api.jpl.nasa.gov/doc/horizons.html
command-line telnet ssd.jpl.nasa.gov 6775
e-mail/batch https://ssd.jpl.nasa.gov/ftp/ssd/horizons_batch.txt
scripts https://ssd.jpl.nasa.gov/ftp/ssd/SCRIPTS
Author : Jon.D.Giorgini@jpl.nasa.gov
*******************************************************************************

View File

@ -1,3 +1,4 @@
#![allow(unused)]
use bevy::math::DVec3;
use chrono::{DateTime, Utc};
use reqwest::Client;

View File

@ -1 +0,0 @@
pub mod jpl_horizon;

View File

@ -3,13 +3,29 @@ use bevy::{
input::mouse::{MouseScrollUnit, MouseWheel},
math::DVec3,
prelude::*,
window::{WindowMode, WindowResized, WindowResolution},
window::{WindowMode, WindowResolution},
};
use bevy_inspector_egui::{bevy_egui::EguiPlugin, quick::WorldInspectorPlugin};
use iyes_perf_ui::{PerfUiPlugin, prelude::*};
use serde::Deserialize;
mod jpl_horizon;
// Data structures for deserializing initial_state.ron
#[derive(Deserialize)]
struct InitialState {
bodies: Vec<CelestialBodyData>,
}
#[derive(Deserialize)]
struct CelestialBodyData {
name: String,
mass: f64, // kg
radius: f64, // km
position: (f64, f64, f64), // AU
velocity: (f64, f64, f64), // AU/day
}
// Scaling factor to convert AU to game units
// Neptune is approximately 30.1 astronomical units (AU) from the Sun
// Point light effective range is about 10 game units, so 10 game units = ~30 AU
@ -408,64 +424,61 @@ fn initialize_camera_follow(
}
fn setup_solar_system(mut commands: Commands) {
// Sun - From NASA JPL Horizons data (J2000.0 epoch)
// Physical properties: Mass = 1988410 x 10^24 kg, Radius = 695700 km = 0.00465 AU
commands.spawn((
ObjectBundle {
name: Name(ObjectName("Sun".to_string())),
position: Position(PositionAu(DVec3::new(0.0, 0.0, 0.0))), // At barycenter
velocity: Velocity(VelocityAuPerDay(DVec3::new(0.0, 0.0, 0.0))), // Stationary relative to barycenter
mass: Mass(MassKg(1.988410e30)), // Solar mass in kg
radius: Radius(DistanceAu(0.00465)), // Solar radius in AU (695700 km / 149597870.691)
},
Star,
Trackable {},
));
// Load initial state from RON file
let initial_state_content = match std::fs::read_to_string("assets/initial_state.ron") {
Ok(content) => content,
Err(err) => {
error!("Failed to read initial_state.ron: {}", err);
return;
}
};
// Earth - From NASA JPL Horizons data (A.D. 2000-Jan-01 12:00:00.0000 TDB)
// Position and velocity vectors in ecliptic J2000.0 frame relative to Sun
// Mass = 5.97219 x 10^24 kg, Mean radius = 6371.01 km = 0.0000426 AU
commands.spawn((
ObjectBundle {
name: Name(ObjectName("Earth".to_string())),
position: Position(PositionAu(DVec3::new(
-1.771350992727098e-1, // X = -0.177135 AU
9.672416867665306e-1, // Y = 0.967242 AU
-4.085281582511366e-6, // Z = -4.085e-6 AU
))),
velocity: Velocity(VelocityAuPerDay(DVec3::new(
-1.720762506872895e-2, // VX = -0.0172076 AU/day
-3.158782144324866e-3, // VY = -0.00315878 AU/day
1.049888594613343e-7, // VZ = 1.04989e-7 AU/day
))),
mass: Mass(MassKg(5.97219e24)), // Earth mass in kg
radius: Radius(DistanceAu(0.0000426)), // Mean radius in AU (6371.01 km / 149597870.691)
},
Trackable {},
Earth,
));
let initial_state: InitialState = match ron::from_str(&initial_state_content) {
Ok(state) => state,
Err(err) => {
error!("Failed to parse initial_state.ron: {}", err);
return;
}
};
// Moon - From NASA JPL Horizons data (A.D. 2000-Jan-01 12:00:00.0000 TDB)
// Position and velocity vectors in ecliptic J2000.0 frame relative to Sun
// Mass = 7.349 x 10^22 kg, Mean radius = 1737.53 km = 0.0000116 AU
commands.spawn((
ObjectBundle {
name: Name(ObjectName("Moon".to_string())),
position: Position(PositionAu(DVec3::new(
-1.790843809223965e-1, // X = -0.179084 AU
9.654035607264573e-1, // Y = 0.965404 AU
2.383726922995396e-4, // Z = 0.000238373 AU
))),
velocity: Velocity(VelocityAuPerDay(DVec3::new(
-1.683595459141215e-2, // VX = -0.0168360 AU/day
-3.580960720855671e-3, // VY = -0.00358096 AU/day
-6.540550604528720e-6, // VZ = -6.54055e-6 AU/day
))),
mass: Mass(MassKg(7.349e22)), // Moon mass in kg
radius: Radius(DistanceAu(0.0000116)), // Mean radius in AU (1737.53 km / 149597870.691)
},
Trackable {},
));
// Spawn all celestial bodies from the initial state
for body_data in initial_state.bodies {
// Convert radius from km to AU
let radius_au = body_data.radius / 149597870.691; // km to AU conversion
// Create base bundle
let mut entity_commands = commands.spawn((
ObjectBundle {
name: Name(ObjectName(body_data.name.clone())),
position: Position(PositionAu(DVec3::new(
body_data.position.0,
body_data.position.1,
body_data.position.2,
))),
velocity: Velocity(VelocityAuPerDay(DVec3::new(
body_data.velocity.0,
body_data.velocity.1,
body_data.velocity.2,
))),
mass: Mass(MassKg(body_data.mass)),
radius: Radius(DistanceAu(radius_au)),
},
Trackable {},
));
// Add special components for Sun and Earth
match body_data.name.as_str() {
"Sun" => {
entity_commands.insert(Star);
}
"Earth" => {
entity_commands.insert(Earth);
}
_ => {}
}
info!("Spawned celestial body: {}", body_data.name);
}
}
// High precision constants