Type Alias AccelFrame

Source
pub type AccelFrame = MotionFrame<Accel>;
Expand description

A motion frame type holding the raw pointer and derived metadata for an RS2 Accel frame.

Aliased Type§

pub struct AccelFrame { /* private fields */ }

Implementations§

Source§

impl AccelFrame

Source

pub fn acceleration(&self) -> &[f32; 3]

Returns a 3-item array representing the sensor motion recorded in the Accel frame.

Accelerations are reported as [x, y, z] values, and are in units of m/s^2

This function will return different data conventions entirely depending on the device used to create the measurement.

§Intel RealSense D435i
  • motion[0]: Positive x-axis points to the right.
  • motion[1]: Positive y-axis points down.
  • motion[2]: Positive z-axis points forward.
§Intel RealSense T265
  • motion[0]: Positive X direction is towards right imager.
  • motion[1]: Positive Y direction is upwards toward the top of the device.
  • motion[2]: Positive Z direction is inwards toward the back of the device.

Read more about the coordinate frames of RealSense motion in the RealSense docs

Trait Implementations§

Source§

impl FrameCategory for AccelFrame

Source§

fn extension() -> Rs2Extension

Identifies the corresponding Rs2Extension for the type implementing this trait.
Source§

fn kind() -> Rs2StreamKind

Identifies the stream kind corresponding to a given type implementing this trait.
Source§

fn has_correct_kind(&self) -> bool

Predicate for checking if the RS2 frame’s stream has the same kind as the frame category.