Day 2: Real NASA terrain analysis
Today I built the part that actually finds the best landing site in an area near the south pole of the moon. I wrote a Python pipeline that processes real NASA 5-meter-per-pixel lunar terrain data to find optimal landing points.
What it does
The script pulls real slope GeoTIFFs from NASA’s Planetary Geodynamics Lab (PGDA). for reference, that’s the same 5m/px Digital Elevation Models used for actual Artemis landing site selection. For each candidate region it:
- Downloads the real slope raster (40–140 MB each)
- Scores every location by the mean slope across a 100m lander footprint, because a real landing zone has to be flat across the whole area the lander occupies
- Finds the optimal point down to around 5m of precision
- Converts the winning pixel from polar-stereographic coordinates back to lat/lon (this part sucked)
- Writes everything to a JSON file the app serves instantly
Results
Processing NASA’s actual DEMs, the optimal landing points came out to:
- Nobile Rim 2: 0.45° mean slope over 100m
- Haworth: 0.91°
- Shackleton Crater Rim: 1.15°
The hard part
Two bugs. The first version picked nodata artifact pixels that read as “perfectly flat 0.0°.” The single-pixel approach could also land on a fluke-flat spot surrounded by cliffs. Fixed both: excluded the artifact values, then switched to integral-image windowed averaging so it evaluates the full lander footprint in O(1) per location instead of brute-forcing it.
Next
Wiring this into the frontend so “Search Area” surfaces the precise optimal point, then on to the launch window calculator using JPL Horizons ephemeris.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.