within AIDAModelica; model drone_feets "drone_feets.mo" Modelica.Blocks.Interfaces.RealInput Position "'input Real' as connector" annotation( Placement(transformation(extent = {{-115, 45}, {-75, 85}}), iconTransformation(extent = {{-125, -25}, {-75, 25}}))); Modelica.Blocks.Interfaces.RealOutput Force(start = 0) "'output Real' as connector" annotation( Placement(transformation(extent = {{85, 55}, {105, 75}}), iconTransformation(extent = {{75, -25}, {125, 25}}))); parameter Real Raideur = 2000; parameter Real Z0 = -0.30; equation if Position > Z0 then Force = -Raideur * (Position - Z0); else Force = 0; end if; annotation( Force(flags = 2), Icon(graphics = {Line(points = {{-50, 26.7}, {53.3, 26.7}, {-50, 6.7}, {50, 6.7}, {-50, -13.3}, {50, -16.7}, {-46.7, -33.3}, {50, -33.3}, {-50, -53.3}, {50, -53.3}})}), Diagram(graphics = {Line(points = {{-45, 80}, {-45, 45}, {-25, 80}, {-25, 45}, {-5, 80}, {-5, 45}, {15, 80}, {15, 45}, {35, 80}, {35, 45}}), Line(points = {{-45, 65}, {-70, 65}, {-70, 65}}), Line(points = {{35, 65}, {85, 65}})}), experiment(StopTime = 1, StartTime = 0, Interval = 0.002, MaxInterval = "0.001")); end drone_feets;