Software Architecture and Functions (Takeoff)

Architecture

Similar to how landing was implemented, the takeoff procedure will be implemented as states alongside all of the control stages. Entries in the selection enum will be added to include takeoff stages.

Functions

The following functions will be implemented in the takeoff stages to control the plane.

Create desired takeoff waypoints:

  • This function will take an input of the current position and takeoff direction and will output data of a waypoint.

  • Using trigonometry and latitude-longitude conversions, a waypoint is created a set distance in the direction of takeoff. The plane will then use this track to fly a straight takeoff path.

Desired climb speed:

  • This function will take an input of the current wind speed and if the package is on board, and will output the desired climb speed.

  • Using predetermined constants, this function will output a speed that depends on the current wind speed and the weight of the plane.

Desired rotation speed:

  • This function will take an input of the current wind speed and if the package is on board, and will output the desired rotation speed.

  • Using predetermined constants, this function will output a speed that depends on the current wind speed and the weight of the plane.