To Saturn and back: Behind the screens of Cassini’s Last Dance

This year was a true celebration of space dataviz. We've been witnessing jaw-dropping visualizations of the solar eclipse, impressive timelapse of the hurricanes and engaging satellite voyages.

Today I will shed some light on how we created our Cassini piece which ended up being an interesting web experience as well as fascinating AR experiment.

Our recipe has only a few main ingredients, but properly combined they can yield some pretty promising results. Open your data journalism toolboxes, search for NASA navigation data, 3D models of moons and some JS magic potion. Don’t worry too much, if you’re missing any of these. The rest of this blog will guide you on where to get and how to use them.

Cassini navigation data

The Cassini–Huygens mission is a 20 years voyage across the Solar system with 13 years being dedicated to the exploration of Saturn and its moons. The amount of data generated by this mission is enormous. Images, videos and even audio files are available at abundant supply. To be fair, there have already been published some pretty stunning projects taking full advantage of it. But how about the actual position of the spacecraft? Can we actually get data about Cassini’s Grand Finale path?

Well, in fact, Casinni’s trajectory has been calculated way before the mission started and it’s being constantly updated since the launch. This info is freely available through ancillary information system SPICE. SPICE is essentially a tool used by scientists and engineers to plan and design space missions. It predominantly consists of kernels (or kernels data files), that include data on position of a given body, its orientation, size, shape and many other details for a bunch of different missions. SPICE is natively available in C, IDL, MATLAB and Java Native Interface. But if you’ve never used any of these like me, you’re free to use a Python wrapper SpiceyPy.

SpiceyPy is well-documented and its very first example includes code snippet for getting Cassini’s trajectory. The only thing you’ll need is to get proper kernels and tweak few arguments for your spkpos method. Note that spkpos returns coordinates of a particular object (e.g. Cassini) with respect to another object (Saturn) in Cartesian coordinate system in kilometers.

Run this notebook and you will get Cassini’s Grand Finale path in thousand of kilometers. If you print the first pair of coordinates, you will get something like this:

```{'y': 183.06984, 'x': -1230.24982, 'z': 268.11913, 'time': '2017-04-23 03:46:00'}```

And eventually a super simple visualization:

For this particular project I also extracted positions of Saturn moons, so our model is more accurate and has properly tilted and sized orbits.

Assets: global maps of moons, videos and spacecraft model

So now we can draw Cassini’s path, but how to create 3D models Saturn moons? Well, as it usually happens in the programming world, even the most complicated things consist of very simple elements. Same here. Each planet is essentially just a sphere with texture. The latter should be a global map of a given celestial body. “Global map” of a moon might sound confusing, but think about a regular global map of Earth you saw dozens of times. We need something like this, but for Saturn moons. Luckily, such maps already exist. They were created by Dr. Paul Schenk from the Lunar and Planetary Institute and right now are probably the best source publicly available for everyone.

Fantastic, isn’t it? And we just started! Let’s get a model of Cassini spacecraft itself. The easiest solution will be justs to download it from NASA’s 3D website, however, I strongly recommend to check with JPL or equivalent. They might have more updated resources and assets. In general, it’s a good practice to check with scientists when working on scientific dataviz, so don’t be shy to do so.

In this case, I was dealing with Blender model and in order to use it in my Three.js project I had to convert it to JSON file. There are multiple ways of doing it, but native Three.js Blender exporter worked the best for me.

The rest of images and videos were retrieved from this amazing web archive.

JS magic potion

The development side of this project probably deserves a post of its own, but I will try to briefly touch base on what libraries and utils we used to make it happen.

  • Three.js was a backbone of our Cassini voyage. It helped to render moons and Saturn as well as their orbits and Cassini’s path.
  • Tween.js was used to smoothly animate camera and Cassini’s movement.
  • Three.MeshLine helped us to render nicer and more customizable orbits’ lines.
  • Waypoints was used for scrollytelling part. However, right now I’ll probably advise to play with our in-house build tool TwoStep.

That’s pretty much it. No rocket science involved, but a lot of dataviz goodies instead.

Happy programming!

< Back to the tree

Views 2,733


Yaryna Serkez

Yaryna Serkez creates charts and interactive visualizations at the Wall Street Journal. She loves maps, satellite images, and tangerines. This year she was named Student and Young Data Journalist of the year in the 2017 Data Journalism Awards.

snow flake
© 2017 Journocode