Space Science with Python #5: Earth’s Velocity

The second, gentle introduction into NASA’s SPICE and the corresponding Python wrapper SPICEypy focuses on Earth’s velocity and the comparison with gravitational theory.

Thomas Albin
Space Science in a Nutshell
2 min readDec 29, 2021

--

Photo by Mark Tuzman on Unsplash

In my last article, covering #4 of my YouTube tutorial series Space Science with Python, we started to cover a mighty NASA toolkit called SPICE (and its Python wrapper / library called SPICEypy). SPICE is a rather complex, but sophisticated library that covers e.g.:

  • Motion of the planets, asteroids, spacecraft, …
  • Orientation and pointing of spacecraft instruments
  • Geometric event calculations (occultations, etc.)
  • Handling of reference and coordinate frames
  • And much, much more…

SPICE uses so called kernel files that contain meta information about objects, computed trajectories of spacecraft or complex reference frames in any imaginable and customizable configuration.

The second SPICE introduction video will cover Earth’s velocity w.r.t. the Sun (so in a Sun-centric coordinate system). We will compare the value that is returned by SPICE with the theoretical expectations from gravitational theory. Don’t worry: it sounds way more complicated than it is; but the Python code is simple and straightforward to understand:

As always, here is the link to the corresponding Jupyter notebook script.

Enjoy and stay curious,

Thomas

--

--

Thomas Albin
Space Science in a Nutshell

Data Scientist and Engineer. Astrophysicist and Solar System researcher — Now working in the automotive industry