diff --git a/rpcs3/Emu/Cell/Modules/cellGem.h b/rpcs3/Emu/Cell/Modules/cellGem.h index 832e7aac19..6f49d568b4 100644 --- a/rpcs3/Emu/Cell/Modules/cellGem.h +++ b/rpcs3/Emu/Cell/Modules/cellGem.h @@ -159,10 +159,10 @@ struct CellGemPadData struct CellGemInertialState { - be_t accelerometer[4]; - be_t gyro[4]; - be_t accelerometer_bias[4]; - be_t gyro_bias[4]; + be_t accelerometer[4]; // accelerometer readings including accelerometer_bias (G units) + be_t gyro[4]; // gyro readings including gyro_bias (radians/s) + be_t accelerometer_bias[4]; // accelerometer bias (G units) + be_t gyro_bias[4]; // gyro bias (radians/s) CellGemPadData pad; CellGemExtPortData ext; be_t timestamp; @@ -178,17 +178,21 @@ struct CellGemInfo be_t port[CELL_GEM_MAX_NUM]; }; +// origin is the center of the camera +// x increases to right (facing the camera) +// y increases upwards +// z increases towards user (away from the camera) struct CellGemState { - be_t pos[4]; - be_t vel[4]; - be_t accel[4]; - be_t quat[4]; - be_t angvel[4]; - be_t angaccel[4]; - be_t handle_pos[4]; - be_t handle_vel[4]; - be_t handle_accel[4]; + be_t pos[4]; // center of sphere (mm) + be_t vel[4]; // velocity of sphere (mm/s) + be_t accel[4]; // acceleration of sphere (mm/s²) + be_t quat[4]; // quaternion orientation (x,y,z,w) of controller relative to default (facing the camera with buttons up) + be_t angvel[4]; // angular velocity of controller (radians/s) + be_t angaccel[4]; // angular acceleration of controller (radians/s²) + be_t handle_pos[4]; // center of controller handle (mm) + be_t handle_vel[4]; // velocity of controller handle (mm/s) + be_t handle_accel[4]; // acceleration of controller handle (mm/s²) CellGemPadData pad; CellGemExtPortData ext; be_t timestamp;