18 #include <unordered_map> 24 using mavlink::minimal::MAV_AUTOPILOT;
25 using mavlink::minimal::MAV_TYPE;
26 using mavlink::minimal::MAV_STATE;
27 using mavlink::minimal::MAV_COMPONENT;
28 using mavlink::common::MAV_ESTIMATOR_TYPE;
29 using mavlink::common::ADSB_ALTITUDE_TYPE;
30 using mavlink::common::ADSB_EMITTER_TYPE;
31 using mavlink::common::GPS_FIX_TYPE;
32 using mavlink::common::MAV_MISSION_RESULT;
33 using mavlink::common::MAV_FRAME;
34 using mavlink::common::MAV_DISTANCE_SENSOR;
35 using mavlink::common::LANDING_TARGET_TYPE;
110 "Reserved for future use",
114 "Generic autopilot only supporting simple waypoints",
115 "Generic autopilot supporting waypoints and other simple navigation commands",
116 "Generic autopilot supporting the full mission command set",
117 "No valid autopilot",
157 "Generic micro air vehicle",
158 "Fixed wing aircraft",
160 "Coaxial helicopter",
161 "Normal helicopter with tail rotor",
162 "Ground installation",
163 "Operator control unit",
175 "Onboard companion controller",
189 "FLARM collision avoidance system",
191 "Open Drone ID. See https:",
230 "ONBOARD_CONTROLLER",
285 "Flight_Termination",
332 std::underlying_type<timesync_mode>::type rv = idx;
469 "mission accepted OK",
470 "Generic error / not accepting mission commands at all right now.",
471 "Coordinate frame is not supported.",
472 "Command is not supported.",
473 "Mission items exceed storage space.",
474 "One of the parameters has an invalid value.",
475 "param1 has an invalid value.",
476 "param2 has an invalid value.",
477 "param3 has an invalid value.",
478 "param4 has an invalid value.",
479 "x / param5 has an invalid value.",
480 "y / param6 has an invalid value.",
481 "z / param7 has an invalid value.",
482 "Mission item received out of sequence",
483 "Not accepting any mission commands from this communication partner.",
484 "Current mission operation cancelled (e.g. mission upload, mission download).",
506 "GLOBAL_RELATIVE_ALT",
509 "GLOBAL_RELATIVE_ALT_INT",
513 "GLOBAL_TERRAIN_ALT",
514 "GLOBAL_TERRAIN_ALT_INT",
599 { 68,
"TELEMETRY_RADIO" },
655 { 158,
"PERIPHERAL" },
656 { 159,
"QX1_GIMBAL" },
665 { 190,
"MISSIONPLANNER" },
666 { 191,
"ONBOARD_COMPUTER" },
667 { 195,
"PATHPLANNER" },
668 { 196,
"OBSTACLE_AVOIDANCE" },
669 { 197,
"VISUAL_INERTIAL_ODOMETRY" },
670 { 198,
"PAIRING_MANAGER" },
676 { 236,
"ODID_TXRX_1" },
677 { 237,
"ODID_TXRX_2" },
678 { 238,
"ODID_TXRX_3" },
679 { 240,
"UDP_BRIDGE" },
680 { 241,
"UART_BRIDGE" },
681 { 242,
"TUNNEL_NODE" },
682 { 250,
"SYSTEM_CONTROL" },
701 std::underlying_type<MAV_FRAME>::type rv = idx;
707 return MAV_FRAME::LOCAL_NED;
714 std::underlying_type<MAV_TYPE>::type rv = idx;
719 return MAV_TYPE::GENERIC;
771 std::underlying_type<LANDING_TARGET_TYPE>::type rv = idx;
772 return static_cast<LANDING_TARGET_TYPE
>(rv);
775 ROS_ERROR_STREAM_NAMED(
"uas",
"TYPE: Unknown LANDING_TARGET_TYPE: " << landing_target_type <<
". Defaulting to LIGHT_BEACON");
776 return LANDING_TARGET_TYPE::LIGHT_BEACON;
std::string to_name(MAV_TYPE e)
static const std::array< const std::string, 20 > mav_autopilot_strings
MAV_AUTOPILOT values.
static const std::array< const std::string, 4 > timesync_mode_strings
timesync_mode values
static const std::array< const std::string, 16 > mav_mission_result_strings
MAV_MISSION_RESULT values.
mavlink::common::MAV_FRAME mav_frame_from_str(const std::string &mav_frame)
Retreive MAV_FRAME from name.
#define ROS_ERROR_STREAM_NAMED(name, args)
std::string to_string(LANDING_TARGET_TYPE e)
static const std::array< const std::string, 37 > mav_type_strings
MAV_TYPE values.
static const std::array< const std::string, 5 > mav_distance_sensor_strings
MAV_DISTANCE_SENSOR values.
static const std::array< const std::string, 37 > mav_type_names
MAV_TYPE values.
static const std::array< const std::string, 20 > adsb_emitter_type_strings
ADSB_EMITTER_TYPE values.
static const std::array< const std::string, 9 > mav_estimator_type_strings
MAV_ESTIMATOR_TYPE values.
static const std::array< const std::string, 2 > adsb_altitude_type_strings
ADSB_ALTITUDE_TYPE values.
mavlink::minimal::MAV_TYPE mav_type_from_str(const std::string &mav_type)
Retreive MAV_TYPE from name.
std::string to_string(timesync_mode e)
static const std::array< const std::string, 9 > gps_fix_type_strings
GPS_FIX_TYPE values.
static const std::array< const std::string, 22 > mav_frame_strings
MAV_FRAME values.
static const std::unordered_map< size_t, const std::string > mav_comp_id_strings
timesync_mode timesync_mode_from_str(const std::string &mode)
Retrieve timesync mode from name.
static const std::array< const std::string, 4 > landing_target_type_strings
LANDING_TARGET_TYPE values.
mavlink::common::LANDING_TARGET_TYPE landing_target_type_from_str(const std::string &landing_target_type)
Retrieve landing target type from alias name.
static const std::array< const std::string, 9 > mav_state_strings
MAV_STATE values.
constexpr std::underlying_type< _T >::type enum_value(_T e)