Point Gordo Radar Station is both a directional radar and a height-finding radar site. The installation tracks all kinds of aircraft. Each minute, the station measures the azimuth (angle relative to north), the up angle (angle relative to the horizon) and the distance to each plane within range. The azimuth is measured in degrees (0 to 359.99) so that due North is 0 o, due East is 90o, due South is 180o and due West is 270o. The up angle is in degrees ranging from 0 o (on the horizon) to 90o (at the zenith). The distance is measured in miles.
In the drawing, P represents an airplane.
D is the distance from the radar site to P in a straight line. U
is the up-angle, indicating the height that P is above the horizon.
A is the azimuth, the angle that a straight line on the ground leading
to a point directly below P makes with the North line.
Your program should prompt for the radar information about a plane from one minute in the past and then prompt again for the radar information about the same plane's current position. From these values, the program should report the plane's speed in miles per hour and predict the plane's position one minute from now. The predicted position must be reported as x miles east or west of Point Gordo, y miles north or south of Point Gordo and z miles above Point Gordo's elevation. x, y, and z must be positive numbers. The position must be accurate to within 0.05 miles.
For example, if the azimuth was 164.1o, up angle was 2.1o and distance was 133.2 miles a minute ago and the current azimuth is 160o, up angle is 2o and distance is 133 miles, the program should report the speed as 571.27 mph and predict the position in one minute to be 54.46 miles East of, 121.79 miles South of, and 4.40 miles above Point Gordo.
Second example, if the azimuth was 63.3o,
up angle was 31o and distance was 8.4 miles a minute ago and
the current azimuth is 61.2o, up angle is 83.5o and
distance is 4.2 miles, the program should report the speed as 403.61 mph
and predict the position in one minute to be 5.60 miles West of, 2.78 miles
South of, and 4.02 miles above Point Gordo.