[Jodavaho.io]

Stuff by Josh Vander Hook

Messing about with serious software

Messing about with serious software In which we discuss setting up some spaceflight software from NASA inside a tiny webserver, inside an AWS lambda, and with Rust. There is no reason you’d ever want to do this, but I was stuck at home sick and needed to scratch an itch: How does one know if the sun is shining on any particular part of the moon right now? view full post

Messing about with serious software

In which we discuss setting up some spaceflight software from NASA inside a tiny webserver, inside an AWS lambda, and with Rust.

There is no reason you’d ever want to do this, but I was stuck at home sick and needed to scratch an itch: How does one know if the sun is shining on any particular part of the moon right now?

The solution is very complicated, actually.

You can imagine that someone wanting to point a telescope at a spot on Mars would want to do similar calculations, lest they take a picture of a shadow-obscured region, or worse, something in darkness 1.

Lunar terminator (creative commons)

One of the things I most appreciated about working at JPL was being surrounded by smart people who could think of all these details and solve them. So, I was exposed to NAIF SPICE system. SPICE is a C library for calculating observer geometry.

Putting this up into a webservice involved the following steps:

  1. Figuring out if SPICE could solve this problem
  2. Downloading and building the software
  3. Finding and configuring the kernels (~180MB of them!)
  4. Using Rust FFI to interact with the right SPICE apis
  5. Configuring an API Gateway, Lambda, and domain name
  6. Wrapping the rust code in Axum, and deploying

I’m definitely going to write about each of those steps … right after I get some sleep


  1. Actually, taking images of the terminator can yield some interesting science opportunities, so now we really want to know where the sun is! ↩︎

Comments

I have not configured comments for this site yet as there doesn't seem to be any good, free solutions. Please feel free to email, or reach out on social media if you have any thoughts or questions. I'd love to hear from you!