Write in C: Asks the user for the magnitude (distance), in meters, and the heading, in degrees of the navigation to way-point Alpha. Decompose the vector into x and y components and output the magnitude and direction (North, West, South, or East are the only reliable headings on the sub’s compass) of the x component and then the y component. The x component is the magnitude multiplied by the cosine of the angle. The y component is the magnitude multiplied by the sine of the angle. Determine compass direction depending on weather the vector component is positive or negative. This step has to be repeated for waypoint bravo. Output the total distance traveled by the submarine from the starting point till it reaches point bravo. Output the distance from the starting point till point bravo (the true distance, not the distance traveled). Ask the user for the target bearing (0 to 25 degrees, float) and range (range in meters, integer)
Write in C:
Asks the user for the magnitude (distance), in meters, and the heading, in degrees of the
navigation to way-point Alpha.
Decompose the
direction (North, West, South, or East are the only reliable headings on the sub’s
compass) of the x component and then the y component. The x component is the
magnitude multiplied by the cosine of the angle. The y component is the magnitude
multiplied by the sine of the angle. Determine compass direction depending on weather
the vector component is positive or negative.
This step has to be repeated for waypoint bravo.
Output the total distance traveled by the submarine from the starting point till it
reaches point bravo.
Output the distance from the starting point till point bravo (the true distance, not the
distance traveled).
Ask the user for the target bearing (0 to 25 degrees, float) and range (range in meters,
integer)
Step by step
Solved in 3 steps with 1 images