
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A programming assignment for a c for engineers course (cgs 2423) in fall 2004. Students are required to write a program simulating the trajectory of a 60-ft long test rocket for the first 100 seconds under varying wind conditions represented by the value of ϵ. The program should compute the height of the rocket at different time intervals and output the results neatly formatted, with warnings when the rocket starts to descend and reaches a height of 50 feet. The assignment also suggests an extra credit option to display the results as a graph.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

[Programming Assignment 4; Due November 1 in class.]
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 .
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
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.
Extra Credit Display the results as a graph.