Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ You are tasked with flying the Focker Drl to the following markers: - Waypoint 1: A marker 180km due east of your base. -

C++image text in transcribed

You are tasked with flying the Focker Drl to the following markers: - Waypoint 1: A marker 180km due east of your base. - Waypoint 2: A marker that is 120km south of waypoint 1. The plane has a cruising relative air speed of 120km/h and a maximum range of 300km on a tank containing 62 liters of fuel. For navigation to the exact waypoints (shortest distance) you need to take the speed and direction of the wind into account, however, you do not. So, the program will show you where you end up if you head east on the first flight and south in the second one. Write a program as follows: - Ask the user for the speed and direction the wind is blowing from and store them in float variables (assume trigonometric distances, 0 degrees is East direction). First flight: - You will fly the plane due East for 1.5 hours at a cruising speed of 120km/h. Find out the coordinates at the end of your flight, x position and y position, while accounting for the wind vector. Follow the steps below to reach the desired result. - Calculate the distance covered by the plane flight vector in 1.5 hours (plane speed/hour x flight hours). - Calculate the distance covered by the wind vector in 1.5 hours. - Decompose the plane flight vector using the distance obtained and the heading into x and x components. The x component will be the distance covered multiplied by the cosine of the heading angle. The y component will be the distance covered multiplied by the sine of the heading angle. - Output the flight vector ending coordinates for the first flight without factoring in the wind. - Decompose the wind vector into x and y components in the same manner as the flight vector was decomposed. - Subtract the wind x component from the flight vector x component to obtain the resultant x component. - Subtract the wind y component from the flight vector y component to obtain the resultant y component. - Output the resultant x and y coordinated represent the location of the plane after the first flight

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions