diff --git a/src/rotations.h b/src/rotations.h
index a5fc57e566d1bec2b0077a37fb35dfb67f026515..aa1feed4b7f26c42e8398fde60ddc375bdc5927f 100644
--- a/src/rotations.h
+++ b/src/rotations.h
@@ -416,6 +416,13 @@ inline Eigen::Matrix<T, 3, 3> matrixRollPitchYaw(const T roll,
   return (az * ay * ax).toRotationMatrix().matrix();
 }
 
+template <typename Derived>
+inline typename Eigen::MatrixBase<Derived>::Scalar
+getYaw(const Eigen::MatrixBase<Derived>& r)
+{
+  using std::atan2;
+  return atan2( r(1, 0), r(0, 0) );
+}
 
 } // namespace wolf