Migration to OpenModelica 1.25 and FMUs Generation
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user