Path: SC/Dynamics
% Models two rigid bodies attached by a 1 to 3-dof hinge. -------------------------------------------------------------------------- Form: [wDot, h, iner] = TBModel( w0, w1, q0to1, r0, r1, lam1, iner0, iner1, m0, m1, torque, force, iAxis ) -------------------------------------------------------------------------- ------- Inputs ------- w0 (3,1) The angular velocity of body 0 with respect to the inertial w1 (3,1) The angular velocity of body 1 with respect to body 0 q0to1 (4,1) The quaternion from body 0 to 1 r0 (3,1) The vector from the origin to the body 0 cm in the body 0 frame r1 (3,1) The vector from the origin to the hinge in the body 0 frame lam1 (3,1) The vector from the hinge to the body 1 cm in the body 1 frame iner0 (3,3) The body 0 inertia in the body 0 frame iner1 (3,3) The body 1 inertia in the body 1 frame m0 (1,1) The body 0 mass m1 (1,1) The body 1 mass torque (6,1) [totalExternalTorque(3); hingeTorque] force (6,1) [body0ExternalForce(3); body1ExternalForce(3)] at their cms iAxis (1,:) The axes of the second body that are not constrained. ------- Outputs ------- wDot (6,1) The angular acceleration vector h (3,1) The angular momentum in the body frame iner (6,6) The generalized inertia matrix --------------------------------------------------------------------------
Common: Quaternion/Q2Mat Math: Linear/Cross Math: Linear/SkewSymm
Back to the SC Module page