CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

function

Estimation.FusionHorizon.retireRows

Divide the earliest packed factor out of a packed product

Public declarations

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

RoleNameTypeDimensions / attributes / defaultDescription
inputfirstRowReal[DeltaLength]The factor being retired
inputcomposedRowReal[DeltaLength]The product it is the left factor of
outputsecondRowReal[DeltaLength]

Modelica declarations and implementation

Show parameters, interfaces and source

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

function retireRows
  "Divide the earliest packed factor out of a packed product"
  input Real firstRow[DeltaLength] "The factor being retired";
  input Real composedRow[DeltaLength] "The product it is the left factor of";
  output Real secondRow[DeltaLength];
protected
  Estimation.FusionHorizon.Delta first;
  Estimation.FusionHorizon.Delta composed;
  Estimation.FusionHorizon.Delta second;
algorithm
  // The flat-row facade over retireDelta; see composeRows for why the boundary
  // is an array and not a record.
  first := Estimation.FusionHorizon.unpackDelta(firstRow);
  composed := Estimation.FusionHorizon.unpackDelta(composedRow);
  second := Estimation.FusionHorizon.retireDelta(first, composed);
  secondRow := Estimation.FusionHorizon.packDelta(second);
end retireRows;