# hub.domain.flight_planning.graph

Domain specification

Domain

# calculate_grid_point_coords

calculate_grid_point_coords(
  p0: ,
p1: ,
x_local_km: ,
y_local_km: ,
z_local_ft:
) -> tuple[float, float, float]

Calculates the geographical coordinates of a grid point. Lateral displacement is perpendicular to the current tangent of the great circle. This method will show "fanning out" over long distances but is straightforward for localized grid generation and matches your visual examples.

Args: p0 (LatLon): The actual start point of the main flight. p1 (LatLon): The actual end point of the main flight. x_local_km (float): Distance along the main path from p0. y_local_km (float): Lateral offset in km (negative for left, positive for right). z_local_ft (float): Altitude in feet for this grid point.

Returns: Tuple[float, float, float]: A tuple containing (latitude, longitude, altitude in feet) for the calculated grid point.

# create_flight_graph

create_flight_graph(
  p0: ,
p1: ,
nb_forward_points: = 10,
nb_lateral_points: = 5,
nb_climb_descent_steps: = 3,
flight_levels_ft: typing.Optional[list[float]] = None,
graph_width: = medium
) ->

Creates a symmetric 3D directed graph representing potential flight paths between two points, with phase-aware node generation and edge connectivity.

# prune_graph

prune_graph(
  G: 
) ->

Removes iteratively nodes that do not have any parent or child node (dead-ends), excluding the start and end nodes.

Args: G (nx.DiGraph): The input flight graph.

Returns: nx.DiGraph: The pruned graph.