Migration to OpenModelica 1.25 and FMUs Generation
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
within AIDAModelica;
|
||||
|
||||
model RigidBodyKinematicModel "Rigid body kinematic model"
|
||||
Modelica.Blocks.Interfaces.RealInput DroneAngularVelocities[3](each quantity = "Mechanics.Rotation.RotVelocity", each displayUnit = "rad/s") "Angulars velocities" annotation(
|
||||
Placement(transformation(extent = {{-120, 50}, {-80, 90}}), iconTransformation(extent = {{-120, 30}, {-80, 70}})));
|
||||
Modelica.Blocks.Interfaces.RealInput Velocity[3](each quantity = "Mechanics.Translation.Velocity", each displayUnit = "m/s") "Velocity" annotation(
|
||||
Placement(transformation(extent = {{-120, -20}, {-80, 20}}), iconTransformation(extent = {{-120, -70}, {-80, -30}})));
|
||||
Modelica.Blocks.Interfaces.RealInput AttitudeFB[3] "Drone attitude feedback" annotation(
|
||||
Placement(transformation(extent = {{-120, 25}, {-80, 65}}), iconTransformation(origin = {-50, 100}, extent = {{-20, -20}, {20, 20}}, rotation = -90)));
|
||||
Modelica.Blocks.Interfaces.RealOutput Attitude[3](each quantity = "Mechanics.Rotation.RotVelocity", each displayUnit = "rad/s", start = {0, 0, 0}) "Attitude derivated" annotation(
|
||||
Placement(transformation(extent = {{-45, 50}, {-25, 70}}), iconTransformation(extent = {{90, 40}, {110, 60}})));
|
||||
Modelica.Blocks.Interfaces.RealOutput Position[3](each quantity = "Mechanics.Translation.Displace", each displayUnit = "m", start = {0, 0, 0}) "Position derivated" annotation(
|
||||
Placement(transformation(extent = {{-45, -15}, {-25, 5}}), iconTransformation(extent = {{90, -60}, {110, -40}})));
|
||||
ComputeDronePosition computeDronePosition1(integrator10(initType = Modelica.Blocks.Types.Init.NoInit, y_start = -0.04)) annotation(
|
||||
Placement(transformation(extent = {{-70, -5}, {-55, 5}})));
|
||||
ComputeDroneAttitude computeDroneAttitude1 annotation(
|
||||
Placement(transformation(extent = {{-75, 65}, {-60, 75}})));
|
||||
equation
|
||||
connect(computeDroneAttitude1.AttitudeFB[:], AttitudeFB[:]) annotation(
|
||||
Line(points = {{-70, 65}, {-70, 60}, {-70, 45}, {-95, 45}, {-100, 45}}, color = {0, 0, 127}, thickness = 0.0625));
|
||||
connect(computeDroneAttitude1.Attitude[:], Attitude[:]) annotation(
|
||||
Line(points = {{-60.3, 70}, {-55.3, 70}, {-40, 70}, {-40, 60}, {-35, 60}}, color = {0, 0, 127}, thickness = 0.0625));
|
||||
connect(computeDronePosition1.DronVelocity[:], Velocity[:]) annotation(
|
||||
Line(points = {{-70, 0}, {-75, 0}, {-95, 0}, {-100, 0}}, color = {0, 0, 127}, thickness = 0.0625));
|
||||
connect(computeDronePosition1.Position[:], Position[:]) annotation(
|
||||
Line(points = {{-55.3, 0}, {-50.3, 0}, {-40, 0}, {-40, -5}, {-35, -5}}, color = {0, 0, 127}, thickness = 0.0625));
|
||||
connect(computeDroneAttitude1.DroneAngularVelocities[:], DroneAngularVelocities[:]) annotation(
|
||||
Line(points = {{-75, 70}, {-80, 70}, {-95, 70}, {-100, 70}}, color = {0, 0, 127}, thickness = 0.0625));
|
||||
annotation(
|
||||
DroneAngularVelocities(flags = 2),
|
||||
Velocity(flags = 2),
|
||||
AttitudeFB(flags = 2),
|
||||
Attitude(flags = 2),
|
||||
Position(flags = 2),
|
||||
computeDronePosition1(DronVelocity(flags = 2), Position(flags = 2), integrator10(u(flags = 2), y(flags = 2)), integrator11(u(flags = 2), y(flags = 2)), integrator12(u(flags = 2), y(flags = 2))),
|
||||
computeDroneAttitude1(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(graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-7, 1}, extent = {{-19, 11}, {19, -11}}, textString = "%name")}, coordinateSystem(initialScale = 0.1)),
|
||||
experiment(StopTime = 1, StartTime = 0, Interval = 0.002, MaxInterval = "0.001"));
|
||||
end RigidBodyKinematicModel;
|
||||
Reference in New Issue
Block a user