Function ouster::sdk::core::get_rot_matrix_to_align_to_gravity

Function Documentation

Eigen::Matrix3d ouster::sdk::core::get_rot_matrix_to_align_to_gravity(double accel_x, double accel_y, double accel_z, bool fix_yaw = true)

Computes the rotation matrix needed to align an acceleration vector with the gravity axis [0, 0, 1].

Parameters:
  • accel_x[in] x-component of acceleration.

  • accel_y[in] y-component of acceleration.

  • accel_z[in] z-component of acceleration.

  • fix_yaw[in] If true, apply a counter-yaw so heading is neutralized. If false, return the shortest gravity-alignment rotation without forcing yaw.

Returns:

3x3 rotation matrix.