Challenge

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

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

Overview of the Project: In this project, a Finite State Machine is used to manage the retraction and extension of an airplane's landing gear (FSM). The most efficient algorithm is the FSM, which is a mathematical processing model.

Actually an airplane has 3 gears for landing: Nose gear, Left gear, Right gear.

There is an electrically powered hydraulic pump that applies pressure to the gears to bring it down or pull it up.

There is a limit switch on each leg of the gear. One extra squat switch is installed in the nose gear to assess whether the plane is on the ground or not.

Goals:

Valve's direction can be controlled.

Controlling the retraction and extension of the landing gear on an aeroplane.

#include
using namespace std;

string lights,lever;
void setLightsRed(){
lights = "Red";
}
void setLightsGreen(){
lights= "Green";
}
void setLightsOff(){
lights = "Off";
}
string getLights(){
return lights;
}
void setLeverUp(){
lever = "Up";
}
void setLeverDown(){
lever = "Down";
}
string getLever(){
return lever;
}
string takeOff()

{

if(getLights() != "Red" )
return "Can't take off because lights are not red\n";
setLeverUp();
setLightsOff();
return "Take Off Success\n";
}

string landing()

{


if(getLights() != "Green" )
return "Can't land because lights are not Green\n";
setLeverDown();
return "Landing Success\n";
}

int main()
{
setLightsRed();
cout<<takeOff();
setLightsGreen();
cout<<landing();

return 0;
}

OUTPUT:

Conclusions:

The need to design landing gear with minimum weight, minimum volume, high performance, improved life and reduced life cycle cost have posed many challenges to landing gear designers and practitioners. Further it is essential to reduce the landing gear design and development cycle time while meeting all the safety and regulatory requirements. Many technologies have been developed over the years to meet the challenges of landing gear design and development.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.