How do I access sensor fusion data in 0.4.3?
I can't figure out how to use sensor fusion in the new SDK. ( GetOrientation(quaternion orientation) and GetPredictedOrientation(quaternion orientation) in 0.25 and GetCameraPositionOrientation(vector3 position, quaternion orientation) in 0.3.2 and 0.4.2)
Does anybody know the 0.4.3 equivalent to this?
edit: I think I found it in the Developer guide
and
should do the trick for orientation, here's a bit on how it works on the next page
Does anybody know the 0.4.3 equivalent to this?
edit: I think I found it in the Developer guide
ovrHmd_ConfigureTracking ( hmd, ovrTrackingCap_Orientation | ovrTrackingCap_MagYawCorrection |
ovrTrackingCap_Position, 0);
ovrTrackingState ts = ovrHmd_GetTrackingState(hmd, ovr_GetTimeInSeconds());
and
Posef pose = trackingState.HeadPose.ThePose;
float yaw, float eyePitch, float eyeRoll;
pose.Orientation.GetEulerAngles <Axis_Y, Axis_X, Axis_Z> (&yaw, &eyePitch, &eyeRoll);
should do the trick for orientation, here's a bit on how it works on the next page
This can be modified using the API call ovrHmd_RecenterPose which resets the tracking origin to the headset’s current location, and sets the yaw origin to the current headset yaw value. Note that the tracking origin is set on a per application basis and so switching focus between different VR apps will switch the tracking origin also. Determining the head pose is done by calling ovrHmd_GetTrackingState. The returned struct ovrTrackingState contains several items relevant to position tracking. HeadPose includes both head position and orientation. CameraPose is the pose of the camera relative to the tracking origin. LeveledCameraPose is the pose of the camera relative to the tracking origin but with roll and pitch zeroed out. This can be used as a reference point to render real-world objects in the correct place.
The StatusFlags variable contains three status bits relating to position tracking. ovrStatus_PositionConnected is set when the position tracking camera is connected and functioning properly. The ovrStatus_PositionTracked flag is set only when the headset is being actively tracked. ovrStatus_CameraPoseTracked is set after the initial camera calibration has
