Challenge

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

Project:

Implement the code for Retraction and Extansion of Air Plane landing Gear.

Objective:

   The main objective of the project is controls the Air Plane landing gear using Finite State Machine Logic. Finite State Machine is computation model, A system where particular inputs cause particular changes in state can be represented using finite state machine.

Problem Statement:

   Control the Air plane Landing gear.

     Hardware Details:

                Air plane has three gears

                            1.Nose gear

                            2.Right gear

                            3.Left Gear 

     Hydraulic Pump Details:

              Every gear is Driven by Hydraulic Pump.Which give the pressure to Pulling the Gear down or Up.

                           Direction Valve Up= Gear Up

                           Direction Valve Down= Gear Down

     Nose Gear Details:

               It has two switches

                         1. Limit Switch

                         2.Squat Switch  

                    

   Direction Valve Conditions:

        Direction Valve is Controlled by the software which is allow the Gear raising and Lowering.

         

   Lever Status Up=Direction Valve Up

   Lever Status Down = Direction Valve Down

  Gear Light Status:

        Every Gear has one Light. Light Glow according to gear Position.

                 

 Important Cases to consider:

  • When Air Plane is Parked Hydraulic mechanism always monitoring  pressure on Nose gear if Pressure exceed it apply the pressure in opposite directiion.
  • Hydraulic Control detect the rising and Falling edge of the lever.
  • In case of Hydraulic system failiure there is two gas pressurized springs for activate gear. That time squat switch is ignored.

State Table :

           

 Algorithm:

  •  Start the Program
  •  Declare the State Type, Lever State,Squat switch state,Light State,Hydraulic MechanismState,Spring    state as Enum Data Type.
  •  Create a array of structure and declare a variables State indication,Light status,valve   Status,Hydraulic mechanism and Spring Status.
  •  Create a state table using array of staruture and write a data for Six states according to that State.
  •  Declare different types of function used in the program.
  •  In main function Calling  Initialize() function.and initialize a state as Gear Down state.
  •  Get the Inputs from user for Lever and Squat switch Status.
  •  Start with Gear Down() if the user enter gear rise and Switch close then calling Check _Before _Take  Off() Function.
  •  in check before take off function need to check hydraulic and spring status.if any one of the   mechanism is should enable for move to next state. and also check the lever status Gear_Raising().
  •  For every state change Display the current state and Light and Valve state in output screen.
  •  Like wise for every state if condition meets then only calling the Next state.
  •  Create a variable as Volatile because we need to monitor the data continously.
  •  Stop the Program.

Flow Chart:

Program:

Add the Program in .C file and Also attached the Output Screenshot.

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.