This question is more conceptual as I do not have any code to show for it as of right now. However, I was wondering if I could get some help on how I could go about coding something like this without having the program take years to compute.
Basically, imagine that a wingsuit base jumper needs at least a 30 degree slope to fly a safe line to his landing. How can we go about finding the longest flight line he could take on earth?
|----
| ----
| ---- A slope with a 3-1 glide angle
100m | ----
| ----
|_________________________
300m
Our planet has ~510 million km² of surface area. Let's assume we want to take a data point every 200m, which comes out as 25 data points in a square kilometer. The n^2 solution here clearly is not good enough.
Here are my thoughts on a potential solution: loop through all (510*25) million possible start points. Connect those points to their adjacent point neighbours in the form of a graph. Since we now have a grid of interconnected points as a graph we can remove all edges that do not fit the 30 degree slope requirement. Next up we use an algorithm to find the longest path in a directed acyclic graph.
https://www.geeksforgeeks.org/find-longest-path-directed-acyclic-graph/
Will my solution work? Is it feasable to compute? Thoughts on other solutions?