PositionSensor

model PositionSensor "Ideal sensor to measure the absolute position"
    extends Translational.Interfaces.PartialAbsoluteSensor;

    Modelica.Blocks.Interfaces.RealOutput s(unit = "m") "Absolute position of flange as output signal"
        annotation (Placement(
            transformation(extent = {
                {100, -11}, 
                {120, 9}}),
            iconTransformation(extent = {
                {100, -10}, 
                {120, 10}})));
equation
    s = flange.s;

    annotation (
        Documentation(info = "<html>\n<p>\nMeasures the <em>absolute position s</em> of a flange in an ideal way and provides the result as\noutput signals (to be further processed with blocks of the\nModelica.Blocks library).\n</p>\n\n</html>"),
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Text(
                    extent = {
                        {80, -28}, 
                        {114, -62}},
                    textString = "s")}));
end PositionSensor;