Project 2 - Implement the Code for controlling the retraction and extension of Airplane’s landing gear
1.controlling the retraction and extension of Airplane’s landing gear can be implemented using Finite State Machine (FSM).
Goals
- Controlling the direction of Valve.
- Controlling the retraction and extension of Airplane’s landing gear.
Direction valve is use to control the hydrullic pressure requiered for the raising or lowering the landing gear,and operate by the software.

Various state of the airplane are
- GEAR_DOWN,
- CHECKING_BEFORE_TAKEOFF,
- RAISING_GEAR,
- GEAR_UP,
- CHECK_BEFORE_LANDING,
- LOWERING_GEAR,
The state table for each state is below :

PROGRAM






RESULT

Outcomes:
- Using the switch and gear states of Airplane, we can achieve the control over the retraction and extension of Airplane’s landing gear using algorithm of finite state machine.
- Learning and implementation of FSM concept using diffrent functions of c language ,structures and arrays.