CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

record

Vehicles.Cubs2.OuterLoopComponents.RouteParameters

Public declarations

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

RoleNameTypeDimensions / attributes / defaultDescription
fieldnSegmentsInteger= 6flyable segments between route points
fieldwaypointsReal[7, 3] = [ 0.0, 0.0, 0.0; -8.0, -8.0, 3.0; -8.0, 2.0, 3.0; 18.0, 2.0, 3.0; 18.0, -8.0, 3.0; 5.0, -8.0, 3.0; -8.0, -8.0, 3.0]route point rows are [x, y, z] [m]
fieldcruiseSpeedReal(unit="m/s") = 4.5
fieldaltitudeToFlightPathGainReal= 2.0
fieldaltitudeLookaheadDistanceReal(unit="m") = 8.0
fieldflightPathAngleLimitReal(unit="rad") = 0.12
fieldspeedToAccelerationGainReal= 1.0
fieldcrossTrackSteeringDistanceReal(unit="m") = 4.25atan steering distance; 45 deg correction occurs when |cross-track| = d
fieldwaypointSwitchingDistanceReal(unit="m") = 4.0advance when remaining along-track distance enters the endpoint guard

Modelica declarations and implementation

Show parameters, interfaces and source

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

record RouteParameters
  Integer nSegments = 6 "flyable segments between route points";
  Real waypoints[7, 3] = [
    0.0, 0.0, 0.0;
    -8.0, -8.0, 3.0;
    -8.0, 2.0, 3.0;
    18.0, 2.0, 3.0;
    18.0, -8.0, 3.0;
    5.0, -8.0, 3.0;
    -8.0, -8.0, 3.0] "route point rows are [x, y, z] [m]";
  Real cruiseSpeed(unit="m/s") = 4.5;
  Real altitudeToFlightPathGain = 2.0;
  Real altitudeLookaheadDistance(unit="m") = 8.0;
  Real flightPathAngleLimit(unit="rad") = 0.12;
  Real speedToAccelerationGain = 1.0;
  Real crossTrackSteeringDistance(unit="m") = 4.25
    "atan steering distance; 45 deg correction occurs when |cross-track| = d";
  Real waypointSwitchingDistance(unit="m") = 4.0
    "advance when remaining along-track distance enters the endpoint guard";
end RouteParameters;