Question: Data from the UMD high altitude balloon program is included in the file attached below. This flight experiment investigated actively stabilizing the orientation ( pointing

Data from the UMD high altitude balloon program is included in the file attached below. This flight experiment investigated actively stabilizing the orientation (pointing angle) of the balloon as it ascends.
The data file contains 3 columns, and therefore three numbers on each line. The first line of the file is an integer specifying the length of the columns. The first column is a time stamp for the number of seconds since the computer was turned on. The second column contains the pointing angle in degrees. The third column contains to pointing error, also in degrees.
Write a C++ program called ballexp.cpp which will read all the data in the file into three different arrays, one for each column of data. The program should then compute and display on the screen the average pointing angle and average pointing error. It should also print the duration of the experiment, which is the difference between the first and last timestamp.
Hint: Use a for loop to load the table data into the arrays. For example:
for (int i=0; i> t[i]>> a[i]>> e[k];
Note: The length of the array should not be hard-coded into your program. Read it from the beginning of the file.
Note: There is no reference example for this problem. When you think you have computed the right values, have your results checked by me or the TA.
Input File: balloon.logDownload balloon.log
Download the file above and upload it to your replit project.

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 Programming Questions!