|
|
|
|
within AIDAModelica;
|
|
|
|
|
|
|
|
|
|
model ControlDroneNavigation "[SF4] Control drone navigation"
|
|
|
|
|
// CP: 65001
|
|
|
|
|
// SimulationX Version: 3.8.2.45319 x64
|
|
|
|
|
Modelica.Blocks.Interfaces.RealOutput YawConsign(quantity = "Mechanics.Rotation.Angle", displayUnit = "rad") "Yaw consign" annotation(
|
|
|
|
|
Placement(transformation(extent = {{45, -15}, {65, 5}}), iconTransformation(extent = {{90, -10}, {110, 10}})));
|
|
|
|
|
Modelica.Blocks.Interfaces.RealOutput DronPositionConsign[3](quantity = "Mechanics.Translation.Displace", displayUnit = "m") "Dron position consign" annotation(
|
|
|
|
|
Placement(transformation(extent = {{0, 20}, {20, 40}}), iconTransformation(extent = {{90, 40}, {110, 60}})));
|
|
|
|
|
Modelica.Blocks.Interfaces.BooleanInput APEngagement "'input Boolean' as connector" annotation(
|
|
|
|
|
Placement(visible = true,transformation(extent = {{-113, -63}, {-73, -23}}, rotation = 0), iconTransformation(extent = {{-120, 30}, {-80, 70}}, rotation = 0)));
|
|
|
|
|
Modelica.Blocks.Interfaces.BooleanOutput SelectedControlMode "'output Boolean' as connector" annotation(
|
|
|
|
|
Placement(transformation(extent = {{10, -45}, {30, -25}}), iconTransformation(extent = {{90, -60}, {110, -40}})));
|
|
|
|
|
Modelica.Blocks.Interfaces.BooleanInput IndicatorYawConsign "'input Boolean' as connector" annotation(
|
|
|
|
|
Placement(visible = true,transformation(extent = {{-118, 5}, {-78, 45}}, rotation = 0), iconTransformation(extent = {{-120, -20}, {-80, 20}}, rotation = 0)));
|
|
|
|
|
Modelica.Blocks.Interfaces.RealInput Yaw "'input Real' as connector" annotation(
|
|
|
|
|
Placement(transformation(extent = {{-120, -35}, {-80, 5}}), iconTransformation(extent = {{-120, -70}, {-80, -30}})));
|
|
|
|
|
AIDAModelica.RunFlightPlan runFlightPlan1 annotation(
|
|
|
|
|
Placement(transformation(extent = {{-42, 19}, {-22, 39}})));
|
|
|
|
|
Modelica.Blocks.Logical.Switch SelectYawConsign annotation(
|
|
|
|
|
Placement(transformation(extent = {{10, -15}, {30, 5}})));
|
|
|
|
|
AIDAModelica.YawConsignProducing yawConsignProducing1 annotation(
|
|
|
|
|
Placement(transformation(extent = {{-48, -20}, {-28, 0}})));
|
|
|
|
|
equation
|
|
|
|
|
connect(yawConsignProducing1.YRC, APEngagement) annotation(
|
|
|
|
|
Line(points = {{-48, -4}, {-80, -4}, {-80, -42}, {-92, -42}}, color = {255, 0, 255}));
|
|
|
|
|
connect(SelectYawConsign.u2, APEngagement) annotation(
|
|
|
|
|
Line(points = {{8, -5}, {-22, -5}, {-22, -43}, {-93, -43}}, color = {255, 0, 255}));
|
|
|
|
|
connect(APEngagement, SelectedControlMode) annotation(
|
|
|
|
|
Line(points = {{-93, -43}, {-22, -43}, {-22, -34}, {20, -34}}, color = {255, 0, 255}));
|
|
|
|
|
connect(yawConsignProducing1.Yaw, Yaw) annotation(
|
|
|
|
|
Line(points = {{-48, -15}, {-100, -15}}, color = {0, 0, 127}, thickness = 0.0625));
|
|
|
|
|
connect(runFlightPlan1.DronPositionConsign[:], DronPositionConsign[:]) annotation(
|
|
|
|
|
Line(points = {{-22, 34}, {-4, 34}, {-4, 30}, {10, 30}}, color = {0, 0, 127}, thickness = 0.0625));
|
|
|
|
|
connect(SelectYawConsign.y, YawConsign) annotation(
|
|
|
|
|
Line(points = {{31, -5}, {36, -5}, {50, -5}, {55, -5}}, color = {0, 0, 127}, thickness = 0.0625));
|
|
|
|
|
connect(yawConsignProducing1.DesiredYaw, SelectYawConsign.u3) annotation(
|
|
|
|
|
Line(points = {{-28, -10}, {3, -10}, {3, -13}, {8, -13}}, color = {0, 0, 127}, thickness = 0.0625));
|
|
|
|
|
connect(SelectYawConsign.u1, runFlightPlan1.YawConsign) annotation(
|
|
|
|
|
Line(points = {{8, 3}, {3, 3}, {-17, 3}, {-17, 24}, {-22, 24}}, color = {0, 0, 127}));
|
|
|
|
|
annotation(
|
|
|
|
|
selectControlMode1(SelectedControlMode(flags = 2), APEngagement(flags = 2), Main_State(flags = 2)),
|
|
|
|
|
YawConsign(flags = 2),
|
|
|
|
|
DronPositionConsign(flags = 2),
|
|
|
|
|
APEngagement(flags = 2),
|
|
|
|
|
SelectedControlMode(flags = 2),
|
|
|
|
|
IndicatorYawConsign(flags = 2),
|
|
|
|
|
Yaw(flags = 2),
|
|
|
|
|
runFlightPlan1(DronPositionConsign(flags = 2), YawConsign(flags = 2), X_coordinate_map(u(flags = 2), y(flags = 2)), timeSource1(TimeOutput(flags = 2)), Y_coordinate_map(u(flags = 2), y(flags = 2)), Z_coordinate_map(u(flags = 2), y(flags = 2)), YawAngle(u(flags = 2), y(flags = 2))),
|
|
|
|
|
SelectYawConsign(u1(flags = 2), u2(flags = 2), u3(flags = 2), y(flags = 2)),
|
|
|
|
|
yawConsignProducing1(Yaw(flags = 2), DesiredYaw(flags = 2), YRC(flags = 2), YawOld(flags = 2)),
|
|
|
|
|
Icon(graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-103.3, 100}, {100, -100}}), Text(origin = {-7, 2}, extent = {{-49, 10}, {49, -10}}, textString = "%name")}, coordinateSystem(initialScale = 0.1)),
|
|
|
|
|
experiment(StopTime = 1, StartTime = 0, Interval = 0.002, MaxInterval = "0.001"));
|
|
|
|
|
end ControlDroneNavigation;
|