User:AlliterativeAnchovies/Rover Progress Image Generation

Want to make or edit this file?
That's totally fine; I’m lazy so this page isn’t always up to date with the code used to generate the file, so leave a message on my talk page and I’ll update this for you :)

I can only update the graph after NASA updates their “where is Perseverance” page; this can take a couple days or even a week or two after Ingenuity flies, so I can’t update it immediately after flight. However I do check the “where is Perseverance” page at least once every 2 days after a flight occurs, so once the page is updated, the image will be updated promptly.

Automatically Getting the Data
NASA hosts the relevant json files at certain urls, although it can be difficult to find those urls. The json data that defines the “Where is Perseverance/Curiosity” page is available here (Percy) and here (Curi). Within those pages you can find all the links to the specific layers of the “Where is ____” pages, with the relevant specific datasets being the Curiosity Waypoints, Perseverance Waypoints, and Ingenuity Flight Path. Only the last three files are strictly necessary, the first two ones I linked are just meant to be used as a directory in case you want to find more related datasets. All of these urls can just be pulled directly by an automated program and read as json files (which my code then turns into Pandas tables).

Unfortunately, we can use a related link to see that there is no direct analog of this data for the other NASA rovers (Sojourner, Spirit, Opportunity), as only MSL (“Mars Science Laboratory”, i.e. Curiosity) and M20 (“Mars 2020”, i.e. Perseverance) data is available. If you know of a place to get this data, please let me know (and also for Zhurong; I can't read Chinese so it is hard for me to investigate)! I'm looking into using NASA's SPICE data but it seems complicated so it may take a while, especially as I'm fairly busy irl these days.

Manually Getting the Data
Go to the Perseverance location tracker page, click on the top right button that looks like three sheets stacked on top of eachother. Click on ‘Waypoints’, then click on the download button, which will make the ‘Export GeoJSON’ button pop up - click it to get your data. Name it PerseveranceWaypoints.geojson.json. This works with Curiosity and ingenuity too. If you want to include them, make sure to set the right variables in the code.

For Ingenuity, you want the “Helicopter Flight Path” data, not “Helicopter Waypoints”.

Side note
For Ingenuity, the data is stored on a daily instead of total basis. However, the precision seems to be hundredths of a meter, so there shouldn’t be a discernible drift error from just adding these numbers up; this accuracy is also probably on the edge of what is feasibly possible to get on Mars even for NASA, centimeter precision is really good on Earth too!

Code
Run this code to get the image to generate. I originally wrote it in a Jupiter Notebook, so it might need some tweaking to work as a standalone. Note that the version here is pretty out of date, and requires manual download of datasets. The current version, on my local machine, is better for a few reasons, so you might want to leave me a message on my talk page asking me to update this if you want to use it.