Project 2 - Implement the Code for controlling the retraction and extension of Airplane’s landing gear
Main1.c

State.h


Source Files







Output:-

We have six different function condition e.g Gear_Down,Checking_Before_Takeoff,Raising_Gear,Gear_Up,Checking_Before_Landing,Lowering_Gear.
Gear_Down :-
Pilot lever is raising then squat switch is open & light is green then all condition is satisfied its mean gear down is check before takeoff.
Squat switches is open which means startingthe raise of gear,if squat switches is close & light is red then its goes gear down condition.
Checking_Before_Takeoff :-
If Pilot lever is raising then direction valve is up,light started going to green colour. If green green is started turn into red it means rise the gear.
In this raise automatically, light should get turned off & Control for landing gear is Disabled.
Raising_Gear :-
If Limit switch is closed,light turned off then control for landing gear is Disabled so the gear up.
If Pilot level falling , light is red its means checking before landing.
Gear_Up :-
If the Pilot lever is falling & controll is enabled then light goes red so the condition goes to checking before landing it means light is turned off & hydraulic mechanism is disabled.
Checking_Before_Landing :-
The Pilot lever goes down, direction valve is down its means checking before landing is lowering gear then light is Red & hydraulic mechanism is Enabled
Lowering_Gear :-
If Pilot level is up, limit switch is close then light is red so its current state is checking before take off
If limit switch is opened & pilot level is raise so the its goes to gear down with light is turned on at green colour & direction of valve is down & gas pressurized spring sysytem is enabled.