Weather balloons are used to gather atmospheric data during the balloon’s ascent. Eventually the density of the atmosphere will be close to the density of the helium inside the balloon and a point of equilibrium is reached. However, heating and cooling of the atmosphere will allow the balloon to rise and fall accordingly. Over time, the rising and falling of the balloon will generate altitude and velocity data that can be approximated with polynomial equations. For this problem, we will use the following polynomials:
altitude = -0.12t4+12t3-380t2+4100t+220
velocity = -0.48t3+36t2-760t+4100
where t is time in hours.
ASSIGNMENT:
Write a C program that will read from an input file called launch.txt a single integer number that represents the hours of data collected. The program will print to the computer screen and to an output file called balloon_results.txt. See the output format illustrated below.
A for loop will control time from 0 to the number of hours read from the input file, nhours, and time will increment by 1 hour. The for loop will pass time to two user-defined functions. The first function will compute altitude and the second function will compute velocity. The computed values are sent back to the main function and printed in tabular form. Note that all values are printed in integer format. Refer to the illustration shown below for the output format.
1234567890123456789012345678901234
———————————-
WEATHER BALLOON PROGRAM
———————————-
TIME ALTITUDE VELOCITY
(hours) (meters) (m/hr)
xx xxxxx xxxxx
. . .
. . .
. . .
———————————-
FILE PATHS:
Once you have your program working correctly, and before submitting, make sure that you set your file paths as follows:
#define ????? “u:\\engr 200\\launch.txt”
#define ????? “u:\\engr 200\\balloon_results.txt”
where you replace the question marks with input/output generic names.
Last Completed Projects
| topic title | academic level | Writer | delivered |
|---|
Are you looking for a similar paper or any other quality academic essay? Then look no further. Our research paper writing service is what you require. Our team of experienced writers is on standby to deliver to you an original paper as per your specified instructions with zero plagiarism guaranteed. This is the perfect way you can prepare your own unique academic paper and score the grades you deserve.
Use the order calculator below and get started! Contact our live support team for any assistance or inquiry.
[order_calculator]