16 auto res =
float3{ float(hid->x), float(hid->y), float(hid->z) } *float(factor);
25 static constexpr
float gravity = 9.80665f;
26 static constexpr
double accelerator_transform_factor = 0.001*gravity;
28 copy_hid_axes<FORMAT>(
dest,
source, accelerator_transform_factor);
35 static const double gyro_transform_factor =
deg2rad(0.1);
37 copy_hid_axes<FORMAT>(
dest,
source, gyro_transform_factor);
41 std::shared_ptr<mm_calib_handler> mm_calib, std::shared_ptr<enable_motion_correction> mm_correct_opt)
42 :
motion_transform(
"Motion Transform", target_format, target_stream, mm_calib, mm_correct_opt)
46 std::shared_ptr<mm_calib_handler> mm_calib, std::shared_ptr<enable_motion_correction> mm_correct_opt)
GLuint const GLchar * name
stream_profile get_profile() const
void unpack_accel_axes(byte *const dest[], const byte *source, int width, int height, int output_size)
const void * get_data() const
void unpack_gyro_axes(byte *const dest[], const byte *source, int width, int height, int output_size)
rs2::frame process_frame(const rs2::frame_source &source, const rs2::frame &f) override
GLint GLsizei GLsizei height
rs2_format
A stream's format identifies how binary data is encoded within a frame.
rs2_stream
Streams are different types of data provided by RealSense devices.
void copy_hid_axes(byte *const dest[], const byte *source, double factor)
GLsizei GLsizei GLchar * source
rs2_stream stream_type() const
void copy(void *dst, void const *src, size_t size)