AZ

 

The AZ function returns the cumulative rotation angle on the z-axis for one marker’s InertiaMarker or the cumulative rotation angle on the z-axis for two markers.

 

Format

 

Arguments definition

Marker1

The name or argument number of a marker to be calculated.

Marker2

The name or argument number of a marker to be calculated.

If omitted, then the InertiaMarker is applied.

 

Formulation

: x-direction unit vector of Marker1

: y-direction unit vector of Marker2

: x-direction unit vector of Marker2

 

 

Here, ThetaZ is utilized to calculate the cumulative rotation angle on the z-axis for two markers.

 

If z-axis for two markers is deviated, ThetaZ becomes inaccurate result.

 

Example

AZ (body1.Marker1)

AZ (body1.Marker1, body2.Marker2)

AZ (1,2)   <Argument: (1)body1.Marker1, (2)body2.Marker2 >

 

Note

The result of ATAN2 as FORTRAN function lies in the range -PI~PI. However, the AX, AY and AZ as expression functions always return an accumulated angle along a rotating direction. The accumulated angle is growing or decaying with the growing time. If the user wants to get a wrapped value by a special angle, use the function expression, ‘MOD’. Please refer to the following example.

 

Figure 1  Example of using the AZ function

 

     If the user wants to get the result lies in range 0 ~ 360 degree.

 

Expression

MOD(AZ(m1,m2),360d) (radian)

MOD(AZ(m1,m2),360d)*RTOD (deg)

 

     If the user wants to get the result lies in range -180 ~ 180 degree.

 

Expression

MOD(AZ(m1,m2),360d)-PI (radian)

(MOD(AZ(m1,m2),360d)-PI)*RTOD (deg)

 

Figure 2  Results of expressions