Question: Michael is a surveyor, and he wants a program that can help him do his job. Surveyors use a technique known as triangulation. Triangulation is
Michael is a surveyor, and he wants a program that can help him do his job. Surveyors use a technique known as triangulation. Triangulation is where distances and locations are measured using the properties of triangles. If the distance of two objects and the angle between is known, the distance between these objects can be calculated. Consider the figure below:

Shows an image of triangulation. A person to the left and 2 trees to the right. The distances between the person and the trees are a and b from top to bottom. The angle at the person is gamma. The distance between the trees is c. The surveyor wants to know the distance labeled as c. If they know the distance from their location to each of the trees denoted as a and b, and the angle of the point of view denoted as y. Then c can be computed using the following formula:

The formula for triangulation is c equals the square root of the quantity a-squared plus b-squareed - 2 times a times b times the cosine of the angle gamma You need to write a program that prompts the user for the distance to each object, and ask them for the angle at their point of view. Then your program should show them the distance between the two objects. Assume that all of the distances are measured in meters and angles in degrees.
In C++ please.
a C= val + b2 - 2ab * cos( Y)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
