/************************************************/ /* ECE-1011 Spring 2003 */ /* Section:......... 0 */ /* Assignment:...... 6 */ /* Programmer:...... BAHN, William L. */ /* File Contents:... SOURCE CODE */ /* Filename:........ s60_key */ /* Due Date:........ 17 MAR 03 */ /* E-mail Address:.. wbahn@eas.uccs.edu */ /************************************************/ /*****************************************************************************/ /*************************** ROCKET DATA ANALYZER ****************************/ /*****************************************************************************/ /* TAKEN DIRECTLY FROM HOMEWORK ASSIGNMENT: TASKS TO BE COMPLETED 1) Ask the user for the name of the data set. 2) Use the data set name to create the names for the data file and for the output file. 3) Open the data and output files with reasonable messages and actions taken if either fails. 4) Read the data from the file into two 1D arrays (you may use a single 2D array if you would like). 5) Sort the data so that it is in chronological order. 6) Report to the user the number of records found in the file and the minimum and maximum times contained in the data set. 7) Print a summary of the data to the screen such that you display a total of sixteen records including the first record, the last record, and fourteen more records evenly spaced throughout the data set. Each line of the summary should contain the record number, the time, and the altitude. 8) Determine and report the peak altitude achieved by the rocket and the time at which it occurred. 9) Print the data values immediately surrounding the peak to include the five data points before the peak, the peak itself, and the five after the peak. There should therefore be eleven lines in this table. As before, each line should contain the record number, the time, and the altitude. 10) Ask the user for a time window (ask for a start time and a stop time) and, using a binary search, locate the relevant start and stop records. 11) Report how many records exist in the entered window and print them to a screen. DATA FILE FORMAT * Two values per record (line) The first is the time value (in seconds) The second is the corresponding altitude (in meters above the launch pad) * The range of time values is from 0.0 seconds to 1,000.0 seconds. * The range of altitude values is from 0.0 meters to 100,000.0 meters * There is no header or trailer record. * There are at least 100 but no more than 2000 records in the file. OUTPUT FILE FORMAT NAME: LAST NAME, First Name (Last - ALL CAPS, first - normal capitalization) E-MAIL: e-mail address VERSION: Version#.Revision# DATA SET: setname RECORDS: TIME RANGE: , DATA SUMMARY: RECORD TIME (s) ATLITUDE (m) ,