CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

package

Tests

Assertion-based tests for the reusable Modelica libraries

Executable examples and checks

These Modelica classes exercise numerical primitives, geometry, filter interfaces and replay boundaries. Assertions state the expected invariant; replay classes expose dynamic inputs for generated-code validation.

Root-level test classes are not a replacement for vehicle missions. Those live under each vehicle's Test package and combine plant, controller and sensor behavior. A numerical assertion, a compiler export check and a flight qualification answer different questions.

Members

NameKindDescription
AssertionspackageSmall dimension-generic helpers used by test assertions
RuleCheckspackageCentral-difference oracles and residual drivers for the LieGroups derivative rules
HorizonCheckspackageResidual drivers for the delayed fusion horizon and its output predictor
LinearAlgebraTestsmodelGeneric matrix sizes, success paths, and failure paths
LieGroupsTestsmodelCore group identities, charts, Jacobians, and edge cases
LieGroupTestspackageDetailed Lie-group behavioral and numerical tests
JacobianRuleTestspackageLieGroups closed-form derivative rules against central differences
RetrodictJacobianTestsmodelChained LieGroups rules against retrodict and against the ESKF transition
EstimationTestsmodelInitialization, prediction, correction, and failure invariants
StrapdownESKFTestsmodelAided strapdown INS ESKF prediction, covariance, correction, and interfaces
CorrelatedGpsTestsmodelHeld-input uncertainty and correlated delayed GPS correction
StrapdownUKFTestsmodelManifold UKF sigma-point, prediction, correction, and rejection regressions
UKFHoverCodegenblockNative codegen regression: symmetric sigma points must preserve hover
StrapdownPreintegrationTestsmodelClosed-form IMU composition, bias Jacobian, and filter packet regressions
StrapdownPreintegrationJacobianTestsmodelDerivatives of composed held and FOH increments, including the position channel
PreintegrationHoldStudymodelZero-order versus first-order-hold IMU composition against fine-grid truth
PreintegrationReplayblock800 Hz FOH preintegration for the external comparison harness
PreintegrationNoiseReplayblockHeld-input covariance used by preintegrated prediction
CovarianceRootReplayblock
RawPredictionReplayblock
CovarianceRootTestsmodel
RotorVibrationHoverStudymodelInertial mechanization error of the RDD2 plant hovering under rotor vibration
OpticalFlowPlaneTestsmodelPlane-induced flow, slant range, and analytic range-Jacobian checks
SensorCorrectionTestsmodelBarometer, terrain, magnetometer, and optical-flow structure checks
HeadingConsiderTestsmodelHeading fusion preserves considered states and a positive covariance
MagneticVectorTestsmodelSymmetric magnetic output has cubic error and respects the field's nullspace
AlignmentCovarianceTestsmodelGravity alignment retains yaw uncertainty and attitude-bias correlation
MultisensorAidingTestsmodelSimultaneous aiding, exactly-once consumption, and independent rejection health
StationaryAidingTestsmodelDeclared rest fuses alongside live aiding and ends when released
StrapdownEstimatorInterfaceTestsmodelBoth algorithms instantiate and execute through the common replaceable boundary
StrapdownGpsSeedTestsmodel
StrapdownGpsSeedTimestampTestsmodel
HorizonPredictorTestsmodelAlgebraic identities the delayed fusion horizon and its predictor rest on
HorizonInterfaceTestsmodelThe output predictor tracks a dead-reckoning reference at the inertial rate across a horizon correction taken ON a release boundary
HorizonResetTestsmodelThe packet epoch is re-anchored by a mid-run reset and never drifts from the buffer it describes
HorizonBiasSupervisionTestsmodelThe bias move is bounded and reported, and the drift the incremental path does not carry is bounded by a forced re-base
HorizonRefusalspackageConfigurations the fusion horizon must REFUSE, one model each
AidingHorizonTestsmodelAiding measurements reach the filter at the fusion instant their own timestamps name, in order, with a bounded residual, and nothing is lost
AidingHorizonRefusalspackageConfigurations Estimation.FusionHorizon.AidingBuffer must refuse
HorizonEstimatorWiringmodelThe same fusion horizon carries an ESKF and a manifold UKF unchanged
EstimatorHealthTestsmodelPrecision-scaled pivoting, variance limiting, gating, and auto-reinit
EstimatorHardeningTestsmodelAffirmative acceptance, per-channel NaN rejection, and window semantics
VerificationTestsmodelProof-facing vector-field, storage, chart-domain, and contraction identities
PlanningTestsmodelDubins family, endpoint, optimality, invariance, and forward-motion tests
BezierTestsmodelBezier endpoint and multirotor flatness tests
LogLinearTestsmodelMultirotor log-linear controller tests
PositionLoopStabilityTestsmodelClosed-loop stability of the log-linear horizontal position loop
ManualGuidanceTestsmodelProperties of the pilot stick shaping, ramp, leash, and mode switch
ManualGuidanceDynamicsmodelTime-domain behaviour of the manual guidance source and the mode switch
GeodesyTestsmodelLocal-frame and geodetic conversion tests
MultirotorInnerLoopTestsmodelMultirotor body-rate and allocation tests
Cubs2EstimatorTestsmodelMocap dropout propagation and bounded recovery without estimator modes
DynamicsTestspackageDynamic rigid-body tests with terminal assertions
AllmodelComplete Modelica assertion suite
AidingQueueTestsmodelA ripe arrival at an empty release is delivered once without a queue write
SemiDirectBiasReplayblockDeployment-export probe for the experimental semi-direct correction
SemiDirectBiasCorrectionReplayblockDeployment-export probe for the complete optional bias-aware correction
SquareRootCorrectionReplayblockDeployment probe for correlated square-root corrections and constrained gains
BarometerConsiderReplayblockDeployment probe for a pressure datum retained as a consider state
VisualTangentReplayblockVisual error-basis and actual Lie injection qualification
VisualLandmarkReplayblockRGB-D observation and Lie injection qualification
VisualCouplingReplayblockMatched Modelica fixed-map loose and tight visual updates
VisualNavigationReplayblockSequential fixed-map visual and GPS aiding comparison
SyntheticLandmarkReplayblockSynthetic landmark camera qualification entrypoint
RegistrationWeightedTestsmodel
RGBDLoopConsistencyTestsmodel
ObservabilityConstrainedPredictionTestsmodelHeld-interval prediction keeps the carried global-yaw direction unobservable across corrections

Modelica declarations and implementation

Show parameters, interfaces and source

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

package Tests "Assertion-based tests for the reusable Modelica libraries"
  annotation(uses(
    Avionics,
    Control,
    Estimation,
    Geodesy,
    LieGroups,
    LinearAlgebra,
    Planning,
    Polynomials,
    RigidBody,
    Vehicles),
    Documentation(info = "<html>
    <h4>Executable examples and checks</h4>
<p>These Modelica classes exercise numerical primitives, geometry, filter
interfaces and replay boundaries. Assertions state the expected invariant;
replay classes expose dynamic inputs for generated-code validation.</p>
<ul>
<li><a href=\"modelica://Tests.PreintegrationReplay\">PreintegrationReplay</a>:
IMU increment composition.</li>
<li><a href=\"modelica://Tests.CorrelatedGpsTests\">CorrelatedGpsTests</a>:
correlated held-input GPS correction.</li>
<li><a href=\"modelica://Tests.SyntheticLandmarkReplay\">SyntheticLandmarkReplay</a>:
camera projection and visibility.</li>
<li><a href=\"modelica://Tests.VisualNavigationReplay\">VisualNavigationReplay</a>:
sequential loose/tight visual aiding.</li>
</ul>
<p>Root-level test classes are not a replacement for vehicle missions. Those
live under each vehicle's Test package and combine plant, controller and
sensor behavior. A numerical assertion, a compiler export check and a flight
qualification answer different questions.</p>
    </html>"));
end Tests;