Go Down

Topic: Calculate difference in heading direction to course direction?? (Read 2595 times) previous topic - next topic


I expect so. Given the heading of the enclosure, the pointer should point at the desired destination. Try it & see!



For a difference in bearing, the formula is:

(540 + bearing_a - bearing_b) % 360 - 180

Note the % operator is only seeing positive values since the C % operator is not mathematically correct
with negative values, which is why 540 is used rather than 180.

The result is clearly constrained to +/-180
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up