// CP: 65001 // SimulationX Version: 3.8.2.45319 x64 within AIDAModelica; model ComputeTotalThrustCA "[SF2.4.2] Compute total thrust" Modelica.Blocks.Interfaces.RealInput AccelerationConsign( quantity="Mechanics.Translation.Accel", displayUnit="m/s²") "Acceleration consign" annotation(Placement( transformation(extent={{-20,-20},{20,20}}), iconTransformation(extent={{-120,-20},{-80,20}}))); Modelica.Blocks.Interfaces.RealOutput TotalThrustAP( quantity="Mechanics.Translation.Force", displayUnit="N") "Total thrust autopilot mode" annotation(Placement( transformation(extent={{-10,-10},{10,10}}), iconTransformation(extent={{90,-10},{110,10}}))); parameter Real m( quantity="Basics.Mass", displayUnit="kg")=1.8 "Parameter m"; Real AC( quantity="Mechanics.Translation.Velocity", displayUnit="m/s") "Altitude consign"; parameter Real N=-1 "Acceleration linear threshold"; equation // enter your equations here AC = AccelerationConsign; //TotalThrustAP =if AC<0 then -m*AC else 0; //to prevent loss of attitude control due to a nul thrust TotalThrustAP =if AC