In this chapter we will focus on constructing a horizontal route between the departure and arrival waypoints. So far we have created a table of navaids (VOR + NDB), a table of waypoints (terminal + enroute), and functionality to build an airport information report that lists waypoints in a 30 Nmi radius of a selected airport:
With the information we have so far, the user is able to pick arrival and destination waypoints. Recall that from our requirements list, we want to compute:
a route between the departure and arrival waypoints
the total time required to fly this route
the total fuel required to fly this route
The requirements do not specify that any optimization for fuel or time needs to be made. They simply say that the route should be constructed from enroute waypoints, and that each leg should take 5 - 15 minutes to fly. So, we do not need to come up with the perfect route; we simply need to come up with a route. As the plane is flying in three dimensions, we can consider the route to consist of a horizontal component plus a vertical component:
The easiest way to proceed is by first establishing the horizontal component of the route. The vertical profile will then be developed in a later chapter. We will use the following process to determine the horizontal route:
Create a corridor between departure waypoint (A) and arrival waypoint (B). Divide the corridor area into sectors.
Search the waypoints table to identify any enroute waypoints within the search corridor.
Create edges to connect the waypoints into a network. Since we will not be optimizing for fuel or speed, we can use the physical distance between the points to be the edge weight.
Find a path from A to B through the network.
In the next section we will build this functionality with Python.