How to resolve the algorithm Angle difference between two bearings step by step in the Delphi programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Angle difference between two bearings step by step in the Delphi programming language

Table of Contents

Problem Statement

Finding the angle between two bearings is often confusing.[1]

Find the angle which is the result of the subtraction b2 - b1, where b1 and b2 are the bearings. Input bearings are expressed in the range   -180   to   +180   degrees. The  result  is also expressed in the range   -180   to   +180   degrees.

Compute the angle for the following pairs:

Allow the input bearings to be any (finite) value.

Let's start with the solution: