Skip to content

Commit

Permalink
Inherit from PartialAbsoluteSensor from Interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
tobolar authored and beutlich committed Nov 18, 2023
1 parent 544f488 commit 0cebbbd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ equation
annotation (
Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100,100}}),
graphics={
Text(
extent={{-130,76},{131,124}},
textString="%name",
textColor={0,0,255}),
Text(
extent={{-50,-14},{50,-54}},
textColor={64,64,64},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ equation
annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,
-100},{100,100}}),
graphics={
Text(
extent={{-127,75},{134,123}},
textString="%name",
textColor={0,0,255}),
Text(
extent={{-50,-14},{50,-54}},
textColor={64,64,64},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
within Modelica.Mechanics.MultiBody.Sensors.Internal;
model PartialAbsoluteBaseSensor
"Base class for absolute sensor models defined by equations (frame_resolve must be connected exactly once)"
extends PartialAbsoluteSensor;

Modelica.Mechanics.MultiBody.Interfaces.Frame_resolve frame_resolve
"Coordinate system in which output vector(s) is optionally resolved"
annotation (Placement(transformation(extent={{-16,-16},{16,16}},
rotation=-90,
origin={0,-100})));
extends Interfaces.PartialAbsoluteSensor(
break y);

equation
assert(cardinality(frame_resolve) == 1, "Connector frame_resolve must be connected exactly once");
frame_a.f = zeros(3);
frame_a.t = zeros(3);
frame_resolve.f = zeros(3);
frame_resolve.t = zeros(3);

annotation (Icon(coordinateSystem(preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Text(
extent={{-108,43},{-72,18}},
textColor={95,95,95},
textString="a"),
Line(
points={{-70,0},{-96,0},{-96,0}}),
Line(
points={{0,15},{0,-15}},
color={0,0,127},
origin={85,0},
rotation=90),
Line(
points={{0,-95},{0,-95},{0,-70},{0,-70}},
pattern=LinePattern.Dot),
points={{-70,0},{-100,0}}),
Text(
extent={{0,-75},{131,-100}},
textColor={95,95,95},
Expand Down

0 comments on commit 0cebbbd

Please sign in to comment.