Changeset 804

Show
Ignore:
Timestamp:
11/16/07 09:10:19 (8 months ago)
Author:
otter
Message:

fixes ticket:1
- Removed SIunits.CelsiusTemperature, replaced references to it by

SIunits.Conversions.NonSIunits.Temperature_degC,
and updated the conversion script correspondingly.

- Changes in Blocks.Continuous seems to be just different

end-of-line characters (not clear what was changed).

- MultiBody: Changes for sensors (not yet finalized)

Location:
trunk/Modelica
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/Modelica/Blocks/Continuous.mo

    r775 r804  
    168168          extent={{-100,-100},{100,100}}, 
    169169          grid={2,2}), graphics={ 
    170           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    171           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
    172           Line(points={{60,0},{100,0}}, color={0,0,255}),  
    173           Text( 
    174             extent={{-36,60},{32,2}},  
    175             lineColor={0,0,0},  
    176             textString="k"),  
    177           Text( 
    178             extent={{-32,0},{36,-58}},  
    179             lineColor={0,0,0},  
    180             textString="s"),  
     170          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     171          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
     172          Line(points={{60,0},{100,0}}, color={0,0,255}), 
     173          Text( 
     174            extent={{-36,60},{32,2}}, 
     175            lineColor={0,0,0}, 
     176            textString="k"), 
     177          Text( 
     178            extent={{-32,0},{36,-58}}, 
     179            lineColor={0,0,0}, 
     180            textString="s"), 
    181181          Line(points={{-46,0},{46,0}}, color={0,0,0})})); 
    182182  initial equation  
     
    267267          extent={{-100,-100},{100,100}}, 
    268268          grid={2,2}), graphics={ 
    269           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    270           Text( 
    271             extent={{-54,46},{-4,-48}},  
    272             lineColor={0,0,0},  
    273             textString="lim"),  
    274           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
    275           Line(points={{60,0},{100,0}}, color={0,0,255}),  
    276           Text( 
    277             extent={{-8,60},{60,2}},  
    278             lineColor={0,0,0},  
    279             textString="k"),  
    280           Text( 
    281             extent={{-8,-2},{60,-60}},  
    282             lineColor={0,0,0},  
    283             textString="s"),  
     269          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     270          Text( 
     271            extent={{-54,46},{-4,-48}}, 
     272            lineColor={0,0,0}, 
     273            textString="lim"), 
     274          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
     275          Line(points={{60,0},{100,0}}, color={0,0,255}), 
     276          Text( 
     277            extent={{-8,60},{60,2}}, 
     278            lineColor={0,0,0}, 
     279            textString="k"), 
     280          Text( 
     281            extent={{-8,-2},{60,-60}}, 
     282            lineColor={0,0,0}, 
     283            textString="s"), 
    284284          Line(points={{4,0},{46,0}}, color={0,0,0})})); 
    285285  initial equation  
     
    378378          grid={2,2}), graphics={ 
    379379          Text( 
    380             extent={{-54,52},{50,10}},  
    381             lineColor={0,0,0},  
    382             textString="k s"),  
    383           Text( 
    384             extent={{-54,-6},{52,-52}},  
    385             lineColor={0,0,0},  
    386             textString="T s + 1"),  
    387           Line(points={{-50,0},{50,0}}, color={0,0,0}),  
    388           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    389           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
     380            extent={{-54,52},{50,10}}, 
     381            lineColor={0,0,0}, 
     382            textString="k s"), 
     383          Text( 
     384            extent={{-54,-6},{52,-52}}, 
     385            lineColor={0,0,0}, 
     386            textString="T s + 1"), 
     387          Line(points={{-50,0},{50,0}}, color={0,0,0}), 
     388          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     389          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
    390390          Line(points={{60,0},{100,0}}, color={0,0,255})}), 
    391391      Window( 
     
    486486          grid={2,2}), graphics={ 
    487487          Text( 
    488             extent={{-48,52},{50,8}},  
    489             lineColor={0,0,0},  
    490             textString="k"),  
    491           Text( 
    492             extent={{-54,-6},{56,-56}},  
    493             lineColor={0,0,0},  
    494             textString="T s + 1"),  
    495           Line(points={{-50,0},{50,0}}, color={0,0,0}),  
    496           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    497           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
     488            extent={{-48,52},{50,8}}, 
     489            lineColor={0,0,0}, 
     490            textString="k"), 
     491          Text( 
     492            extent={{-54,-6},{56,-56}}, 
     493            lineColor={0,0,0}, 
     494            textString="T s + 1"), 
     495          Line(points={{-50,0},{50,0}}, color={0,0,0}), 
     496          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     497          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
    498498          Line(points={{60,0},{100,0}}, color={0,0,255})}), 
    499499      Window( 
     
    595595          extent={{-100,-100},{100,100}}, 
    596596          grid={2,2}), graphics={ 
    597           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    598           Text( 
    599             extent={{-60,60},{60,14}},  
    600             lineColor={0,0,0},  
    601             textString="k"),  
    602           Text( 
    603             extent={{-60,8},{-32,-20}},  
    604             lineColor={0,0,0},  
    605             textString="s"),  
    606           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
    607           Line(points={{60,0},{100,0}}, color={0,0,255}),  
    608           Line(points={{-50,14},{50,14}}, color={0,0,0}),  
    609           Line(points={{-54,-20},{-38,-20}}, color={0,0,0}),  
    610           Text( 
    611             extent={{-52,-26},{-36,-48}},  
    612             lineColor={0,0,0},  
    613             textString="w"),  
    614           Line(points={{-50,2},{-56,-8},{-56,-28},{-52,-46}}, color={0,0,0}),  
    615           Line(points={{-40,2},{-34,-10},{-34,-30},{-38,-46}}, color={0,0,0}),  
    616           Text( 
    617             extent={{-34,8},{-22,-10}},  
    618             lineColor={0,0,0},  
    619             textString="2"),  
    620           Text( 
    621             extent={{-34,-6},{6,-36}},  
    622             lineColor={0,0,0},  
    623             textString="+2D"),  
    624           Text( 
    625             extent={{2,8},{30,-20}},  
    626             lineColor={0,0,0},  
    627             textString="s"),  
    628           Line(points={{8,-20},{24,-20}}, color={0,0,0}),  
    629           Text( 
    630             extent={{10,-26},{26,-48}},  
    631             lineColor={0,0,0},  
    632             textString="w"),  
    633           Line(points={{12,2},{6,-8},{6,-28},{10,-46}}, color={0,0,0}),  
    634           Line(points={{22,2},{28,-10},{28,-30},{24,-46}}, color={0,0,0}),  
    635           Text( 
    636             extent={{30,2},{58,-42}},  
    637             lineColor={0,0,0},  
     597          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     598          Text( 
     599            extent={{-60,60},{60,14}}, 
     600            lineColor={0,0,0}, 
     601            textString="k"), 
     602          Text( 
     603            extent={{-60,8},{-32,-20}}, 
     604            lineColor={0,0,0}, 
     605            textString="s"), 
     606          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
     607          Line(points={{60,0},{100,0}}, color={0,0,255}), 
     608          Line(points={{-50,14},{50,14}}, color={0,0,0}), 
     609          Line(points={{-54,-20},{-38,-20}}, color={0,0,0}), 
     610          Text( 
     611            extent={{-52,-26},{-36,-48}}, 
     612            lineColor={0,0,0}, 
     613            textString="w"), 
     614          Line(points={{-50,2},{-56,-8},{-56,-28},{-52,-46}}, color={0,0,0}), 
     615          Line(points={{-40,2},{-34,-10},{-34,-30},{-38,-46}}, color={0,0,0}), 
     616          Text( 
     617            extent={{-34,8},{-22,-10}}, 
     618            lineColor={0,0,0}, 
     619            textString="2"), 
     620          Text( 
     621            extent={{-34,-6},{6,-36}}, 
     622            lineColor={0,0,0}, 
     623            textString="+2D"), 
     624          Text( 
     625            extent={{2,8},{30,-20}}, 
     626            lineColor={0,0,0}, 
     627            textString="s"), 
     628          Line(points={{8,-20},{24,-20}}, color={0,0,0}), 
     629          Text( 
     630            extent={{10,-26},{26,-48}}, 
     631            lineColor={0,0,0}, 
     632            textString="w"), 
     633          Line(points={{12,2},{6,-8},{6,-28},{10,-46}}, color={0,0,0}), 
     634          Line(points={{22,2},{28,-10},{28,-30},{24,-46}}, color={0,0,0}), 
     635          Text( 
     636            extent={{30,2},{58,-42}}, 
     637            lineColor={0,0,0}, 
    638638            textString="+1")})); 
    639639  initial equation  
     
    742742          extent={{-100,-100},{100,100}}, 
    743743          grid={2,2}), graphics={ 
    744           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    745           Text( 
    746             extent={{-68,24},{-24,-18}},  
    747             lineColor={0,0,0},  
    748             textString="k"),  
    749           Text( 
    750             extent={{-32,48},{60,0}},  
    751             lineColor={0,0,0},  
    752             textString="T s + 1"),  
    753           Text( 
    754             extent={{-30,-8},{52,-40}},  
    755             lineColor={0,0,0},  
    756             textString="T s"),  
    757           Line(points={{-24,0},{54,0}}, color={0,0,0}),  
    758           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
     744          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     745          Text( 
     746            extent={{-68,24},{-24,-18}}, 
     747            lineColor={0,0,0}, 
     748            textString="k"), 
     749          Text( 
     750            extent={{-32,48},{60,0}}, 
     751            lineColor={0,0,0}, 
     752            textString="T s + 1"), 
     753          Text( 
     754            extent={{-30,-8},{52,-40}}, 
     755            lineColor={0,0,0}, 
     756            textString="T s"), 
     757          Line(points={{-24,0},{54,0}}, color={0,0,0}), 
     758          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
    759759          Line(points={{62,0},{100,0}}, color={0,0,255})})); 
    760760  initial equation  
     
    13511351    parameter Real d = bb[1]/a[1]; 
    13521352    parameter Real a_end = if a[end] > 100*Modelica.Constants.eps*Modelica.Math.Vectors.norm(a) then a[end] else 1.0; 
     1353    Real x_scaled[size(x,1)] "Scaled vector x"; 
    13531354    annotation ( 
    13541355      Window( 
     
    14181419  initial equation  
    14191420    if initType == Init.SteadyState then 
    1420       der(x) = zeros(nx); 
     1421      der(x_scaled) = zeros(nx); 
    14211422    elseif initType == Init.InitialState then 
    1422       x = x_start; 
     1423      x_scaled = x_start*a_end; 
    14231424    elseif initType == Init.InitialOutput then 
    14241425      y = y_start; 
    1425       der(x[2:nx]) = zeros(nx-1); 
     1426      der(x_scaled[2:nx]) = zeros(nx-1); 
    14261427    end if; 
    14271428  equation  
     
    14301431       y = d*u; 
    14311432    else 
    1432        der(x[1])    = (-a[2:na]*x + a_end*u)/a[1]; 
    1433        der(x[2:nx]) = x[1:nx-1]; 
    1434        y = ((bb[2:na] - d*a[2:na])*x)/a_end + d*u; 
     1433       der(x_scaled[1])    = (-a[2:na]*x_scaled + a_end*u)/a[1]; 
     1434       der(x_scaled[2:nx]) = x_scaled[1:nx-1]; 
     1435       y = ((bb[2:na] - d*a[2:na])*x_scaled)/a_end + d*u; 
     1436       x = x_scaled/a_end; 
    14351437    end if; 
    14361438  end TransferFunction; 
     
    15281530          extent={{-100,-100},{100,100}}, 
    15291531          grid={2,2}), graphics={ 
    1530           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    1531           Text( 
    1532             extent={{-60,40},{60,0}},  
    1533             lineColor={0,0,0},  
    1534             textString="sx=Ax+Bu"),  
    1535           Text( 
    1536             extent={{-60,0},{60,-40}},  
    1537             lineColor={0,0,0},  
    1538             textString=" y=Cx+Du"),  
    1539           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
     1532          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     1533          Text( 
     1534            extent={{-60,40},{60,0}}, 
     1535            lineColor={0,0,0}, 
     1536            textString="sx=Ax+Bu"), 
     1537          Text( 
     1538            extent={{-60,0},{60,-40}}, 
     1539            lineColor={0,0,0}, 
     1540            textString=" y=Cx+Du"), 
     1541          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
    15401542          Line(points={{60,0},{100,0}}, color={0,0,255})})); 
    15411543  protected  
     
    16461648      Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 
    16471649              100,100}}), graphics={ 
    1648           Line(points={{40,0},{-40,0}}, color={0,0,0}),  
    1649           Text( 
    1650             extent={{-55,55},{55,5}},  
    1651             lineColor={0,0,0},  
    1652             textString="1"),  
    1653           Text( 
    1654             extent={{-55,-5},{55,-55}},  
    1655             lineColor={0,0,0},  
    1656             textString="a(s)"),  
    1657           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    1658           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
     1650          Line(points={{40,0},{-40,0}}, color={0,0,0}), 
     1651          Text( 
     1652            extent={{-55,55},{55,5}}, 
     1653            lineColor={0,0,0}, 
     1654            textString="1"), 
     1655          Text( 
     1656            extent={{-55,-5},{55,-55}}, 
     1657            lineColor={0,0,0}, 
     1658            textString="a(s)"), 
     1659          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     1660          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
    16591661          Line(points={{60,0},{100,0}}, color={0,0,255})}), 
    16601662      Documentation(info="<html> 
     
    18021804      Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 
    18031805              100,100}}), graphics={ 
    1804           Line(points={{40,0},{-40,0}}, color={0,0,0}),  
    1805           Text( 
    1806             extent={{-55,55},{55,5}},  
    1807             lineColor={0,0,0},  
    1808             textString="1"),  
    1809           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    1810           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
    1811           Line(points={{60,0},{100,0}}, color={0,0,255}),  
    1812           Text( 
    1813             extent={{-54,-6},{44,-56}},  
    1814             lineColor={0,0,0},  
    1815             textString="(T s + 1)"),  
    1816           Text( 
    1817             extent={{38,-10},{58,-30}},  
    1818             lineColor={0,0,0},  
     1806          Line(points={{40,0},{-40,0}}, color={0,0,0}), 
     1807          Text( 
     1808            extent={{-55,55},{55,5}}, 
     1809            lineColor={0,0,0}, 
     1810            textString="1"), 
     1811          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     1812          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
     1813          Line(points={{60,0},{100,0}}, color={0,0,255}), 
     1814          Text( 
     1815            extent={{-54,-6},{44,-56}}, 
     1816            lineColor={0,0,0}, 
     1817            textString="(T s + 1)"), 
     1818          Text( 
     1819            extent={{38,-10},{58,-30}}, 
     1820            lineColor={0,0,0}, 
    18191821            textString="n")}), 
    18201822      Documentation(info="<html> 
  • trunk/Modelica/Mechanics/MultiBody/Sensors.mo

    r761 r804  
    789789                               annotation (Placement(transformation(extent={{84, 
    790790              -16},{116,16}}, rotation=0))); 
    791     Blocks.Interfaces.RealOutput r_rel[3]  
    792       "Relative position vector frame_b.r_0 - frame_a.r_0 resolved in frame_a or frame_b" 
    793       annotation (Placement(transformation( 
    794           origin={-80,-110}, 
    795           extent={{10,-10},{-10,10}}, 
    796           rotation=90))); 
     791     
     792    Interfaces.Frame_resolve frame_resolve  
     793      "If resolveInFrame = ResolveInFrame2.frame_resolve, the output signals are resolved in this frame" 
     794                                                                                                         annotation (Placement(transformation( 
     795            extent={{84,64},{116,96}}), iconTransformation(extent={{84,64},{116, 
     796              96}}))); 
    797797     
    798798    parameter Boolean animation=true  
    799799      "= true, if animation shall be enabled (show arrow)"; 
    800     parameter Boolean resolveInFrame_a=true  
    801       "= true, if relative vectors from frame_a to frame_b are resolved before differentiation in frame_a, otherwise in frame_b"; 
     800    parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrame2 resolveInFrame 
     801      = 
     802      Modelica.Mechanics.MultiBody.Types.ResolveInFrame2.frame_a  
     803      "Frame in which relative vectors from frame_a to frame_b are resolved before differentiation"; 
     804    parameter Boolean get_r_rel=false  
     805      "= true, to measure the relative position vector from the origin of frame_a to frame_b"; 
     806    parameter Boolean get_v_rel=false  
     807      "= true, to measure the relative velocity of the origin of frame_b with respect to frame_a"; 
     808    parameter Boolean get_a_rel=false  
     809      "= true, to measure the relative acceleration of the origin of frame_b with respect to frame_a"; 
     810    parameter Boolean get_angles=false  
     811      "= true, to measure the 3 rotation angles to rotate frame_a into frame_b along the axes defined in 'sequence' below"; 
     812    parameter Boolean get_w_rel=false  
     813      "= true, to measure the relative angular velocity of frame_b with respect to frame_a"; 
     814    parameter Boolean get_z_rel=false  
     815      "= true, to measure the relative angular acceleration of frame_b with respect to frame_a"; 
     816    parameter Types.RotationSequence sequence( 
     817      min={1,1,1}, 
     818      max={3,3,3}) = {1,2,3}  
     819      "Angles are returned to rotate frame_a around axes sequence[1], sequence[2] and finally sequence[3] into frame_b" 
     820      annotation (Evaluate=true, Dialog(group="if get_angles = true", enable=get_angles)); 
     821    parameter SI.Angle guessAngle1=0  
     822      "Select angles[1] such that abs(angles[1] - guessAngle1) is a minimum"  
     823      annotation (Dialog(group="if get_angles = true", enable=get_angles)); 
     824     
    802825    input SI.Diameter arrowDiameter=world.defaultArrowDiameter  
    803826      " Diameter of relative arrow from frame_a to frame_b"  
     
    810833      annotation (Dialog(tab="Animation", group="if animation = true", enable=animation)); 
    811834     
     835    Blocks.Interfaces.RealOutput r_rel[3] if get_r_rel  
     836      "Relative position vector frame_b.r_0 - frame_a.r_0 resolved in frame_a or frame_b" 
     837      annotation (Placement(transformation( 
     838          origin={-100,-110}, 
     839          extent={{10,-10},{-10,10}}, 
     840          rotation=90))); 
     841    Blocks.Interfaces.RealOutput v_rel[3] if get_v_rel  
     842      "Relative velocity vector (= der(r_rel))"  
     843      annotation (Placement(transformation( 
     844          origin={-60,-110}, 
     845          extent={{10,-10},{-10,10}}, 
     846          rotation=90))); 
     847    Blocks.Interfaces.RealOutput a_rel[3] if get_a_rel  
     848      "Relative acceleration vector (= der(v_rel))"  
     849      annotation (Placement(transformation( 
     850          origin={-20,-110}, 
     851          extent={{10,-10},{-10,10}}, 
     852          rotation=90))); 
     853    Blocks.Interfaces.RealOutput angles[3] if get_angles  
     854      "Angles to rotate frame_a into frame_b via 'sequence'"  
     855      annotation (Placement(transformation( 
     856          origin={20,-110}, 
     857          extent={{10,-10},{-10,10}}, 
     858          rotation=90))); 
     859    Blocks.Interfaces.RealOutput w_rel[3] if get_w_rel  
     860      "Relative angular velocity vector"  
     861      annotation (Placement(transformation( 
     862          origin={60,-110}, 
     863          extent={{10,-10},{-10,10}}, 
     864          rotation=90))); 
     865    Blocks.Interfaces.RealOutput z_rel[3] if get_z_rel  
     866      "Relative angular acceleration vector (= der(w_rel))"  
     867      annotation (Placement(transformation( 
     868          origin={100,-110}, 
     869          extent={{10,-10},{-10,10}}, 
     870          rotation=90))); 
     871     
     872    annotation (Diagram(coordinateSystem(preserveAspectRatio=true,  extent={{-100, 
     873              -100},{100,100}}, 
     874          grid={1,1}),  graphics), 
     875                         Icon(coordinateSystem(preserveAspectRatio=true, 
     876            extent={{-100,-100},{100,100}}, 
     877          grid={1,1}), graphics={ 
     878          Line( 
     879            points={{-70,0},{-95,0}},  
     880            color={0,0,0},  
     881            smooth=Smooth.None),  
     882          Line( 
     883            points={{96,0},{70,0}},  
     884            color={0,0,0},  
     885            smooth=Smooth.None),  
     886          Text( 
     887            extent={{-127,-77},{-92,-93}},  
     888            lineColor={0,0,0},  
     889            textString="r"),  
     890          Text( 
     891            extent={{-112,44},{-76,19}},  
     892            lineColor={128,128,128},  
     893            textString="a"),  
     894          Text( 
     895            extent={{72,44},{108,19}},  
     896            lineColor={128,128,128},  
     897            textString="b"),  
     898          Text( 
     899            extent={{-132,90},{129,138}},  
     900            textString="%name",  
     901            lineColor={0,0,255}),  
     902          Line( 
     903            points={{-60,-36},{-60,-100}},  
     904            color={0,0,127},  
     905            smooth=Smooth.None),  
     906          Line( 
     907            points={{20,-67},{20,-100}},  
     908            color={0,0,127},  
     909            smooth=Smooth.None),  
     910          Text( 
     911            extent={{-90,-77},{-55,-93}},  
     912            lineColor={0,0,0},  
     913            textString="v"),  
     914          Text( 
     915            extent={{-58,-77},{-23,-93}},  
     916            lineColor={0,0,0},  
     917            textString="a"),  
     918          Line( 
     919            points={{-84,0},{-84,-60},{-100,-60},{-100,-100}},  
     920            color={0,0,127},  
     921            smooth=Smooth.None),  
     922          Line( 
     923            points={{-20,-67},{-20,-100}},  
     924            color={0,0,127},  
     925            smooth=Smooth.None),  
     926          Line( 
     927            points={{60,-36},{60,-100}},  
     928            color={0,0,127},  
     929            smooth=Smooth.None),  
     930          Line( 
     931            points={{86,0},{86,-60},{100,-60},{100,-100}},  
     932            color={0,0,127},  
     933            smooth=Smooth.None),  
     934          Text( 
     935            extent={{96,-76},{136,-93}},  
     936            lineColor={0,0,0},  
     937            textString="z"),  
     938          Text( 
     939            extent={{55,-76},{100,-92}},  
     940            lineColor={0,0,0},  
     941            textString="w"),  
     942          Line( 
     943            points={{95,80},{50,80},{50,49}},  
     944            color={0,0,0},  
     945            pattern=LinePattern.Dot,  
     946            smooth=Smooth.None)})); 
     947     
    812948  protected  
     949    Internal.RelativePosition relativePosition if get_r_rel or get_v_rel or get_a_rel  
     950      annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); 
     951    Blocks.Continuous.Der der1[3] if get_v_rel or get_a_rel annotation (Placement(transformation( 
     952          extent={{-10,-10},{10,10}}, 
     953          rotation=-90, 
     954          origin={-60,-40}))); 
     955    Blocks.Continuous.Der der2[3] if get_a_rel annotation (Placement(transformation( 
     956          extent={{-10,-10},{10,10}}, 
     957          rotation=-90, 
     958          origin={-20,-80}))); 
     959    Internal.RelativeAngles relativeAngles if get_angles  
     960      annotation (Placement(transformation(extent={{10,-25},{30,-5}}))); 
     961    Internal.RelativeAngularVelocity relativeAngularVelocity if get_w_rel or get_z_rel  
     962      annotation (Placement(transformation(extent={{50,-47},{70,-27}}))); 
     963    Blocks.Continuous.Der der3[3] if get_z_rel annotation (Placement(transformation( 
     964          extent={{-10,-10},{10,10}}, 
     965          rotation=-90, 
     966          origin={100,-70}))); 
     967    Internal.ZeroForceAndTorque zeroForce1  
     968      annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); 
     969    Internal.ZeroForceAndTorque zeroForce2  
     970      annotation (Placement(transformation(extent={{80,20},{60,40}}))); 
     971    Internal.ZeroPosition zeroPosition if not (resolveInFrame == 
     972      Modelica.Mechanics.MultiBody.Types.ResolveInFrame2.frame_resolve)  
     973      annotation (Placement(transformation(extent={{-30,3},{-10,23}}))); 
     974     
    813975    outer Modelica.Mechanics.MultiBody.World world; 
    814976     
     
    819981      color=arrowColor, 
    820982      specularCoefficient) if world.enableAnimation and animation; 
    821      
    822     encapsulated model RelativePosition "Determine relative position"  
    823       import Modelica; 
    824       import Modelica.Mechanics.MultiBody.Frames; 
    825       extends Modelica.Blocks.Interfaces.BlockIcon; 
    826        
    827       Modelica.Mechanics.MultiBody.Interfaces.Frame_a frame_a  
    828         "Coordinate system a"                                                       annotation (Placement( 
    829             transformation(extent={{-116,-16},{-84,16}}, rotation=0))); 
    830       Modelica.Mechanics.MultiBody.Interfaces.Frame_b frame_b  
    831         "Coordinate system b"                                                       annotation (Placement( 
    832             transformation(extent={{84,-16},{116,16}}, rotation=0))); 
    833       Modelica.Blocks.Interfaces.RealOutput r_rel[3]  
    834         "Relative position vector, frame_b.r_0 - frame_a.r_0, resolved in frame_a or frame_b depending on parameter resolveInFrame_a)" 
    835         annotation (Placement(transformation( 
    836             origin={0,-110}, 
    837             extent={{-10,-10},{10,10}}, 
    838             rotation=270))); 
    839       parameter Boolean resolveInFrame_a=true  
    840         "= true, if relative vectors from frame_a to frame_b are resolved before differentiation in frame_a, otherwise in frame_b"; 
    841        
    842     equation  
    843        frame_a.f = zeros(3); 
    844        frame_a.t = zeros(3); 
    845        frame_b.f = zeros(3); 
    846        frame_b.t = zeros(3); 
    847        if resolveInFrame_a then 
    848           r_rel = Frames.resolve2(frame_a.R, frame_b.r_0 - frame_a.r_0); 
    849        else 
    850           r_rel = Frames.resolve2(frame_b.R, frame_b.r_0 - frame_a.r_0); 
    851        end if; 
    852        
    853       annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ 
    854                 -100,-100},{100,100}}), graphics={Text( 
    855               extent={{-78,-60},{78,-82}},  
    856               lineColor={0,0,0},  
    857               textString="r_rel")})); 
    858     end RelativePosition; 
    859      
    860   protected  
    861     RelativePosition relativePosition annotation (Placement(transformation( 
    862             extent={{-70,-10},{-50,10}}, rotation=0))); 
    863     annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{ 
    864               -100,-100},{100,100}}), 
    865                         graphics), 
    866                          Icon(coordinateSystem(preserveAspectRatio=true, 
    867             extent={{-100,-100},{100,100}}), graphics={ 
    868           Line( 
    869             points={{-70,0},{-96,0}},  
    870             color={0,0,0},  
    871             smooth=Smooth.None),  
    872           Line( 
    873             points={{96,0},{70,0}},  
    874             color={0,0,0},  
    875             smooth=Smooth.None),  
    876           Line( 
    877             points={{-80,0},{-80,-100}},  
    878             color={0,0,127},  
    879             smooth=Smooth.None),  
    880           Text( 
    881 &nbs