Changeset 478

Show
Ignore:
Timestamp:
01/26/07 14:42:42 (23 months ago)
Author:
HansOlsson
Message:

Use a better residual for large residuals

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Modelica/branches/maintenance/2.2.1/Modelica/Mechanics/MultiBody/Frames.mo

    r463 r478  
    198198        "The rotation angles around x-, y-, and z-axis of frame 1 to rotate frame 1 into frame 2 for a small rotation (should be zero)"; 
    199199    algorithm  
    200       residue := {cross(R1.T[1, :], R1.T[2, :])*R2.T[2, :],-cross(R1.T[1, :], 
    201         R1.T[2, :])*R2.T[1, :],R1.T[2, :]*R2.T[1, :]}; 
     200      residue := { 
     201         Modelica.Math.atan2(cross(R1.T[1, :], R1.T[2, :])*R2.T[2, :],R1.T[1,:]*R2.T[1,:]), 
     202         Modelica.Math.atan2(-cross(R1.T[1, :],R1.T[2, :])*R2.T[1, :],R1.T[2,:]*R2.T[2,:]), 
     203         Modelica.Math.atan2(R1.T[2, :]*R2.T[1, :],R1.T[3,:]*R2.T[3,:])}; 
    202204    end equalityConstraint; 
    203205