So far in the previous sections, we have:
created a search corridor area from our departure waypoint to our arrival waypoint
divided the search corridor into sectors
identified all enroute waypoints within the corridor
connected the waypoints into a graph or network
The final step is to find a path through this network. We can use Dijkstra's algorithm to find the shortest path. Technically, we don't need the "shortest" path, since our requirements just ask us to find "a path", but we might as well use Dijkstra's algorithm because it's already built into the networkx library. Implementation looks as follows:
Here is the inspection output:
path: ['WETSI', 'DAYVU', 'CRACK', 'TANIE', 'ICADI', 'BATTY', 'AUGEY', 'KECKI', '60N50', 'NOWEL', 'OLLEO']<class 'list'><class 'geopandas.geodataframe.GeoDataFrame'>1111Here is the path as a geodataframe:
After adding the path to the .kml exporter as a linestring, we can inspect the result visually:
In this chapter we have fixed a horizontal route from our departure to arrival waypoints. In the next chapter we will start preparing for the computation of the vertical profile of our flight plan.