Wrapping Angles and Comparing Headings

Angles separated by a full turn can describe the same heading. Computing a short signed difference needs a chosen wrap interval.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace across zero
  2. Document the tie

Trace across zero

Going from 350 degrees to 10 degrees can take a positive 20-degree rotation. The raw subtraction gives minus 340. Quotient and remainder provide the modular part of normalization.

Document the tie

At a half turn, positive and negative rotations are equally short. Choose an interval that includes exactly one endpoint under boundary conventions.[1]

References

  1. Kevin M. Lynch and Frank C. Park, Modern Robotics: Mechanics, Planning, and Control ↩