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.
57 lines
4.6 KiB
57 lines
4.6 KiB
within AIDAModelica; |
|
|
|
model ComputeDroneVelocity "[SimuD3 DM] Compute drone velocity" |
|
// CP: 65001 |
|
// SimulationX Version: 3.8.2.45319 x64 |
|
Modelica.Blocks.Interfaces.RealInput TotalThrust(quantity = "Mechanics.Translation.Force", displayUnit = "N") "'input Real' as connector" annotation( |
|
Placement(transformation(extent = {{-75, 25}, {-35, 65}}), iconTransformation(extent = {{-120, 5}, {-80, 45}}))); |
|
Modelica.Blocks.Interfaces.RealOutput Accelerations[3] "Accelerations" annotation( |
|
Placement(transformation(extent = {{70, -40}, {90, -20}}), iconTransformation(extent = {{90, -35}, {110, -15}}))); |
|
Modelica.Blocks.Interfaces.RealInput Attitude[3](quantity = "Mechanics.Rotation.Angle", displayUnit = "rad") "'input Real' as connector" annotation( |
|
Placement(transformation(extent = {{-75, -10}, {-35, 30}}), iconTransformation(origin = {0, 50}, extent = {{-20, -20}, {20, 20}}, rotation = -90))); |
|
Modelica.Blocks.Interfaces.RealOutput DroneVelocity[3](quantity = "Mechanics.Translation.Velocity", displayUnit = "m/s") "'output Real' as connector" annotation( |
|
Placement(transformation(extent = {{120, 20}, {140, 40}}), iconTransformation(extent = {{90, 15}, {110, 35}}))); |
|
Modelica.Blocks.Interfaces.RealInput ExternalForce[3] annotation( |
|
Placement(transformation(extent = {{-75, -40}, {-35, 0}}), iconTransformation(extent = {{-120, -45}, {-80, -5}}))); |
|
ComputationAccelerationModel computationAccelerationModel1 annotation( |
|
Placement(transformation(extent = {{5, 20}, {20, 35}}))); |
|
Modelica.Blocks.Continuous.Integrator integrator4 annotation( |
|
Placement(transformation(extent = {{70, -10}, {90, 10}}))); |
|
Modelica.Blocks.Continuous.Integrator integrator5 annotation( |
|
Placement(transformation(extent = {{70, 20}, {90, 40}}))); |
|
Modelica.Blocks.Continuous.Integrator integrator6 annotation( |
|
Placement(transformation(extent = {{70, 50}, {90, 70}}))); |
|
equation |
|
connect(computationAccelerationModel1.Attitude[:], Attitude) annotation( |
|
Line(points = {{10, 35}, {10, 40}, {-20, 40}, {-20, 10}, {-50, 10}, {-55, 10}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(computationAccelerationModel1.TotalThrust, TotalThrust) annotation( |
|
Line(points = {{5, 30}, {0, 30}, {-50, 30}, {-50, 45}, {-55, 45}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator6.u, computationAccelerationModel1.DroneAcceleration[1]) annotation( |
|
Line(points = {{68, 60}, {63, 60}, {24.7, 60}, {24.7, 27.3}, {19.7, 27.3}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator5.u, computationAccelerationModel1.DroneAcceleration[2]) annotation( |
|
Line(points = {{68, 30}, {63, 30}, {24.7, 30}, {24.7, 27.3}, {19.7, 27.3}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator4.u, computationAccelerationModel1.DroneAcceleration[3]) annotation( |
|
Line(points = {{68, 0}, {63, 0}, {24.7, 0}, {24.7, 27.7}, {19.7, 27.7}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator6.y, DroneVelocity[1]) annotation( |
|
Line(points = {{91, 60}, {96, 60}, {125, 60}, {125, 30}, {130, 30}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator5.y, DroneVelocity[2]) annotation( |
|
Line(points = {{91, 30}, {96, 30}, {125, 30}, {130, 30}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(integrator4.y, DroneVelocity[3]) annotation( |
|
Line(points = {{91, 0}, {96, 0}, {125, 0}, {125, 30}, {130, 30}}, color = {0, 0, 127}, thickness = 0.0625)); |
|
connect(computationAccelerationModel1.ExternalForce[:], ExternalForce[:]) annotation( |
|
Line(points = {{5, 25}, {0, 25}, {-1, -20}, {-50, -20}, {-55, -20}}, color = {0, 0, 127}, thickness = 0.0625), |
|
AutoRoute = false); |
|
connect(computationAccelerationModel1.DroneAcceleration[:], Accelerations[:]) annotation( |
|
Line(points = {{19.7, 27.3}, {24.7, 27.3}, {25, -30}, {75, -30}, {80, -30}}, color = {0, 0, 127}, thickness = 0.0625), |
|
AutoRoute = false); |
|
annotation( |
|
TotalThrust(flags = 2), |
|
Attitude(flags = 2), |
|
DroneVelocity(flags = 2), |
|
computationAccelerationModel1(TotalThrust(flags = 2), Attitude(flags = 2), DroneAcceleration(flags = 2), ExternalForce(flags = 2)), |
|
integrator4(u(flags = 2), y(flags = 2)), |
|
integrator5(u(flags = 2), y(flags = 2)), |
|
integrator6(u(flags = 2), y(flags = 2)), |
|
Icon(coordinateSystem(extent = {{-100, -50}, {100, 50}}, initialScale = 0.1), graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 53.3}, {103.3, -53.3}}), Text(origin = {-5, -3}, extent = {{-15, 5}, {15, -5}}, textString = "%name")}), |
|
experiment(StopTime = 1, StartTime = 0, Interval = 0.002, MaxInterval = "0.001")); |
|
end ComputeDroneVelocity;
|
|
|