CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

record

Vehicles.Rdd2.RotorGeometry

RDD2 motor locations and reaction-torque directions in command order

Public declarations

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

RoleNameTypeDimensions / attributes / defaultDescription
parameterarmLength_mReal(unit = "m") = 0.25
fieldeffectiveMomentArm_mReal(unit = "m") = armLength_m / sqrt(2.0)Quad-X roll/pitch lever arm
parameterrotorTorqueRatio_mReal(unit = "m") = 0.016
fieldpositionBodyFlu_mReal[4, 3] = [ effectiveMomentArm_m, -effectiveMomentArm_m, 0.0; -effectiveMomentArm_m, -effectiveMomentArm_m, 0.0; -effectiveMomentArm_m, effectiveMomentArm_m, 0.0; effectiveMomentArm_m, effectiveMomentArm_m, 0.0]
fieldyawMomentPerThrust_mReal[4] = rotorTorqueRatio_m * {-1.0, 1.0, -1.0, 1.0}

Modelica declarations and implementation

Show parameters, interfaces and source

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

record RotorGeometry
    "RDD2 motor locations and reaction-torque directions in command order"
    parameter Real armLength_m(unit = "m") = 0.25 annotation(Evaluate = true);
    Real effectiveMomentArm_m(unit = "m") = armLength_m / sqrt(2.0)
      "Quad-X roll/pitch lever arm";
    parameter Real rotorTorqueRatio_m(unit = "m") = 0.016 annotation(Evaluate = true);
    Real positionBodyFlu_m[4, 3] = [
       effectiveMomentArm_m, -effectiveMomentArm_m, 0.0;
      -effectiveMomentArm_m, -effectiveMomentArm_m, 0.0;
      -effectiveMomentArm_m,  effectiveMomentArm_m, 0.0;
       effectiveMomentArm_m,  effectiveMomentArm_m, 0.0];
    Real yawMomentPerThrust_m[4] =
      rotorTorqueRatio_m * {-1.0, 1.0, -1.0, 1.0};
  end RotorGeometry;