xvsdk  3.2.0
Public Types | Public Member Functions | List of all members
xv::OrientationStream Class Referenceabstract

The class to give access to 3dof data which converted from raw IMU data. More...

#include <xv-sdk.h>

Public Types

using Data = Orientation const &
 

Public Member Functions

virtual bool get (Orientation &pose, double prediction=0.)=0
 Get the current orientation of the device. More...
 
virtual bool getAt (Orientation &pose, double timestamp)=0
 Get the orientation of the device at a given timestamp. More...
 
virtual bool start ()=0
 start streaming.
 
virtual bool stop ()=0
 stop streaming.
 
virtual int registerCallback (std::function< void(Orientation const &)>)=0
 Register callback to receive data.
 
virtual bool unregisterCallback (int callbackId)=0
 Unregister callback.
 

Detailed Description

The class to give access to 3dof data which converted from raw IMU data.

Member Function Documentation

virtual bool xv::OrientationStream::get ( Orientation pose,
double  prediction = 0. 
)
pure virtual

Get the current orientation of the device.

The orientation (3dof) is the rotation of the IMU frame coordinates based on the world frame coordinates. The world frame coordinates coorespond the IMU coordinates when #startOrientation().

Parameters
[out]resultorientation corresponding to the timestamp "now" + "prediction"
[in]prediction(in s) amount of prediction to use to get the orientation corresponding to the future
Returns
true if ok, false else.
virtual bool xv::OrientationStream::getAt ( Orientation pose,
double  timestamp 
)
pure virtual

Get the orientation of the device at a given timestamp.

The orientation (3dof) is the rotation of the IMU frame coordinates based on the world frame coordinates. The world frame coordinates coorespond the IMU coordinates when #startOrientation().

Parameters
[out]resultorientation corresponding to the timestamp, need to be not too in the pass or too in the future
[in]timestampof the requested orientation, in s based on the host clock std::chrono::steady_clock()
Returns
true if the orientation can be returned, false else. If timestamp is too in the past or too in the future, return false.

The documentation for this class was generated from the following file: