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.
 

171 lines
5.8 KiB

// CP: 65001
// SimulationX Version: 3.8.2.45319 x64
within AIDAModelica;
model SimXToProSIVICInterfaceTest "Simulation X to ProSIVIC Interface Test"
Modelica.Blocks.Interfaces.RealInput Position[3](
quantity="Mechanics.Translation.Displace",
displayUnit="m") "'input Real' as connector" annotation(Placement(
transformation(extent={{-80,60},{-40,100}}),
iconTransformation(
origin={-75,100},
extent={{-20,-20},{20,20}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealInput Attitude[3](
quantity="Mechanics.Rotation.Angle",
displayUnit="rad") "'input Real' as connector" annotation(Placement(
transformation(extent={{20,60},{60,100}}),
iconTransformation(
origin={75,100},
extent={{-20,-20},{20,20}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealInput Speed[3](
quantity="Mechanics.Translation.Velocity",
displayUnit="m/s") "'input Real' as connector" annotation(Placement(
transformation(extent={{-20,-20},{20,20}}),
iconTransformation(
origin={-275,100},
extent={{-20,-20},{20,20}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealInput AngularSpeed[3](
quantity="Mechanics.Rotation.RotVelocity",
displayUnit="rad/s") "'input Real' as connector" annotation(Placement(
transformation(extent={{-20,-20},{20,20}}),
iconTransformation(
origin={275,100},
extent={{-20,-20},{20,20}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput translation_x(
quantity="Mechanics.Translation.Displace",
displayUnit="m") "Tracking translation x" annotation(Placement(
transformation(extent={{-95,30},{-75,50}}),
iconTransformation(
origin={-125,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput translation_y(
quantity="Mechanics.Translation.Displace",
displayUnit="m") "Tracking translation y" annotation(Placement(
transformation(extent={{-70,30},{-50,50}}),
iconTransformation(
origin={-75,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput translation_z(
quantity="Mechanics.Translation.Displace",
displayUnit="m") "Tracking translation z" annotation(Placement(
transformation(extent={{-30,30},{-10,50}}),
iconTransformation(
origin={-25,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput rotation_xi(
quantity="Mechanics.Rotation.Angle",
displayUnit="rad") "Tracking rotation xi " annotation(Placement(
transformation(extent={{10,30},{30,50}}),
iconTransformation(
origin={125,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput rotation_theta(
quantity="Mechanics.Rotation.Angle",
displayUnit="rad") "Tracking rotation theta" annotation(Placement(
transformation(extent={{40,30},{60,50}}),
iconTransformation(
origin={75,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput rotation_phi(
quantity="Mechanics.Rotation.Angle",
displayUnit="rad") "Tracking rotation phi" annotation(Placement(
transformation(extent={{70,30},{90,50}}),
iconTransformation(
origin={25,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput rollRate(
quantity="Mechanics.Rotation.RotVelocity",
displayUnit="rad/s") "'output Real' as connector" annotation(Placement(
transformation(extent={{-10,-10},{10,10}}),
iconTransformation(
origin={175,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput pitchRate(
quantity="Mechanics.Rotation.RotVelocity",
displayUnit="rad/s") "'output Real' as connector" annotation(Placement(
transformation(extent={{-10,-10},{10,10}}),
iconTransformation(
origin={225,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput yawRate(
quantity="Mechanics.Rotation.RotVelocity",
displayUnit="rad/s") "'output Real' as connector" annotation(Placement(
transformation(extent={{-10,-10},{10,10}}),
iconTransformation(
origin={275,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput SpeedX(
quantity="Mechanics.Translation.Displace",
displayUnit="m") "'output Real' as connector" annotation(Placement(
transformation(extent={{-10,-10},{10,10}}),
iconTransformation(
origin={-275,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput SpeedY(
quantity="Mechanics.Translation.Displace",
displayUnit="m") "'output Real' as connector" annotation(Placement(
transformation(extent={{-10,-10},{10,10}}),
iconTransformation(
origin={-225,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
Modelica.Blocks.Interfaces.RealOutput SpeedZ(
quantity="Mechanics.Translation.Displace",
displayUnit="m") "'output Real' as connector" annotation(Placement(
transformation(extent={{-10,-10},{10,10}}),
iconTransformation(
origin={-175,-100},
extent={{-10,-10},{10,10}},
rotation=-90)));
equation
// enter your equations here
translation_x = Position[1];
translation_y = -1*Position[2];
translation_z = -1*Position[3];
rotation_phi = Attitude[1];
rotation_theta = -1*Attitude[2];
rotation_xi = -1*Attitude[3];
rollRate = AngularSpeed[1];
pitchRate = -1*AngularSpeed[2];
yawRate = -1*AngularSpeed[3];
SpeedX = Speed[1];
SpeedY = -1*Speed[2];
SpeedZ = -1*Speed[3];
annotation(
Position(flags=2),
Attitude(flags=2),
translation_x(flags=2),
translation_y(flags=2),
translation_z(flags=2),
rotation_xi(flags=2),
rotation_theta(flags=2),
rotation_phi(flags=2),
Icon(
coordinateSystem(extent={{-325,-100},{325,100}}),
graphics={
Rectangle(
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
extent={{-323.2,100},{326.7,-100}})}),
experiment(
StopTime=1,
StartTime=0,
Interval=0.002,
MaxInterval="0.001"));
end SimXToProSIVICInterfaceTest;