RelativeAnglesProcedure#

class pyCGM2.IMU.Procedures.relativeImuAngleProcedures.RelativeAnglesProcedure(representation='Euler', eulerSequence='XYZ')#

Procedure to compute angles between two IMUs.

This class calculates the relative orientation between two IMUs using specified angle representation and Euler sequence.

Parameters:
  • representation (str, optional) – Angle representation. Defaults to “Euler”.

  • eulerSequence (str, optional) – Euler sequence to be used for angle calculation. Defaults to “XYZ”.

__init__(representation='Euler', eulerSequence='XYZ')#

Initializes the RelativeAnglesProcedure with the specified angle representation and Euler sequence.

Methods

__init__([representation, eulerSequence])

Initializes the RelativeAnglesProcedure with the specified angle representation and Euler sequence.

compute(imuInstance1, imuInstance2)

Compute the relative angles between two IMU instances.

compute(imuInstance1: Imu, imuInstance2: Imu) ndarray#

Compute the relative angles between two IMU instances.

The method calculates the relative orientation of one IMU with respect to another and converts it into angles based on the specified representation and Euler sequence.

Parameters:
  • imuInstance1 (imu.Imu) – The first IMU instance.

  • imuInstance2 (imu.Imu) – The second IMU instance.

Returns:

np.ndarray – Array of angles representing the relative orientation between the two IMUs for each frame. The array shape is (nFrames, 3), where nFrames is the number of frames.