flightgoggles_ros_bridge/src/Common/transforms.hpp
/**
 * @brief Converts right hand rule North East Down (NED) global poses to 
 * left handed coordinates (as used by the Unity3D backend of FlightGoggles).
 * 
 * @param NEDworld_T_object 
 * @return Transform3 
 */
@brief Converts right hand rule North East Down (NED) global poses to
left handed coordinates (as used by the Unity3D backend of FlightGoggles).

@param NEDworld_T_object
@return Transform3
@brief Converts right hand rule North East Down ( NED ) global poses to left handed coordinates ( as used by the Unity3D backend of FlightGoggles ) . @param NEDworld_T_object @return Transform3
Transform3 convertNEDGlobalPoseToGlobalUnityCoordinates(
    Transform3 NEDworld_T_object)
{
    Matrix4 unity_pose_T_NED_pose;
    unity_pose_T_NED_pose <<    0, 1, 0,  0,
                                0, 0, -1, 0,
                                1, 0, 0,  0,
                                0, 0, 0,  1;
    Transform3 unity_pose;
    unity_pose.matrix() = unity_pose_T_NED_pose * 
                          NEDworld_T_object.matrix() *
                          unity_pose_T_NED_pose.transpose();
    return unity_pose;
}
Transform3 convertNEDGlobalPoseToGlobalUnityCoordinates ( Transform3 NEDworld_T_object ) { Matrix4 unity_pose_T_NED_pose ; unity_pose_T_NED_pose << 0 , 1 , 0 , 0 , 0 , 0 , -1 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ; Transform3 unity_pose ; unity_pose . matrix ( ) = unity_pose_T_NED_pose * NEDworld_T_object . matrix ( ) * unity_pose_T_NED_pose . transpose ( ) ; return unity_pose ; }
@brief Converts right hand rule North East Down (NED) global poses to
 left handed coordinates (as used by the Unity3D backend of FlightGoggles).
@brief Converts right hand rule North East Down ( NED ) global poses to left handed coordinates ( as used by the Unity3D backend of FlightGoggles ) .
// Switch axis to unity axis. // x->z, y->x, z->-y // clang-format off // clang-format on