Files
AIDASimulation/SimulationModels/AIDAModelica/YawConsignProducing.mo
Aurelien Didier 6465362982 Initialize simulation models.
Signed-off-by: Aurelien Didier <aurelien.didier51@gmail.com>
2019-03-25 15:59:00 +01:00

28 lines
1.4 KiB
Plaintext

within AIDAModelica;
model YawConsignProducing "Yaw consign producing"
Modelica.Blocks.Interfaces.RealInput Yaw(
quantity="Mechanics.Rotation.Angle",
displayUnit="rad") "Yaw feenback for logical algo" annotation(Placement(
transformation(extent={{-20,-20},{20,20}}),
iconTransformation(extent={{-120,-70},{-80,-30}})));
Modelica.Blocks.Interfaces.RealOutput DesiredYaw(
quantity="Mechanics.Rotation.Angle",
displayUnit="rad") "Desired yaw produced point" annotation(Placement(
transformation(extent={{-10,-10},{10,10}}),
iconTransformation(extent={{90,-10},{110,10}})));
Modelica.Blocks.Interfaces.BooleanInput YRC "Yaw RC command from remote control indication" annotation(Placement(
transformation(extent={{-20,-20},{20,20}}),
iconTransformation(
origin={-100,50},
extent={{-20,-20},{20,20}})));
initial equation
DesiredYaw=0;
equation
// when a yaw order is commanded from the remote control, the current yaw position is recorded into DesiredYaw, which is added to the remote control order
//this is to prevent a return to 0 heading at manual mode transition
when YRC == false then
DesiredYaw = Yaw;
end when;
annotation(Icon(graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-8, 0}, extent = {{-40, 10}, {40, -10}}, textString = "%name")}, coordinateSystem(initialScale = 0.1)));
end YawConsignProducing;