Function navtk::utils::linear_interp_rpy

Function Documentation

Vector3 navtk::utils::linear_interp_rpy(const aspn_xtensor::TypeTimestamp &t1, const Vector3 &rpy1, const aspn_xtensor::TypeTimestamp &t2, const Vector3 &rpy2, const aspn_xtensor::TypeTimestamp &t)

Linearly interpolate between two RPY (roll, pitch, yaw) attitude representations.

Parameters
  • t1 – Time of first attitude value.

  • rpy1 – First attitude, in radians.

  • t2 – Time of second attitude value.

  • rpy2 – Second attitude, in radians.

  • t – Time to interpolate to. Should be between t1 and t2.

Returns

RPY attitude representation at t, in radians. If t is outside of the range between t1 and t2 the return value will be the nearest of the inputs (constant endpoint extrapolation) with a warning.