function
SLAM.Localization.RGBDLocalizationCatalog.CanAdvance
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | previous | State | | |
| input | intervalTime | Real | | |
| input | h | Real | | |
| input | initializing | Boolean | | |
| input | requested | Boolean | | |
| output | allowed | Boolean | |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function CanAdvance
input State previous; input Real intervalTime; input Real h;
input Boolean initializing; input Boolean requested;
output Boolean allowed;
algorithm
allowed := false;
if requested then
allowed := ValidHeader(previous) and intervalTime >= 0.0 and intervalTime <= 1e9;
if initializing then
allowed := allowed and not previous.initialized
and SLAMExactRealEqual(intervalTime,0.0) and SLAMExactRealEqual(h,0.0);
else
allowed := allowed and previous.initialized and ES15HeldIntervalValid(h)
and intervalTime > previous.predictionTime
and abs(intervalTime-previous.predictionTime-h) <= 1e-12*max(1.0,abs(intervalTime));
end if;
end if;
end CanAdvance;