AIDA is a study case for model based system engineering, made by MOISE project. This project contains the simulation model of AIDA (made with SimulationX in Modelica)
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.

28 lines
1.7 KiB

within AIDAModelica;
model ComputationChangeAngleVelocity "Computation ChangeAngle Velocity"
// CP: 65001
// SimulationX Version: 3.8.2.45319 x64
Modelica.Blocks.Interfaces.RealInput DronAngularVelocities[3](quantity = "Mechanics.Rotation.RotVelocity", displayUnit = "rad/s") "'input Real' as connector" annotation(
Placement(transformation(extent = {{-20, -20}, {20, 20}}), iconTransformation(extent = {{-95, 5}, {-55, 45}})));
Modelica.Blocks.Interfaces.RealInput Attitude[3](quantity = "Mechanics.Rotation.Angle", displayUnit = "rad") "'input Real' as connector" annotation(
Placement(transformation(extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-75, -25}, extent = {{-20, -20}, {20, 20}})));
Modelica.Blocks.Interfaces.RealOutput ChangeAngleVelocity[3](quantity = "Mechanics.Rotation.RotVelocity", displayUnit = "rad/s") "'output Real' as connector" annotation(
Placement(transformation(extent = {{-10, -10}, {10, 10}}), iconTransformation(extent = {{61.7, -10}, {81.7, 10}})));
Real W[3, 3] "Matrix W";
equation
// enter your equations here
W[1, 1] = 1;
W[1, 2] = tan(Attitude[2]) * sin(Attitude[1]);
W[1, 3] = tan(Attitude[2]) * cos(Attitude[1]);
W[2, 1] = 0;
W[2, 2] = cos(Attitude[1]);
W[2, 3] = -sin(Attitude[1]);
W[3, 1] = 0;
W[3, 2] = sin(Attitude[1]) / cos(Attitude[2]);
W[3, 3] = cos(Attitude[1]) * cos(Attitude[2]);
ChangeAngleVelocity = W * DronAngularVelocities;
annotation(
Icon(coordinateSystem(extent = {{-75, -75}, {75, 75}}, initialScale = 0.1), graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-80, 76.7}, {76.7, -76.7}}), Text(origin = {-5, 1}, extent = {{-19, 7}, {19, -7}}, textString = "%name")}));
end ComputationChangeAngleVelocity;