Tuesday, August 10, 2021

Google Apps Script and how to access NASA API for Mars pictures



Most of us, probably, would get that "front row" passes just to have that first peek. We can't just wait for NASA Mars 2020 and NASA JPL site to prompt us in our newsletter subscription.

NASA APIs } have been generous and let us have that "front row" ticket for free. It is a good way for bloggers and hobbyists alike to play around with code and get that first had snippets of the images that NASA Perseverance rover captured on Mars.

Take note though in the Rover Camera list below, Perseverance is not yet available. But, don't worry, I got you covered on that one.

AbbreviationCameraCuriosityOpportunitySpirit
FHAZFront Hazard Avoidance Camera✔✔✔
RHAZRear Hazard Avoidance Camera✔✔✔
MASTMast Camera✔
CHEMCAMChemistry and Camera Complex✔
MAHLIMars Hand Lens Imager✔
MARDIMars Descent Imager✔
NAVCAMNavigation Camera✔✔✔
PANCAMPanoramic Camera✔✔
MINITESMiniature Thermal Emission Spectrometer (Mini-TES)✔✔

Google apps script in the works

If you know JavaScript Google Apps Script will can surely help you make those postcard from Mars delivered at your will. In the NASA API's, resources for Perseverance haven't disclosed yet. But, it is not that difficult to create since we already have the base API URL's in place with the previous rovers. All we need is to be guided with the available cameras in the rover and the latest Sol it captured.

You can view the code on my github link [ NASA Perseverance Rover image resources API ]. Here's a snippets of the code in image format.

The script:


No comments:

Post a Comment