Question: In this homework assignment, you are going to write a program to simulate the flight of a parachutist using difference parachute parameters and under different

In this homework assignment, you are going to write a program to simulate the flight of a parachutist using difference parachute parameters and under different test parameters. You will design a parachutist using the graphics system and have him fall.

The first part of the project will have you create a class Parachutist which has a constructor, mutator, and accessor function. The constructor will create the parachutist at a point passed as a parameter. The mutator function will move the parachutist by the parameters dx dy. The accessor function will plot (output) the parachutist to the screen.

Your main program will set the parameters of the parachute using constant declarations.

Acceleration Factor - This is the rate at which the parachutist will increase in the vertical direction before the chute opens. This is 32 ft/sec/sec. (i.e., Every second the verical velocity increases by 32 ft/sec.)

Terminal Velocity - 174 ft/sec. Vertical velocity cannot exceed this.

Deceleration Factor - This is the rate at which the parachutist will decelerate in the vertical direction after the chute opens. It is typically very high - 100 ft/secsec. The vertical velocity decreases by 100 ft/sec until it reaches 17 ft/sec.

Drag Factor - This is the rate at which the parachutist will decelerate in the horizontal direction after the chute opens. It is typically 20-60 ft/secsec. Until the chute opens, we assume the chutist is moving at the speed of the airplane. The horizontal velocity then decreases each second by the drag factor until it reaches 0.

The program will input :

speed of the plane (feet per second)

height of the plane (feet)

freefall time (seconds)

The simulation works by calculating the position of the parachutist each second between the time of the jump and landing on the ground. When the chutist jumps, the velocity increases (up to terminal) until the chute opens. You need to calculate the chutist' speed as well as horizontal and vertical position. When the chute opens, both the horizontal and vertical speeds decreases until the vertical speed is 17 ft/sec and the horizontal feed is 0 ft/sec.

The program should plot the descent of the parachutist using our simple graphics package. You can begin by using a simple circle to represent the chutist. A single while loop is sufficient to handle the simulation. It would look something like this :

each loop calculates the chutist's speed and position each second

update chutist's speed

update chutist's position

indicate when the chute has opened - e.g. horizontal line.

plot the chutist (every 3 or 4 seconds)

After you have the program working with a circle, you can then replace the circle with an object from your parachute class. When the parachutist has landed, print out the chutist's landing velocity. This will indicate the success (or other) of the simulation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!