flightgoggles_ros_bridge/src/Common/transforms.hpp
/**
 * @brief Converts right hand rule North East Down (NED) poses to left handed 
 * rule coordinates (as used by Unity3D). Takes in an additional parameter 
 * for the translational and rotational offset between the FlightGoggles world
 * and the global NED poses used by the robot.
 * 
 * @deprecated - will be removed soon.
 * 
 * @param NEDworld_T_object 
 * @param unityWorld_T_NEDworld 
 * @return Transform3 
 */
@brief Converts right hand rule North East Down (NED) poses to left handed
rule coordinates (as used by Unity3D). Takes in an additional parameter
for the translational and rotational offset between the FlightGoggles world
and the global NED poses used by the robot.

@deprecated - will be removed soon.


@brief Converts right hand rule North East Down ( NED ) poses to left handed rule coordinates ( as used by Unity3D ) . Takes in an additional parameter for the translational and rotational offset between the FlightGoggles world and the global NED poses used by the robot . @deprecated - will be removed soon .
Transform3 convertNEDGlobalPoseToGlobalUnityCoordinates(
    Transform3 NEDworld_T_object, Transform3 unityWorld_T_NEDworld)
{
    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 * unityWorld_T_NEDworld.matrix() *
                          NEDworld_T_object.matrix() *
                          unity_pose_T_NED_pose.transpose();
    return unity_pose;
}
Transform3 convertNEDGlobalPoseToGlobalUnityCoordinates ( Transform3 NEDworld_T_object , Transform3 unityWorld_T_NEDworld ) { 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 * unityWorld_T_NEDworld . matrix ( ) * NEDworld_T_object . matrix ( ) * unity_pose_T_NED_pose . transpose ( ) ; return unity_pose ; }
@brief Converts right hand rule North East Down (NED) poses to left handed
 rule coordinates (as used by Unity3D).
@brief Converts right hand rule North East Down ( NED ) poses to left handed rule coordinates ( as used by Unity3D ) .
// Switch axis to unity axis. // x->z, y->x, z->-y // clang-format off // clang-format on