CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

function

Planning.Dubins.wrapAngle

Wrap an angle to [-pi, pi]

Public declarations

Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.

RoleNameTypeDimensions / attributes / defaultDescription
inputangleReal
outputwrappedReal

Modelica declarations and implementation

Show parameters, interfaces and source

Parameters, inputs, outputs, defaults and equations from the source file.

function wrapAngle "Wrap an angle to [-pi, pi]"
  input Real angle;
  output Real wrapped;
algorithm
  wrapped := atan2(sin(angle), cos(angle));
end wrapAngle;