link Derived Type

type, public, abstract, extends(rigid_body) :: link

Defines the base class for a link within a mechanism. A link is a rigid body that carries one coordinate frame for each joint that may attach to it.


Contents


Components

Type Visibility Attributes Name Initial
real(kind=real64), public :: cg(3)

The x-y-z location of the CG relative to the body coordinate frame.

real(kind=real64), public :: inertia(3,3)

The 3-by-3 inertia tensor as measured about the CG of the body.

real(kind=real64), public :: mass

The mass of the body.


Type-Bound Procedures

procedure(link_joint_count), public, deferred :: get_joint_count

  • pure function link_joint_count(this) result(rst) Prototype

    Gets the number of joint coordinate frames carried by the link.

    Arguments

    Type IntentOptional Attributes Name
    class(link), intent(in) :: this

    The link object.

    Return Value integer(kind=int32)

    The number of joint coordinate frames.

procedure(link_joint_frame), public, deferred :: get_joint_frame

  • pure function link_joint_frame(this, i) result(rst) Prototype

    Gets the transformation matrix relating the requested joint coordinate frame to the link's body coordinate frame. The matrix maps coordinates from the joint frame into the body frame.

    Arguments

    Type IntentOptional Attributes Name
    class(link), intent(in) :: this

    The link object.

    integer(kind=int32), intent(in) :: i

    The index of the joint coordinate frame (1 = first frame).

    Return Value real(kind=real64), (4,4)

    The resulting 4-by-4 transformation matrix.