vitasdk
Documentation of the vitasdk
|
Exports for User.
Include the header file in your project:
Link the library to the executable:
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. More... | |
int | sceMotionGetSensorState (SceMotionSensorState *sensorState, int numRecords) |
Gets the current motion sensor state. More... | |
int | sceMotionGetDeviceLocation (SceMotionDeviceLocation *deviceLocation) |
Gets the location of the device's sensors in relation to its center point (in mm). More... | |
int | sceMotionGetBasicOrientation (SceFVector3 *basicOrientation) |
Gets the basic orientation of the device in relation to gravity. More... | |
int | sceMotionRotateYaw (float radians) |
Rotate the yaw axis. More... | |
int | sceMotionGetTiltCorrection (void) |
Get Status of tilt correction. More... | |
int | sceMotionSetTiltCorrection (int setValue) |
Activate/deactivate tilt correction. More... | |
int | sceMotionGetDeadband (void) |
Get status of deadbanding. More... | |
int | sceMotionSetDeadband (int setValue) |
Activate/deactivate deadbanding. More... | |
int | sceMotionGetGyroBiasCorrection (void) |
Get status of gyroscope bias correction. More... | |
int | sceMotionSetGyroBiasCorrection (int setValue) |
Activate/deactivate gyroscope bias correction. More... | |
int | sceMotionSetAngleThreshold (float angle) |
Define the angle threshold for basic orientation. More... | |
float | sceMotionGetAngleThreshold (void) |
Get the angle threshold for basic orientation. More... | |
int | sceMotionReset (void) |
Set current orientation as origin. More... | |
int | sceMotionMagnetometerOn (void) |
Start magnetometer sampling. More... | |
int | sceMotionMagnetometerOff (void) |
Stop magnetometer sampling. More... | |
int | sceMotionGetMagnetometerState (void) |
Get status of magnetometer sampling. More... | |
int | sceMotionStartSampling (void) |
Start sampling. More... | |
int | sceMotionStopSampling (void) |
Stop sampling. More... | |
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.