corincerami / mars-photo-api

A Rails API for photo data from NASA's Mars Rovers
https://api.nasa.gov/#MarsPhotos
GNU General Public License v3.0
346 stars 46 forks source link

Filtering by camera parameters? #139

Closed jumpjack closed 3 years ago

jumpjack commented 3 years ago

it would be useful to be able to filter images by altitude/azimuth, both absolute w.r.t horizon/north and w.r.t rover tilt/heading.

corincerami commented 3 years ago

We don't have that sort of data available in the API's dataset.

jumpjack commented 3 years ago

The RSS API has a "mastAz" and "mastEl" parameter:

https://mars.nasa.gov/rss/api/?feed=raw_images&category=mars2020&feedtype=json

jumpjack commented 3 years ago

Found some hints on this page: https://colab.research.google.com/drive/1SqTzhMo5NeVNZ6YTwsSpsssLH3vp5vX_?usp=sharing#scrollTo=03jJlvU4Hovx

Filtering by mastcam: https://mars.nasa.gov/rss/api/?feed=raw_images&category=mars2020&feedtype=json&page=0&num=50&order=sol+asc&search=MCZ_LEFT&condition_2=0:sol:in&extended=sample_type::thumbnail,sample_type::full,product_type::raw

Which syntax is used here? extended=sample_type::thumbnail,sample_type::full,product_type::raw

In "extended" group there are mastAz and mastEl; I found how to get exact matching, but what about intervals? https://mars.nasa.gov/rss/api/?feed=raw_images&category=mars2020&feedtype=json&search=MCZ_LEFT&extended=mastAz::"266.764"

https://mars.nasa.gov/rss/api/?
feed=raw_images&
category=mars2020&
feedtype=json&
search=MCZ_LEFT&
extended=mastAz::"266.764"