You may have learned that the velocity of an idealized circular orbit — a massless particle moving in the Newtonian gravitational field of a single point-mass — is related to the radius of the orbit: to increase your orbital radius, increase your speed. More formally, the speed of an massless particle in this same idealized circular orbit can be found by taking the square root of the mass parameter divided by orbital radius. The planets in our solar system have near-circular orbits. We can compare their speeds, and recover the relationship that orbital speed has with orbital radius.
\[v = \sqrt{\frac{\mu}{r}}\]
First, let’s load the proper ephemeris data using SPICEKernels, SPICEBodies, and SPICE. We will load the planet’s barycenters here: the center of mass of their orbital system (the planet, and its moons). Just for fun, let’s include Pluto and see what happens!
In [1]:
usingSPICE, SPICEKernels, SPICEBodiesfurnsh(de440s(), # position and velocity data for inner planet latest_leapseconds_lsk(), # timekeeping, parsing epochsgm_de440(), # mass parameters for major solar system bodiespck00011(), # physical properties of major solar system bodies)mercury =KernelBody("mercury barycenter")venus =KernelBody("venus barycenter")earth =KernelBody("earth barycenter")mars =KernelBody("mars barycenter")jupiter =KernelBody("jupiter barycenter")saturn =KernelBody("saturn barycenter")uranus =KernelBody("uranus barycenter")neptune =KernelBody("neptune barycenter")pluto =KernelBody("pluto barycenter")planets = (mercury, venus, earth, mars, jupiter, saturn, uranus, neptune, pluto)
All of these orbits are near circular, with the exception of Mercury, and one pesky ex-planet. A perfectly circular orbit will have an eccentricity of zero.
Mercury’s orbit is non-circular due to general relativity!
In [2]:
usingDatesusingDataFramesusingAstrodynamicalCalculationsaverage_eccentricity(planet) =let epoch =now() times =epoch-Year(15):Day(1):epoch+Year(15)ecc(state) = AstrodynamicalCalculations.eccentricity( state.x, state.y, state.z, state.ẋ, state.ẏ, state.ż,gm(:sun), )returnsum(time ->ecc(planet(time; wrt =:sun)), times) /length(times)endname(planet) =bodc2n(SPICEBodies.naifcode(planet))eccentricities =Dict(name(planet) =>average_eccentricity(planet) for planet in planets)
With their (mostly) near-circular orbits established, let’s choose an epoch at random and plot their orbital speed, and their expected orbital speed due to the idealized calculation.
In [3]:
usingPlotsusingLinearAlgebraepoch =now()radius(planet) =let state =planet(epoch)returnsqrt(state.x^2+ state.y^2+ state.z^2)endactual_speed(planet) =let state =planet(epoch)returnsqrt(state.ẋ^2+ state.ẏ^2+ state.ż^2)endideal_speed(planet) =let state =planet(epoch)return AstrodynamicalCalculations.orbital_speed( state.x, state.y, state.z, state.ẋ, state.ẏ, state.ż,gm(:sun), )endartsy = (; grid =false, markersize =8, dpi =200, xlabel ="Radius (KM)", ylabel ="Speed (KM/S)", xaxis =:log,)fig =plot(; title ="Measured Orbital Speed", artsy...)for planet in planetsscatter!(fig, [radius(planet)], [actual_speed(planet)]; label =name(planet))endplot!(r ->sqrt(gm(:sun) / r); label ="Theoretical Speed")