video3d_frame_get_data video3d_frame_get_meters navigation bar

Table of Contents

video3d_frame_get_motion_data

Get the frame data in the specified motion format.

Description

The video3d_frame_get_motion_data function gets the frame data in the specified motion format. This function is only supported for gyroscope, accelerometer or pose streams. Valid motion formats are:

Motion Format

Description

VIDEO3D_MOTION_FORMAT_3DOF

3-DOF motion coordinates as three 32-bit floating-point values in SI units e.g. m/s^2 or rad/s.

VIDEO3D_MOTION_FORMAT_6DOF_POSE

6-DOF motion coordinates as six 32-bit floating-point values in SI units representing position and orientation.

Prototype

t_error
video3d_frame_get_motion_data(t_video3d_frame frame, t_video3d_motion_format format, t_single * data);
    

Parameters

t_video3d_frame frame

The handle to the frame returned by video3d_stream_get_frame.

t_video3d_motion_format format

The format of the motion data retrieved. See the description above for details on the different formats.

t_single * data

The motion data in the specified format.

Return value

The return value is 0 if the frame data was retrieved successfully. Otherwise a negative error code is returned. Error codes are defined in quanser_errors.h. A suitable error message may be retrieved using msg_get_error_message.

Error codes

QERR_INVALID_ARGUMENT

One of the arguments is invalid.

Requirements

Include Files

Libraries

quanser_video3d.h

quanser_media.lib;quanser_communications.lib;quanser_runtime.lib;quanser_common.lib

Examples

t_single angular_rates[3];
t_error result;

result = video3d_frame_get_motion_data(frame, VIDEO3D_MOTION_FORMAT_3DOF, angular_rates);
    

See Also

 

navigation bar