function
LieGroups.SO3.Mrp.inPrincipalChart
True away from the norm-one MRP shadow-switch boundary
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | r | Real | [3] | |
| input | margin | Real | (min=0.0) = 1.0e-6 | |
| output | valid | Boolean | |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function inPrincipalChart
"True away from the norm-one MRP shadow-switch boundary"
input Real r[3];
input Real margin(min=0.0) = 1.0e-6;
output Boolean valid;
algorithm
valid := margin < 1.0 and r * r < (1.0 - margin)^2;
end inPrincipalChart;