![]() |
vitasdk
Documentation of the vitasdk
|
Exports for User. More...
Data Structures | |
| struct | SceMotionState |
| Returned motion state. More... | |
| struct | SceMotionSensorState |
| Returned motion sensor state. More... | |
| struct | SceMotionDeviceLocation |
| Returned location of both the accelerometer and gyroscope in mm. More... | |
Enumerations | |
| enum | SceMotionMagFieldStability { SCE_MOTION_MAGFIELD_UNSTABLE = 0 , SCE_MOTION_MAGFIELD_UNUSED = 1 , SCE_MOTION_MAGFIELD_STABLE = 2 } |
| enum | SceMotionErrorCode { SCE_MOTION_ERROR_DATA_INVALID = 0x80360200 , SCE_MOTION_ERROR_READING = 0x80360201 , SCE_MOTION_ERROR_NON_INIT_ERR = 0x80360202 , SCE_MOTION_ERROR_STATE_INVALID = 0x80360203 , SCE_MOTION_ERROR_CALIB_READ_FAIL = 0x80360204 , SCE_MOTION_ERROR_OUT_OF_BOUNDS = 0x80360205 , SCE_MOTION_ERROR_NOT_SAMPLING = 0x80360206 , SCE_MOTION_ERROR_ALREADY_SAMPLING = 0x80360207 , SCE_MOTION_ERROR_MEM_IN_USE = 0x80360208 } |
Functions | |
| VITASDK_BUILD_ASSERT_EQ (0xF8, SceMotionState) | |
| VITASDK_BUILD_ASSERT_EQ (0x40, SceMotionSensorState) | |
| VITASDK_BUILD_ASSERT_EQ (0x30, SceMotionDeviceLocation) | |
| int | sceMotionGetState (SceMotionState *motionState) |
| Gets the current motion state. | |
| int | sceMotionGetSensorState (SceMotionSensorState *sensorState, int numRecords) |
| Gets the current motion sensor state. | |
| int | sceMotionGetDeviceLocation (SceMotionDeviceLocation *deviceLocation) |
| Gets the location of the device's sensors in relation to its center point (in mm). | |
| int | sceMotionGetBasicOrientation (SceFVector3 *basicOrientation) |
| Gets the basic orientation of the device in relation to gravity. | |
| int | sceMotionRotateYaw (float radians) |
| Rotate the yaw axis. | |
| int | sceMotionGetTiltCorrection (void) |
| Get Status of tilt correction. | |
| int | sceMotionSetTiltCorrection (int setValue) |
| Activate/deactivate tilt correction. | |
| int | sceMotionGetDeadband (void) |
| Get status of deadbanding. | |
| int | sceMotionSetDeadband (int setValue) |
| Activate/deactivate deadbanding. | |
| int | sceMotionGetGyroBiasCorrection (void) |
| Get status of gyroscope bias correction. | |
| int | sceMotionSetGyroBiasCorrection (int setValue) |
| Activate/deactivate gyroscope bias correction. | |
| int | sceMotionSetAngleThreshold (float angle) |
| Define the angle threshold for basic orientation. | |
| float | sceMotionGetAngleThreshold (void) |
| Get the angle threshold for basic orientation. | |
| int | sceMotionReset (void) |
| Set current orientation as origin. | |
| int | sceMotionMagnetometerOn (void) |
| Start magnetometer sampling. | |
| int | sceMotionMagnetometerOff (void) |
| Stop magnetometer sampling. | |
| int | sceMotionGetMagnetometerState (void) |
| Get status of magnetometer sampling. | |
| int | sceMotionStartSampling (void) |
| Start sampling. | |
| int | sceMotionStopSampling (void) |
| Stop sampling. | |
Variables | |
| unsigned int | SceMotionState::timestamp |
| Local timestamp of the device. | |
| SceFVector3 | SceMotionState::acceleration |
| Accelerometer data. | |
| SceFVector3 | SceMotionState::angularVelocity |
| Angular velocity data. | |
| uint8_t | SceMotionState::reserved1 [12] |
| Reserved data. | |
| SceFQuaternion | SceMotionState::deviceQuat |
| Orientation data as a Quaternion. | |
| SceFMatrix4 | SceMotionState::rotationMatrix |
| Orientation data as a rotation matrix. | |
| SceFMatrix4 | SceMotionState::nedMatrix |
| Magnetometer orientation matrix. | |
| uint8_t | SceMotionState::reserved2 [4] |
| Reserved data. | |
| SceFVector3 | SceMotionState::basicOrientation |
| Orientation of the device in reference to gravity. | |
| SceULong64 | SceMotionState::hostTimestamp |
| Timestamp of the data in microseconds. | |
| uint8_t | SceMotionState::reserved3 [36] |
| Reserved data. | |
| uint8_t | SceMotionState::magFieldStability |
| One of SceMotionMagFieldStability. | |
| uint8_t | SceMotionState::unknown |
| Unknown. | |
| uint8_t | SceMotionState::reserved4 [2] |
| Reserved data. | |
| SceFVector3 | SceMotionSensorState::accelerometer |
| Accelerometer data. | |
| SceFVector3 | SceMotionSensorState::gyro |
| Angular velocity data. | |
| uint8_t | SceMotionSensorState::reserved1 [12] |
| Reserved data. | |
| unsigned int | SceMotionSensorState::timestamp |
| Timestamp of the data in microseconds. | |
| unsigned int | SceMotionSensorState::counter |
| Number of requested state. | |
| uint8_t | SceMotionSensorState::reserved2 [4] |
| Reserved data. | |
| SceULong64 | SceMotionSensorState::hostTimestamp |
| Timestamp of the data in microseconds. | |
| uint8_t | SceMotionSensorState::unknown |
| Unknown. | |
| uint8_t | SceMotionSensorState::reserved3 [7] |
| Reserved data. | |
| SceFVector3 | SceMotionDeviceLocation::accelerometer |
| Location of te accelerometer in relation to the center of the device (in mm) | |
| SceFVector3 | SceMotionDeviceLocation::gyro |
| Location of te gyroscope in relation to the center of the device (in mm) | |
| uint8_t | SceMotionDeviceLocation::reserved [24] |
| Reserved data. | |
Exports for User.
Include the header file in your project:
Link the library to the executable:
| struct SceMotionState |
Returned motion state.
| Data Fields | ||
|---|---|---|
| unsigned int | timestamp | Local timestamp of the device. |
| SceFVector3 | acceleration | Accelerometer data. |
| SceFVector3 | angularVelocity | Angular velocity data. |
| uint8_t | reserved1[12] | Reserved data. |
| SceFQuaternion | deviceQuat | Orientation data as a Quaternion. |
| SceFMatrix4 | rotationMatrix | Orientation data as a rotation matrix. |
| SceFMatrix4 | nedMatrix | Magnetometer orientation matrix. |
| uint8_t | reserved2[4] | Reserved data. |
| SceFVector3 | basicOrientation | Orientation of the device in reference to gravity. |
| SceULong64 | hostTimestamp | Timestamp of the data in microseconds. |
| uint8_t | reserved3[36] | Reserved data. |
| uint8_t | magFieldStability | One of SceMotionMagFieldStability. |
| uint8_t | unknown | Unknown. |
| uint8_t | reserved4[2] | Reserved data. |
| struct SceMotionSensorState |
Returned motion sensor state.
| Data Fields | ||
|---|---|---|
| SceFVector3 | accelerometer | Accelerometer data. |
| SceFVector3 | gyro | Angular velocity data. |
| uint8_t | reserved1[12] | Reserved data. |
| unsigned int | timestamp | Timestamp of the data in microseconds. |
| unsigned int | counter | Number of requested state. |
| uint8_t | reserved2[4] | Reserved data. |
| SceULong64 | hostTimestamp | Timestamp of the data in microseconds. |
| uint8_t | unknown | Unknown. |
| uint8_t | reserved3[7] | Reserved data. |
| struct SceMotionDeviceLocation |
Returned location of both the accelerometer and gyroscope in mm.
| Data Fields | ||
|---|---|---|
| SceFVector3 | accelerometer | Location of te accelerometer in relation to the center of the device (in mm) |
| SceFVector3 | gyro | Location of te gyroscope in relation to the center of the device (in mm) |
| uint8_t | reserved[24] | Reserved data. |
| enum SceMotionErrorCode |
| VITASDK_BUILD_ASSERT_EQ | ( | 0xF8 | , |
| SceMotionState | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x40 | , |
| SceMotionSensorState | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x30 | , |
| SceMotionDeviceLocation | |||
| ) |
| int sceMotionGetState | ( | SceMotionState * | motionState | ) |
Gets the current motion state.
| [out] | *motionState | - See SceMotionState |
| int sceMotionGetSensorState | ( | SceMotionSensorState * | sensorState, |
| int | numRecords | ||
| ) |
Gets the current motion sensor state.
| [in] | numRecords | - Amount of records to get |
| [out] | *motionSensorState | - See SceMotionSensorState |
| int sceMotionGetDeviceLocation | ( | SceMotionDeviceLocation * | deviceLocation | ) |
Gets the location of the device's sensors in relation to its center point (in mm).
| [out] | *deviceLocation | - See SceMotionDeviceLocation |
| int sceMotionGetBasicOrientation | ( | SceFVector3 * | basicOrientation | ) |
Gets the basic orientation of the device in relation to gravity.
| [out] | *basicOrientation |
| int sceMotionRotateYaw | ( | float | radians | ) |
Rotate the yaw axis.
| [in] | radians | - Rotation angle in radians |
| int sceMotionGetTiltCorrection | ( | void | ) |
Get Status of tilt correction.
| int sceMotionSetTiltCorrection | ( | int | setValue | ) |
Activate/deactivate tilt correction.
| [in] | setValue | - 1 to enable, 0 to disable |
| int sceMotionGetDeadband | ( | void | ) |
Get status of deadbanding.
| int sceMotionSetDeadband | ( | int | setValue | ) |
Activate/deactivate deadbanding.
| [in] | setValue | - 1 to enable, 0 to disable |
| int sceMotionGetGyroBiasCorrection | ( | void | ) |
Get status of gyroscope bias correction.
| int sceMotionSetGyroBiasCorrection | ( | int | setValue | ) |
Activate/deactivate gyroscope bias correction.
| [in] | setValue | - 1 to enable, 0 to disable |
| int sceMotionSetAngleThreshold | ( | float | angle | ) |
Define the angle threshold for basic orientation.
| [in] | angle | - range of 0 to 45 degrees |
| float sceMotionGetAngleThreshold | ( | void | ) |
Get the angle threshold for basic orientation.
| int sceMotionReset | ( | void | ) |
Set current orientation as origin.
| int sceMotionMagnetometerOn | ( | void | ) |
Start magnetometer sampling.
| int sceMotionMagnetometerOff | ( | void | ) |
Stop magnetometer sampling.
| int sceMotionGetMagnetometerState | ( | void | ) |
Get status of magnetometer sampling.
| int sceMotionStartSampling | ( | void | ) |
Start sampling.
| int sceMotionStopSampling | ( | void | ) |
Stop sampling.
| unsigned int SceMotionState::timestamp |
Local timestamp of the device.
| SceFVector3 SceMotionState::acceleration |
Accelerometer data.
| SceFVector3 SceMotionState::angularVelocity |
Angular velocity data.
| uint8_t SceMotionState::reserved1[12] |
Reserved data.
| SceFQuaternion SceMotionState::deviceQuat |
Orientation data as a Quaternion.
| SceFMatrix4 SceMotionState::rotationMatrix |
Orientation data as a rotation matrix.
| SceFMatrix4 SceMotionState::nedMatrix |
Magnetometer orientation matrix.
| uint8_t SceMotionState::reserved2[4] |
Reserved data.
| SceFVector3 SceMotionState::basicOrientation |
Orientation of the device in reference to gravity.
| SceULong64 SceMotionState::hostTimestamp |
Timestamp of the data in microseconds.
| uint8_t SceMotionState::reserved3[36] |
Reserved data.
| uint8_t SceMotionState::magFieldStability |
One of SceMotionMagFieldStability.
| uint8_t SceMotionState::unknown |
Unknown.
| uint8_t SceMotionState::reserved4[2] |
Reserved data.
| SceFVector3 SceMotionSensorState::accelerometer |
Accelerometer data.
| SceFVector3 SceMotionSensorState::gyro |
Angular velocity data.
| uint8_t SceMotionSensorState::reserved1[12] |
Reserved data.
| unsigned int SceMotionSensorState::timestamp |
Timestamp of the data in microseconds.
| unsigned int SceMotionSensorState::counter |
Number of requested state.
| uint8_t SceMotionSensorState::reserved2[4] |
Reserved data.
| SceULong64 SceMotionSensorState::hostTimestamp |
Timestamp of the data in microseconds.
| uint8_t SceMotionSensorState::unknown |
Unknown.
| uint8_t SceMotionSensorState::reserved3[7] |
Reserved data.
| SceFVector3 SceMotionDeviceLocation::accelerometer |
Location of te accelerometer in relation to the center of the device (in mm)
| SceFVector3 SceMotionDeviceLocation::gyro |
Location of te gyroscope in relation to the center of the device (in mm)
| uint8_t SceMotionDeviceLocation::reserved[24] |
Reserved data.