function
Vision.Registration.RegistrationWeighted.WeightedExp
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | v | Real | [3] | |
| output | result | Real | [3,3] |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function WeightedExp
input Real v[3]; output Real result[3,3];
protected
Real square; Real angle; Real a; Real b; Real K[3,3];
algorithm
square := v*v; angle := sqrt(square);
a := if square < 1e-8 then 1-square/6+square^2/120 else sin(angle)/angle;
b := if square < 1e-8 then 0.5-square/24+square^2/720 else (1-cos(angle))/square;
K := WeightedSkew(v); result := identity(3)+a*K+b*K*K;
end WeightedExp;