From 27c50605df60b9cdce4be5fa76141042fb8bb9d0 Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Mon, 17 Aug 2020 13:46:06 -0400 Subject: [PATCH] provide alias aviable names for euler angles --- geometry/geometry_datatypes.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/geometry/geometry_datatypes.h b/geometry/geometry_datatypes.h index 14dea515..ff5075f1 100644 --- a/geometry/geometry_datatypes.h +++ b/geometry/geometry_datatypes.h @@ -75,9 +75,22 @@ typedef struct quaternion_ /** 3D Euler or Tait-Bryan angles (in radian) */ typedef struct euler_ { - float roll; /**< or bank \f$\phi\f$ = rotation about X axis */ - float pitch; /**< or elevation \f$\theta\f$ = rotation about Y axis */ - float yaw; /**< or heading \f$\psi\f$ = rotation about Z axis */ + union + { + float roll; /**< or bank \f$\phi\f$ = rotation about X axis */ + float bank; /**< or bank \f$\phi\f$ = rotation about X axis */ + }; + union + { + float pitch; /**< or elevation \f$\theta\f$ = rotation about Y axis */ + float + elevation; /**< or elevation \f$\theta\f$ = rotation about Y axis */ + }; + union + { + float yaw; /**< or heading \f$\psi\f$ = rotation about Z axis */ + float heading; /**< or heading \f$\psi\f$ = rotation about Z axis */ + }; } euler; /** @} */