Challenge

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

code:

Comments:

  • Hydraulic Control can detect the rising edge and falling edge of pilot’s lever

  • In case of Hydraulic system failure,there are two gas pressurized springs by which gears can be extended

  • The case of failure of Squat Switch is ignored

Reference taken from FSM:

OUTPUT:

Current State: Gear_Down

INITIAL STATE IS GEAR_DOWN

Current State: Gear_Down

The Pilot Lever Position:

0: Raising

1:Falling

2:UP

3:DOWN Enter: 0

Squat switch Status:

0: Open

1:Close Enter: 0

Current State: Checking before take off

Light Status: Green

Current State: Checking before take off

The Pilot Lever Position:

0: Raising

1:Falling

2:UP

3:DOWN Enter: 2

Hydraulic Mechanism Status:

0: Working

1:Malfunctioning Enter: 0

Squat switch Status:

0: Open

1:Close Enter: 0

Current State: Raising Gear

Light Status: Red

Valve Direction Status: Down

Pressurised Spring System Status: Disabled

Current State: Raising Gear

The Pilot Lever Position:

0: Raising

1:Falling

2:UP

3:DOWN Enter: 2

Limit Switch Status:

0: Open

1:Close Enter: 1

Current State: Gear_Up

Light Status: Green

Hydraulic Control Status: Enabled

Current State: Gear_Up

The Pilot Lever Position:

0: Raising

1:Falling

2:UP

3:DOWN Enter: 1

Current State: Checking before Landing

Light Status: Green

Valve Direction Status: Down

Current State: Checking before Landing

The Pilot Lever Position:

0: Raising

1:Falling

2:UP

3:DOWN Enter: 3

Hydraulic Mechanism Status:

0: Working

1:Malfunctioning Enter: 1

Current State: Lowering Gear

Light Status: Green

Pressurised Spring System Status: Enabled

Current State: Lowering Gear

The Pilot Lever Position:

0: Raising

1:Falling

2:UP

3:DOWN Enter: 3

Limit Switch Status:

0: Open

1:Close Enter: 1

Current State: Lowering Gear

The Pilot Lever Position:

0: Raising

1:Falling

2:UP

3:DOWN Enter: 1

Limit Switch Status:

0: Open

1:Close Enter: 0

Current State: Gear_Down

Light Status: Green

Hydraulic Control Status: Enabled

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.