You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
3.8 KiB
47 lines
3.8 KiB
within AIDAModelica; |
|
|
|
model ComputeDroneAttitude "[SimuD6 KM] Compute drone attitude" |
|
// CP: 65001 |
|
// SimulationX Version: 3.8.2.45319 x64 |
|
Modelica.Blocks.Interfaces.RealInput DroneAngularVelocities[3](quantity = "Mechanics.Rotation.RotVelocity", displayUnit = "rad/s") "'input Real' as connector" annotation( |
|
Placement(transformation(extent = {{-135, 5}, {-95, 45}}), iconTransformation(extent = {{-95, -20}, {-55, 20}}))); |
|
Modelica.Blocks.Interfaces.RealInput AttitudeFB[3](quantity = "Mechanics.Rotation.Angle", displayUnit = "rad") "'input Real' as connector" annotation( |
|
Placement(transformation(extent = {{-135, -25}, {-95, 15}}), iconTransformation(origin = {-25, -50}, extent = {{-20, -20}, {20, 20}}, rotation = -270))); |
|
Modelica.Blocks.Interfaces.RealOutput Attitude[3](quantity = "Mechanics.Rotation.Angle", displayUnit = "rad") "'output Real' as connector" annotation( |
|
Placement(transformation(extent = {{75, 5}, {95, 25}}), iconTransformation(extent = {{61.7, -10}, {81.7, 10}}))); |
|
ComputationChangeAngleVelocity computationChangeAngleVelocity1 annotation( |
|
Placement(transformation(extent = {{-60, 10}, {-45, 25}}))); |
|
Modelica.Blocks.Continuous.Integrator integrator7 annotation( |
|
Placement(transformation(extent = {{10, 35}, {30, 55}}))); |
|
Modelica.Blocks.Continuous.Integrator integrator8 annotation( |
|
Placement(transformation(extent = {{10, 5}, {30, 25}}))); |
|
Modelica.Blocks.Continuous.Integrator integrator9 annotation( |
|
Placement(transformation(extent = {{10, -25}, {30, -5}}))); |
|
equation |
|
connect(computationChangeAngleVelocity1.DronAngularVelocities[:], DroneAngularVelocities[:]) annotation( |
|
Line(points = {{-60, 20}, {-65, 20}, {-110, 20}, {-110, 25}, {-115, 25}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator7.u, computationChangeAngleVelocity1.ChangeAngleVelocity[1]) annotation( |
|
Line(points = {{8, 45}, {3, 45}, {-40.3, 45}, {-40.3, 17.3}, {-45.3, 17.3}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator8.u, computationChangeAngleVelocity1.ChangeAngleVelocity[2]) annotation( |
|
Line(points = {{8, 15}, {3, 15}, {-40.3, 15}, {-40.3, 17.3}, {-45.3, 17.3}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator9.u, computationChangeAngleVelocity1.ChangeAngleVelocity[3]) annotation( |
|
Line(points = {{8, -15}, {3, -15}, {-40.3, -15}, {-40.3, 17.7}, {-45.3, 17.7}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator7.y, Attitude[1]) annotation( |
|
Line(points = {{31, 45}, {36, 45}, {80, 45}, {80, 15}, {85, 15}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator8.y, Attitude[2]) annotation( |
|
Line(points = {{31, 15}, {36, 15}, {80, 15}, {85, 15}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator9.y, Attitude[3]) annotation( |
|
Line(points = {{31, -15}, {36, -15}, {80, -15}, {80, 15}, {85, 15}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(computationChangeAngleVelocity1.Attitude[:], AttitudeFB[:]) annotation( |
|
Line(points = {{-60, 15}, {-65, 15}, {-110, 15}, {-110, -5}, {-115, -5}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
annotation( |
|
DroneAngularVelocities(flags = 2), |
|
AttitudeFB(flags = 2), |
|
Attitude(flags = 2), |
|
computationChangeAngleVelocity1(DronAngularVelocities(flags = 2), Attitude(flags = 2), ChangeAngleVelocity(flags = 2), W(flags = 2)), |
|
integrator7(u(flags = 2), y(flags = 2)), |
|
integrator8(u(flags = 2), y(flags = 2)), |
|
integrator9(u(flags = 2), y(flags = 2)), |
|
Icon(coordinateSystem(extent = {{-75, -50}, {75, 50}}, initialScale = 0.1), graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-76.7, 50}, {76.7, -50}}), Text(origin = {-3, 3}, extent = {{-13, 5}, {13, -5}}, textString = "%name")}), |
|
experiment(StopTime = 1, StartTime = 0, Interval = 0.002, MaxInterval = "0.001")); |
|
end ComputeDroneAttitude;
|
|
|