File Structure and Tests

Since landing and takeoff procedures use similar functions and constants, both function classes and their respective constants are located in landingTakeoffManager.

In terms of unit testing, the landing functions are tested with Test_Landing.cpp and the takeoff functions are tested with Test_Takeoff.cpp.

Here are the descriptions of the tests within those files:

Test_Landing.cpp:

  • Test_changingAltitude - this tests the changing altitude function by loading in arbitrary points and seeing if the function outputs a correct desired altitude

  • Test_approachSpeed and Test_slowFlightSpeed - these tests have a package and no package version, which tests if the functions output the correct speed for each configuration of the aircraft.

  • Test_createSlopeWaypoints - this tests the createSlopeWaypoints function by loading in a stopping point, stopping direction, and current altitude, and seeing if it outputs the correct important points.

Test_Takeoff.cpp:

  • Test_desiredRotation and Test_desiredClimbNoPackage - these tests are similar to the landing speed tests, in that they have versions for package/no package to test for different configurations of the plane.

  • Test_createTakeoffWaypoint - this tests the createTakeoffWaypoint function by loading in the current position of the plane and the takeoff direction and seeing if the desired takeoff waypoint is created.