ImuStorageFile#

class pyCGM2.Model.Opensim.opensimIO.ImuStorageFile(DATA_PATH, filename, freq)#

Writer of an OpenSim IMU orientation (quaternion) storage file.

Parameters:
  • DATA_PATH (str) – Folder path.

  • filename (str) – Filename.

  • freq (float) – Sampling frequency.

__init__(DATA_PATH, filename, freq)#

Methods

__init__(DATA_PATH, filename, freq)

construct([static])

Write the storage file.

setData(imuName, quaternionArray)

Set the quaternions of an IMU.

construct(static=False)#

Write the storage file.

Parameters:

static (bool, optional) – Write only the first frame. Defaults to False.

setData(imuName, quaternionArray)#

Set the quaternions of an IMU.

Parameters:
  • imuName (str) – IMU name.

  • quaternionArray (np.ndarray) – Quaternions (frames x 4).