Docsity

Rocket Trajectory Simulation for Different Wind Conditions, Assignments of Computer Science

Toggle sidebar
bg1
FALL 2004: CGS 2423 C For Engineers
[Programming Assignment 4; Due November 1 in class.]
Problem Description
You are required to simulate the trajectory of a 60-ft long test rocket. Engineers predict that under
the current wind conditions, the height of the rocket at time tis given by
Heig ht = 60 + 2.13t2
โˆ’0.0013t4+ 0.000034t4.751โˆ’๎˜
The equation gives the height of the nose of the rocket above ground in feet at time t, which is
counted in seconds elapsed after launch. The value of ๎˜may vary from 0 to 0.015.
Write a program that simulates the flight of the rocket for the first 100 seconds. The height
is going to increase for a while and then it will start to drop. Initially, compute the height of
the rocket at increments of 2.0 seconds. Once the height drops to 50 feet, increments are to be
0.1 seconds. The simulation is to halt after 100 seconds or after impact, whichever happens first.
Repeat the whole simulation for values of ๎˜ranging from 0 through 0.015 in increments of 0.005.
Output your results, neatly formatted so that it is easily readable. Warn the user when the
rocket starts to descend after attaining maximum height. Warn the user again when the rocket
descends to a height of 50 feet. Show the value of ๎˜clearly at the top of your output, and separate
out the output for different values of ๎˜.
Details
Like before, make sure you include a Header for your program. As mentioned on your course
website, every file and program you submit must have a header, as shown in:
http://www.cs.fiu.edu/หœgiri/2423/f04/Header.txt
What to Submit
Submit a print out (hard copy) of your program and the output. As before, submit a โ€œsoftโ€ copy
of your program. There will be no excuses accepted this time around. As before, if you are using
Linux, then submit the .c file, and the a.out file. If you are running Windows and Visual C, then
submit the source code, project file, the workspace file, the .exe file, and anything else that might be
needed. Zip up all the files you want to submit into one zip file. Name the zippped file appropriately
by using your login name and the assignment number (for example, jkerry001 Homework4.zip).
Upload or ftp your file to ftp.cs.fiu.edu/pub/giri/incoming/cgs2423/jkerry001/ by logging
in as anonymous. Note that there is a separate directory for each one of you identified by your FIU
login. Make sure you put the zip file in the correct directory.
Suggestions for the bored
Extra Credit Display the results as a graph.

Partial preview of the text

Download Rocket Trajectory Simulation for Different Wind Conditions and more Assignments Computer Science in PDF only on Docsity!

FALL 2004: CGS 2423 C For Engineers

[Programming Assignment 4; Due November 1 in class.]

Problem Description

You are required to simulate the trajectory of a 60-ft long test rocket. Engineers predict that under the current wind conditions, the height of the rocket at time t is given by

Height = 60 + 2. 13 t^2 โˆ’ 0. 0013 t^4 + 0. 000034 t^4.^751 โˆ’

The equation gives the height of the nose of the rocket above ground in feet at time t, which is counted in seconds elapsed after launch. The value of  may vary from 0 to 0.015. Write a program that simulates the flight of the rocket for the first 100 seconds. The height is going to increase for a while and then it will start to drop. Initially, compute the height of the rocket at increments of 2.0 seconds. Once the height drops to 50 feet, increments are to be 0.1 seconds. The simulation is to halt after 100 seconds or after impact, whichever happens first. Repeat the whole simulation for values of  ranging from 0 through 0.015 in increments of 0.005. Output your results, neatly formatted so that it is easily readable. Warn the user when the rocket starts to descend after attaining maximum height. Warn the user again when the rocket descends to a height of 50 feet. Show the value of  clearly at the top of your output, and separate out the output for different values of .

Details

Like before, make sure you include a Header for your program. As mentioned on your course website, every file and program you submit must have a header, as shown in: http://www.cs.fiu.edu/หœgiri/2423/f04/Header.txt

What to Submit

Submit a print out (hard copy) of your program and the output. As before, submit a โ€œsoftโ€ copy of your program. There will be no excuses accepted this time around. As before, if you are using Linux, then submit the .c file, and the a.out file. If you are running Windows and Visual C, then submit the source code, project file, the workspace file, the .exe file, and anything else that might be needed. Zip up all the files you want to submit into one zip file. Name the zippped file appropriately by using your login name and the assignment number (for example, jkerry001 Homework4.zip). Upload or ftp your file to ftp.cs.fiu.edu/pub/giri/incoming/cgs2423/jkerry001/ by logging in as anonymous. Note that there is a separate directory for each one of you identified by your FIU login. Make sure you put the zip file in the correct directory.

Suggestions for the bored

Extra Credit Display the results as a graph.