Project 2 - Implement the Code for controlling the retraction and extension of Airplane’s landing gear
FSM is a mathematical model of a system having a limited number of conditional states.
In this program, there are 6 different states and each state is created as a sub-function. The states are gear_up, gear_down, check_before_take off, check_before_landing, raising_gear and lowering_gear. These 6 states are decided from three criteria pilot_lever_state, Switch_status, and Hydraulic_machine_status. Finally, the status can be seen in the console as the values are printed in the console.
The FSM program for the retraction and extension of an airplane's landing gear is attached below.