// CP: 65001 // SimulationX Version: 3.8.2.45319 x64 within AIDAModelica; model RemoteControlForIntegration "Remote Control For Integration" Modelica.Blocks.Interfaces.RealOutput VerticalSpeedCommand( quantity="Mechanics.Translation.Velocity", displayUnit="m/s") "'output Real' as connector" annotation(Placement( transformation(extent={{-10,65},{10,85}}), iconTransformation( origin={-75,-100}, extent={{-10,-10},{10,10}}, rotation=-90))); Modelica.Blocks.Interfaces.RealOutput RollCommand( quantity="Mechanics.Rotation.Angle", displayUnit="rad") "'output Real' as connector" annotation(Placement( transformation(extent={{-10,35},{10,55}}), iconTransformation( origin={-25,-100}, extent={{-10,-10},{10,10}}, rotation=-90))); Modelica.Blocks.Interfaces.RealOutput PitchCommand( quantity="Mechanics.Rotation.Angle", displayUnit="rad") "'output Real' as connector" annotation(Placement( transformation(extent={{-10,5},{10,25}}), iconTransformation( origin={25,-100}, extent={{-10,-10},{10,10}}, rotation=-90))); Modelica.Blocks.Interfaces.RealOutput YawCommand( quantity="Mechanics.Rotation.Angle", displayUnit="rad") "'output Real' as connector" annotation(Placement( transformation(extent={{-9.699999999999999,-24.7},{10.3,-4.7}}), iconTransformation( origin={75,-100}, extent={{-10,-10},{10,10}}, rotation=-90))); Modelica.Blocks.Interfaces.BooleanOutput ControlMode "'output Boolean' as connector" annotation(Placement( transformation(extent={{-10,-65},{10,-45}}), iconTransformation( origin={-125,-50}, extent={{-10,-10},{10,10}}, rotation=180))); Modelica.Blocks.Interfaces.BooleanOutput IndicatorYawConsign "'output Boolean' as connector" annotation(Placement( transformation(extent={{-10,-50},{10,-30}}), iconTransformation( origin={-125,0}, extent={{-10,-10},{10,10}}, rotation=-180))); Modelica.Blocks.Tables.CombiTable1Ds VerticalSpeedCommandCurve( table={{0,0},{8.517197272438,0},{8.517197272439,-0.6},{20.94728806169,-0.6},{20.94873106169,0},{121.801046301399,0},{121.802489301399,0},{129.0944818387,0},{129.0959258387,0},{134.215124194368,0},{134.216567194368,0},{134.628815476324,0},{134.630258476324,0},{138.533727217968,0},{138.535170217968,0},{245.054,0}}, smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments) annotation(Placement(transformation(extent={{-40,65},{-20,85}}))); RunFlightPlan.TimeSource timeSource1 annotation(Placement(transformation(extent={{-95,45},{-75,65}}))); Modelica.Blocks.Tables.CombiTable1Ds RollCommandCurve( table={{0,0},{25.786492253237,0},{25.787935253237,0},{32.204791441651,0},{32.206234441651,0},{32.79902904655,0},{32.800616390534,0},{37.687626723901,0},{37.689069723901,0},{39.778866585705,0},{39.780309585705,0},{44.391515243107,0},{44.392958243107,0},{64.219238055642,0},{64.220681055642,0},{65.533297453724,0},{65.534849785025,0},{69.167337517444,0},{69.168780517444,0},{71.233189315965,0},{71.234632315965,0},{91.730954881384,0},{91.732397881384,0},{92.176860934385,0},{92.177950148563,0},{94.097230193319,0},{94.098673193319,0},{94.54309811646,0},{94.544187128709,0},{99.301664560029,0},{99.303107560029,0},{99.93640873338,0},{99.93785173338,0},{174.525661337499,0},{174.527104337499,0},{183.942664820241,0},{183.944107820241,0},{184.868730074659,0},{184.870173074659,0},{191.639185376725,0},{191.640628376725,0},{192.552594341689,0},{192.554037341689,0},{193.161855687393,0},{193.162941723513,0},{194.102624172672,0},{194.104067172672,0},{196.058768109232,0},{196.060211109232,0},{197.235529291973,0},{197.236972291973,0},{198.205941202781,0},{198.207384202781,0},{200.86348599772,0},{200.86492899772,0},{201.473218912813,0},{201.474306538157,0},{202.648655689236,0},{202.650098689236,0},{203.258139206362,0},{203.25922614281,0},{218.761788196219,0},{218.763231196219,0},{218.97331230055,0},{218.974959657084,0},{245.054,0}}, smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments) annotation(Placement(transformation(extent={{-40,35},{-20,55}}))); Modelica.Blocks.Tables.CombiTable1Ds PitchCommandCurve( table={{0,0},{48.094293681429,0},{48.095736681429,0},{54.591834225423,0},{54.593277225423,0},{55.513370691687,0},{55.514813691687,0},{61.182904112935,0},{61.184347112935,0},{72.633378124442,0},{72.634821124442,0},{75.836703739009,0},{75.838146739009,0},{76.190291946595,0},{76.191899584097,0},{83.746287567012,0},{83.747730567012,0},{86.669911803152,0},{86.671354803152,0},{89.874386081548,0},{89.875829081548,0},{101.945717413619,0},{101.947160413619,0},{103.004541167946,0},{103.005984167946,0},{103.504697052053,0},{103.505784233044,0},{108.546832048665,0},{108.548275048665,0},{110.016958010245,0},{110.018524511934,0},{111.926708452288,0},{111.928151452288,0},{114.939234058818,0},{114.940677058818,0},{116.125168170284,0},{116.126611170284,0},{147.483847367729,0},{147.485290367729,0},{153.311386368157,0},{153.312829368157,0},{154.803428193241,0},{154.804871193241,0},{159.76161430756,0},{159.76305730756,0},{162.187547920928,0},{162.188990920928,0},{163.20323940764,0},{163.204323638944,0},{164.809861537178,0},{164.811304537178,0},{165.419382090795,0},{165.420469212077,0},{169.085130283014,0},{169.086573283014,0},{169.438735267897,0},{169.440342125828,0},{170.306359413346,0},{170.307802413346,0},{170.420024802715,0},{170.421519033579,0},{205.811730926797,0},{205.813173926797,0},{206.312227312983,0},{206.313315922167,0},{236.060403881501,0},{236.061846881501,0},{236.560902101512,0},{236.561990711112,0},{245.054,0}}, smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments) annotation(Placement(transformation(extent={{-40,5},{-20,25}}))); Modelica.Blocks.Tables.CombiTable1Ds YawCommandCurve( table={{0,0},{245.054,0}}, smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments) annotation(Placement(transformation(extent={{-40,-25},{-20,-5}}))); equation // enter your equations here ControlMode = true; IndicatorYawConsign = false; /*if VSCommand1 > 0 then VerticalSpeedCommand = -1; elseif VSCommand2 > 0 then VerticalSpeedCommand = -0.8; elseif VSCommand3 > 0 then VerticalSpeedCommand = -0.6; elseif VSCommand4 > 0 then VerticalSpeedCommand = -0.4; elseif VSCommand5 > 0 then VerticalSpeedCommand = -0.2; elseif VSCommand6 > 0 then VerticalSpeedCommand = 0.2; elseif VSCommand7 > 0 then VerticalSpeedCommand = 0.4; elseif VSCommand8 > 0 then VerticalSpeedCommand = 0.6; elseif VSCommand9 > 0 then VerticalSpeedCommand = 0.8; elseif VSCommand10 > 0 then VerticalSpeedCommand = 1; else VerticalSpeedCommand = 0; end if; if YCommandP > 0 then der(YawCommand) = 0.01; IndicatorYawConsign = true; elseif YCommandM > 0 then der(YawCommand) = -0.01; IndicatorYawConsign = true; else YawCommand = 0; IndicatorYawConsign = false; end if; if RCommandP > 0 then RollCommand = 0.0261799; //15 deg elseif RCommandM > 0 then RollCommand = -0.0261799; else RollCommand = 0; end if; if PCommandP > 0 then PitchCommand = 0.0261799; elseif PCommandM > 0 then PitchCommand = -0.0261799; else PitchCommand = 0; end if;*/ equation connect(VerticalSpeedCommandCurve.u,timeSource1.TimeOutput) annotation(Line( points={{-42,75},{-47,75},{-70,75},{-70,55},{-75,55}}, color={0,0,127}, thickness=0.0625)); connect(RollCommandCurve.u,timeSource1.TimeOutput) annotation(Line( points={{-42,45},{-47,45},{-70,45},{-70,55},{-75,55}}, color={0,0,127}, thickness=0.0625)); connect(PitchCommandCurve.u,timeSource1.TimeOutput) annotation(Line( points={{-42,15},{-47,15},{-70,15},{-70,55},{-75,55}}, color={0,0,127}, thickness=0.0625)); connect(YawCommandCurve.u,timeSource1.TimeOutput) annotation(Line( points={{-42,-15},{-47,-15},{-70,-15},{-70,55},{-75,55}}, color={0,0,127}, thickness=0.0625)); connect(VerticalSpeedCommandCurve.y[1],VerticalSpeedCommand) annotation(Line( points={{-19,75},{-14,75},{-5,75},{0,75}}, color={0,0,127}, thickness=0.0625)); connect(RollCommandCurve.y[1],RollCommand) annotation(Line( points={{-19,45},{-14,45},{-5,45},{0,45}}, color={0,0,127}, thickness=0.0625)); connect(PitchCommandCurve.y[1],PitchCommand) annotation(Line( points={{-19,15},{-14,15},{-5,15},{0,15}}, color={0,0,127}, thickness=0.0625)); connect(YawCommandCurve.y[1],YawCommand) annotation(Line( points={{-19,-15},{-14,-15},{-4.7,-15},{-4.7,-14.7},{0.3,-14.7}}, color={0,0,127}, thickness=0.0625)); annotation( VerticalSpeedCommand(flags=2), RollCommand(flags=2), PitchCommand(flags=2), YawCommand(flags=2), ControlMode(flags=2), IndicatorYawConsign(flags=2), VerticalSpeedCommandCurve( u(flags=2), y(flags=2)), timeSource1(TimeOutput(flags=2)), RollCommandCurve( u(flags=2), y(flags=2)), PitchCommandCurve( u(flags=2), y(flags=2)), YawCommandCurve( u(flags=2), y(flags=2)), Icon( coordinateSystem(extent={{-125,-100},{125,100}}), graphics={ Rectangle( fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-123.3,100},{123.3,-100}})}), experiment( StopTime=1, StartTime=0, Interval=0.002, MaxInterval="0.001")); end RemoteControlForIntegration;