Avatar

stelabouras

The "Is the sky falling on my head?" iOS shortcut

Thursday, July 4, 2024

Every now and then we learn about a new asteroid passing really close to Earth, usually within a couple of hours of it being detected. And right after all those 'the end is nigh' click-bait news articles, we are reassured by NASA that there is no need to panic, with a link to their Eyes on Asteroids website.

News like that, made me think of ways we can have a simple up-to-date and easy to access view for those... close encounters.

Fortunately, NASA already offers an API that we can use in order to retrieve information on close-approach asteroids and comets: The Small-Body Database (aka SBDB) Close-Approach Data API 1. Yup, it's a mouthful.

The API is well-documented and offers a plethora of query parameters we can use, like filtering by the distance of the small bodies in relation to Earth (or any other body 2), by date, as well as controlling which parameters are going to be available on the results, like the full name of the approaching small body.

Given that I have been using the iOS shortcuts a lot lately, I have created a small "Is the sky falling on my head?" iOS shortcut that upon being triggered, displays the closest upcoming small body, offering three links for more information:

  • The closest approach information of the small body on the Asteroid Watch section of the Eyes on Asteroids NASA website.
  • Its more detailed information view (Essential stats, Orbital path, Close approach) on the Eyes on Asteroids NASA website (e.g. 2024 LH).
  • The associated entry of the small body on the Small-Body Database of NASA's JPL (e.g. 2024 LH).

I have also created an automation and extra helper shortcut: The automation fires once a day (when I wake up) and triggers the helper shortcut that just returns the distance of the closest small body.

If that distance is lower than a threshold I have already set (I found that 1.000.000 km is a nice threshold), then the automation runs the main 'Is the sky falling on my head?' shortcut that reports the information, otherwise I get a message that our planet is safe...for now!

I admit that it is really tempting to try and cram all the information reported by NASA's API to a single report (parameters like the body's velocity, diameter, sigma are all interesting) but I have intentionally tried to keep the report as simple as possible, while offering links for more information.

Here's an example report from the other day:

An example of the report generated by the 'Is the sky falling on my head?' iOS shortcut

Looks like we are safe!

You can download and tinker with those shortcuts below.

Download 'Is the sky falling on my head?' Shortcut

Download 'Is the sky falling on my head? [HELPER]' Shortcut