Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please, thank you! Example data file: Calculating Coefficient of Lift For this PROGRAM you will calculate the coefficient of lift for a given flight-path

C++ please, thank you!

image text in transcribed

image text in transcribed

image text in transcribed

Example data file:

image text in transcribed

Calculating Coefficient of Lift For this PROGRAM you will calculate the coefficient of lift for a given flight-path angle based on wind tunnel data stored in a file. PROGRAM Steps 1. Get from the command line the name of the file that contains the wind tunnel data. 2. Read wind-tunnel data into two parallel vectors, one vector stores the flight-path angle and the other stores the corresponding coefficient of lift for that angle. Both vectors should store doubles. 3. Ask the user for a flight-path angle. If the angle is within the bounds of the data set, the program should then use linear interpolation (see explanation of linear interpolation below) to compute the corresponding coefficient of lift and output it. 4. Finally, ask the user if they want to enter another flight-path angle. Repeat steps 3 and 4 if they answer yes, otherwise end the program if they answer no. For linear interpolation to work, the flight-path angles in the data file must be in ascending order. If the flight-path angles are not in ascending order, your program will need to sort them before implementing Step 3. Linear Interpolation The wind-tunnel test data consists of some number of tested flight-path angles and their corresponding coefficient of lift. Using this data, we can estimate, using linear interpolation, the coefficient of lift for a flight-path angle within the bounds of the data set, even if that particular flight-path angle was not tested. If we want to find the coefficient of lift for flight-path angle b, we find flight-path angles a ando such that a &, vector &); double interpolation (double, const vector &, const vector &); bool isOrdered (const vector &); void reorder (vector &, vector &); Data File Format The data file will have on each line, one flight-path angle (in degrees), a space, and then the corresponding coefficient of lift. See the following file examples, tunnel1.dat and tunnel2.dat. You can download these files here (or create them yourself) for testing your program -2 -0.056 21 1.059 140.421 | 20.238 | 20 1,099 | 12 0.924 60.479 -4 -0.182 180.654 | 10 0.792 100.097 | 14 1.035 16 1.103 18 1.121 15 1.076 19 1.121 | 17 1.120

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Algorithmic Trading Navigating The Digital Frontier

Authors: Alex Thompson

1st Edition

B0CHXR6CXX, 979-8223284987

More Books

Students also viewed these Databases questions