mavsdk::Telemetry Class Reference

#include: telemetry.h


This class allows users to get vehicle telemetry and state information (e.g. battery, GPS, RC connection, flight mode etc.) and set telemetry update rates.

Data Structures

struct AccelerationNED

struct ActuatorControlTarget

struct ActuatorOutputStatus

struct AngularVelocityBody

struct AngularVelocityNED

struct Battery

struct EulerAngle

struct GPSInfo

struct GroundSpeedNED

struct Health

struct IMUReadingNED

struct MagneticFieldNED

struct Position

struct PositionNED

struct PositionVelocityNED

struct Quaternion

struct RCStatus

struct StatusText

struct VelocityNED

Public Types

Type Description
enum FlightMode Flight modes.
enum LandedState LandedState. Enumeration of landed detector states.
enum Result Results enum for telemetry requests.
std::function< void(Result)> result_callback_t Callback type for telemetry requests.
std::function< void(PositionVelocityNED)> position_velocity_ned_callback_t Callback type for kinematic (position and velocity) updates.
std::function< void(Position)> position_callback_t Callback type for position updates.
std::function< void(bool in_air)> in_air_callback_t Callback type for in-air updates.
std::function< void(StatusText status_text)> status_text_callback_t Callback for mavlink status text updates.
std::function< void(bool armed)> armed_callback_t Callback type for armed updates (asynchronous).
std::function< void(Quaternion quaternion)> attitude_quaternion_callback_t Callback type for attitude updates in quaternion.
std::function< void(EulerAngle euler_angle)> attitude_euler_angle_callback_t Callback type for attitude updates in Euler angles.
std::function< void(AngularVelocityBody angular_velocity_body)> attitude_angular_velocity_body_callback_t Callback type for angular velocity updates in quaternion.
std::function< void(GroundSpeedNED ground_speed_ned)> ground_speed_ned_callback_t Callback type for ground speed (NED) updates.
std::function< void(IMUReadingNED imu_reading_ned)> imu_reading_ned_callback_t Callback type for IMU (NED) updates.
std::function< void(GPSInfo gps_info)> gps_info_callback_t Callback type for GPS information updates.
std::function< void(Battery battery)> battery_callback_t Callback type for battery status updates.
std::function< void(FlightMode flight_mode)> flight_mode_callback_t Callback type for flight mode updates.
std::function< void(Health health)> health_callback_t Callback type for health status updates.
std::function< void(bool health_all_ok)> health_all_ok_callback_t Callback type for health status updates.
std::function< void(LandedState landed_state)> landed_state_callback_t Callback type for landed state updates.
std::function< void(RCStatus rc_status)> rc_status_callback_t Callback type for RC status updates.
std::function< void(uint64_t time_us)> unix_epoch_time_callback_t Callback type for Unix Epoch Time updates.
std::function< void(ActuatorControlTarget actuator_control_target)> actuator_control_target_callback_t Callback type for actuator control target updates (asynchronous).
std::function< void(ActuatorOutputStatus actuator_output_status)> actuator_output_status_callback_t Callback type for actuator output status target updates (asynchronous).

Public Member Functions

Type Name Description
  Telemetry (System & system) Constructor. Creates the plugin for a specific System.
  ~Telemetry () Destructor (internal use only).
  Telemetry (const Telemetry &)=delete Copy constructor (object is not copyable).
Result set_rate_position_velocity_ned (double rate_hz) Set rate of kinematic (position and velocity) updates (synchronous).
Result set_rate_position (double rate_hz) Set rate of position updates (synchronous).
Result set_rate_home_position (double rate_hz) Set rate of home position updates (synchronous).
Result set_rate_in_air (double rate_hz) Set rate of in-air status updates (synchronous).
Result set_rate_attitude (double rate_hz) Set rate of attitude updates (synchronous).
Result set_rate_camera_attitude (double rate_hz) Set rate of camera attitude updates (synchronous).
Result set_rate_ground_speed_ned (double rate_hz) Set rate of ground speed (NED) updates (synchronous).
Result set_rate_imu_reading_ned (double rate_hz) Set rate of IMU reading (NED) updates (synchronous).
Result set_rate_gps_info (double rate_hz) Set rate of GPS information updates (synchronous).
Result set_rate_battery (double rate_hz) Set rate of battery status updates (synchronous).
Result set_rate_rc_status (double rate_hz) Set rate of RC status updates (synchronous).
Result set_rate_actuator_control_target (double rate_hz) Set rate of actuator controls updates (synchronous).
Result set_rate_actuator_output_status (double rate_hz) Set rate of actuator output status updates (synchronous).
void set_rate_position_velocity_ned_async (double rate_hz, result_callback_t callback) Set rate of kinematic (position and velocity) updates (asynchronous).
void set_rate_position_async (double rate_hz, result_callback_t callback) Set rate of position updates (asynchronous).
void set_rate_home_position_async (double rate_hz, result_callback_t callback) Set rate of home position updates (asynchronous).
void set_rate_in_air_async (double rate_hz, result_callback_t callback) Set rate of in-air status updates (asynchronous).
void set_rate_attitude_async (double rate_hz, result_callback_t callback) Set rate of attitude updates (asynchronous).
void set_rate_camera_attitude_async (double rate_hz, result_callback_t callback) Set rate of camera attitude updates (asynchronous).
void set_rate_ground_speed_ned_async (double rate_hz, result_callback_t callback) Set rate of ground speed (NED) updates (asynchronous).
void set_rate_imu_reading_ned_async (double rate_hz, result_callback_t callback) Set rate of IMU reading (NED) updates (asynchronous).
void set_rate_gps_info_async (double rate_hz, result_callback_t callback) Set rate of GPS information updates (asynchronous).
void set_rate_battery_async (double rate_hz, result_callback_t callback) Set rate of battery status updates (asynchronous).
void set_rate_rc_status_async (double rate_hz, result_callback_t callback) Set rate of RC status updates (asynchronous).
void set_rate_actuator_control_target_async (double rate_hz, result_callback_t callback) Set rate of actuator control target updates (asynchronous).
void set_rate_actuator_output_status_async (double rate_hz, result_callback_t callback) et rate of actuator control target updates (asynchronous).
void set_unix_epoch_time_async (double rate_hz, result_callback_t callback) Set rate of Unix Epoch Time update (asynchronous).
PositionVelocityNED position_velocity_ned () const Get the current kinematic (position and velocity) in NED frame (synchronous).
Position position () const Get the current position (synchronous).
Position home_position () const Get the home position (synchronous).
StatusText status_text () const Get status text (synchronous).
bool in_air () const Get the in-air status (synchronous).
LandedState landed_state () const Get the landed state status (synchronous).
bool armed () const Get the arming status (synchronous).
Quaternion attitude_quaternion () const Get the current attitude in quaternions (synchronous).
EulerAngle attitude_euler_angle () const Get the current attitude in Euler angles (synchronous).
AngularVelocityBody attitude_angular_velocity_body () const Get the current angular speed in rad/s (synchronous).
Quaternion camera_attitude_quaternion () const Get the camera's attitude in quaternions (synchronous).
EulerAngle camera_attitude_euler_angle () const Get the camera's attitude in Euler angles (synchronous).
GroundSpeedNED ground_speed_ned () const Get the current ground speed (NED) (synchronous).
IMUReadingNED imu_reading_ned () const Get the current IMU reading (NED) (synchronous).
GPSInfo gps_info () const Get the current GPS information (synchronous).
Battery battery () const Get the current battery status (synchronous).
FlightMode flight_mode () const Get the current flight mode (synchronous).
Health health () const Get the current health status (synchronous).
bool health_all_ok () const Returns true if the overall health is ok (synchronous).
RCStatus rc_status () const Get the RC status (synchronous).
ActuatorControlTarget actuator_control_target () const Get the actuator control target (synchronous).
ActuatorOutputStatus actuator_output_status () const Get the actuator output status (synchronous).
void position_velocity_ned_async (position_velocity_ned_callback_t callback) Subscribe to kinematic (position and velocity) updates (asynchronous).
void position_async (position_callback_t callback) Subscribe to position updates (asynchronous).
void home_position_async (position_callback_t callback) Subscribe to home position updates (asynchronous).
void in_air_async (in_air_callback_t callback) Subscribe to in-air updates (asynchronous).
void status_text_async (status_text_callback_t callback) Subscribe to status text updates (asynchronous).
void armed_async (armed_callback_t callback) Subscribe to armed updates (asynchronous).
void attitude_quaternion_async (attitude_quaternion_callback_t callback) Subscribe to attitude updates in quaternion (asynchronous).
void attitude_euler_angle_async (attitude_euler_angle_callback_t callback) Subscribe to attitude updates in Euler angles (asynchronous).
void attitude_angular_velocity_body_async (attitude_angular_velocity_body_callback_t callback) Subscribe to attitude updates in angular velocity (asynchronous).
void camera_attitude_quaternion_async (attitude_quaternion_callback_t callback) Subscribe to camera attitude updates in quaternion (asynchronous).
void camera_attitude_euler_angle_async (attitude_euler_angle_callback_t callback) Subscribe to camera attitude updates in Euler angles (asynchronous).
void ground_speed_ned_async (ground_speed_ned_callback_t callback) Subscribe to ground speed (NED) updates (asynchronous).
void imu_reading_ned_async (imu_reading_ned_callback_t callback) Subscribe to IMU reading (NED) updates (asynchronous).
void gps_info_async (gps_info_callback_t callback) Subscribe to GPS information updates (asynchronous).
void battery_async (battery_callback_t callback) Subscribe to battery status updates (asynchronous).
void flight_mode_async (flight_mode_callback_t callback) Subscribe to flight mode updates (asynchronous).
void health_async (health_callback_t callback) Subscribe to health status updates (asynchronous).
void health_all_ok_async (health_all_ok_callback_t callback) Subscribe to overall health status updates (asynchronous).
void landed_state_async (landed_state_callback_t callback) Subscribe to Landed state updates (asynchronous).
void actuator_control_target_async (actuator_control_target_callback_t callback) Subscribe to actuator control target updates (asynchronous).
void actuator_output_status_async (actuator_output_status_callback_t callback) Subscribe to actuator output status target updates (asynchronous).
void rc_status_async (rc_status_callback_t callback) Subscribe to RC status updates (asynchronous).
void unix_epoch_time_async (unix_epoch_time_callback_t callback) Subscribe to Unix Epoch Time updates (asynchronous).
const Telemetry & operator= (const Telemetry &)=delete Equality operator (object is not copyable).

Static Public Member Functions

Type Name Description
std::string flight_mode_str (FlightMode flight_mode) Get a human readable English string for a flight mode.
std::string landed_state_str (LandedState landed_state) Get a human readable English string for a landed state.
const char * result_str (Result result) Get human-readable English string for Telemetry::Result.

Constructor & Destructor Documentation

Telemetry()

mavsdk::Telemetry::Telemetry(System &system)

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto telemetry = std::make_shared<Telemetry>(system);

Parameters

  • System& system - The specific system associated with this plugin.

~Telemetry()

mavsdk::Telemetry::~Telemetry()

Destructor (internal use only).

Telemetry()

mavsdk::Telemetry::Telemetry(const Telemetry &)=delete

Copy constructor (object is not copyable).

Parameters

Member Typdef Documentation

typedef result_callback_t

typedef std::function<void(Result)> mavsdk::Telemetry::result_callback_t

Callback type for telemetry requests.

typedef position_velocity_ned_callback_t

typedef std::function<void(PositionVelocityNED)> mavsdk::Telemetry::position_velocity_ned_callback_t

Callback type for kinematic (position and velocity) updates.

typedef position_callback_t

typedef std::function<void(Position)> mavsdk::Telemetry::position_callback_t

Callback type for position updates.

typedef in_air_callback_t

typedef std::function<void(bool in_air)> mavsdk::Telemetry::in_air_callback_t

Callback type for in-air updates.

Parameters

  • in_air - true if in-air (flying) and not on-ground (landed).

typedef status_text_callback_t

typedef std::function<void(StatusText status_text)> mavsdk::Telemetry::status_text_callback_t

Callback for mavlink status text updates.

Parameters

  • status - text with message type and text.

typedef armed_callback_t

typedef std::function<void(bool armed)> mavsdk::Telemetry::armed_callback_t

Callback type for armed updates (asynchronous).

Parameters

  • armed - true if armed (motors spinning).

typedef attitude_quaternion_callback_t

typedef std::function<void(Quaternion quaternion)> mavsdk::Telemetry::attitude_quaternion_callback_t

Callback type for attitude updates in quaternion.

Parameters

  • quaternion - Attitude quaternion.

typedef attitude_euler_angle_callback_t

typedef std::function<void(EulerAngle euler_angle)> mavsdk::Telemetry::attitude_euler_angle_callback_t

Callback type for attitude updates in Euler angles.

Parameters

  • euler_angle - Attitude Euler angle.

typedef attitude_angular_velocity_body_callback_t

typedef std::function<void(AngularVelocityBody angular_velocity_body)> mavsdk::Telemetry::attitude_angular_velocity_body_callback_t

Callback type for angular velocity updates in quaternion.

Parameters

  • angular_velocity_body - Angular velocity.

typedef ground_speed_ned_callback_t

typedef std::function<void(GroundSpeedNED ground_speed_ned)> mavsdk::Telemetry::ground_speed_ned_callback_t

Callback type for ground speed (NED) updates.

Parameters

  • ground_speed_ned - Ground speed (NED).

typedef imu_reading_ned_callback_t

typedef std::function<void(IMUReadingNED imu_reading_ned)> mavsdk::Telemetry::imu_reading_ned_callback_t

Callback type for IMU (NED) updates.

Parameters

  • imu_reading_ned - IMU reading (NED).

typedef gps_info_callback_t

typedef std::function<void(GPSInfo gps_info)> mavsdk::Telemetry::gps_info_callback_t

Callback type for GPS information updates.

Parameters

  • gps_info - GPS information.

typedef battery_callback_t

typedef std::function<void(Battery battery)> mavsdk::Telemetry::battery_callback_t

Callback type for battery status updates.

Parameters

typedef flight_mode_callback_t

typedef std::function<void(FlightMode flight_mode)> mavsdk::Telemetry::flight_mode_callback_t

Callback type for flight mode updates.

Parameters

  • flight_mode - Flight mode.

typedef health_callback_t

typedef std::function<void(Health health)> mavsdk::Telemetry::health_callback_t

Callback type for health status updates.

Parameters

  • health - health flags.

typedef health_all_ok_callback_t

typedef std::function<void(bool health_all_ok)> mavsdk::Telemetry::health_all_ok_callback_t

Callback type for health status updates.

Parameters

  • health_all_ok - If all health flags are ok.

typedef landed_state_callback_t

typedef std::function<void(LandedState landed_state)> mavsdk::Telemetry::landed_state_callback_t

Callback type for landed state updates.

Parameters

  • LandedState - enumeration.

typedef rc_status_callback_t

typedef std::function<void(RCStatus rc_status)> mavsdk::Telemetry::rc_status_callback_t

Callback type for RC status updates.

Parameters

  • rc_status - RC status.

typedef unix_epoch_time_callback_t

typedef std::function<void(uint64_t time_us)> mavsdk::Telemetry::unix_epoch_time_callback_t

Callback type for Unix Epoch Time updates.

Parameters

  • uint64_t - Epoch time [us].

typedef actuator_control_target_callback_t

typedef std::function<void(ActuatorControlTarget actuator_control_target)> mavsdk::Telemetry::actuator_control_target_callback_t

Callback type for actuator control target updates (asynchronous).

Parameters

  • actuator_control_target - Actuator control target.

typedef actuator_output_status_callback_t

typedef std::function<void(ActuatorOutputStatus actuator_output_status)> mavsdk::Telemetry::actuator_output_status_callback_t

Callback type for actuator output status target updates (asynchronous).

Parameters

  • callback - Function to call with updates.

Member Enumeration Documentation

enum FlightMode

Flight modes.

For more information about flight modes, check out https://docs.px4.io/en/config/flight_mode.html.

Value Description
READY Armed and ready to take off.
TAKEOFF Taking off.
HOLD Hold mode (hovering in place (or circling for fixed-wing vehicles).
MISSION Mission mode.
RETURN_TO_LAUNCH Returning to launch position (then landing).
LAND Landing.
OFFBOARD Offboard mode.
FOLLOW_ME FollowMe mode.
UNKNOWN Mode not known.

enum LandedState

LandedState. Enumeration of landed detector states.

Value Description
UNKNOWN
ON_GROUND
IN_AIR
TAKING_OFF
LANDING

enum Result

Results enum for telemetry requests.

Value Description
SUCCESS Request succeeded.
NO_SYSTEM No system connected.
CONNECTION_ERROR Connection error.
BUSY System busy.
COMMAND_DENIED Command denied.
TIMEOUT Request timeout.
UNKNOWN Unknown error.

Member Function Documentation

set_rate_position_velocity_ned()

Result mavsdk::Telemetry::set_rate_position_velocity_ned(double rate_hz)

Set rate of kinematic (position and velocity) updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

See Also:

set_rate_position()

Result mavsdk::Telemetry::set_rate_position(double rate_hz)

Set rate of position updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_home_position()

Result mavsdk::Telemetry::set_rate_home_position(double rate_hz)

Set rate of home position updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_in_air()

Result mavsdk::Telemetry::set_rate_in_air(double rate_hz)

Set rate of in-air status updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_attitude()

Result mavsdk::Telemetry::set_rate_attitude(double rate_hz)

Set rate of attitude updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_camera_attitude()

Result mavsdk::Telemetry::set_rate_camera_attitude(double rate_hz)

Set rate of camera attitude updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_ground_speed_ned()

Result mavsdk::Telemetry::set_rate_ground_speed_ned(double rate_hz)

Set rate of ground speed (NED) updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_imu_reading_ned()

Result mavsdk::Telemetry::set_rate_imu_reading_ned(double rate_hz)

Set rate of IMU reading (NED) updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_gps_info()

Result mavsdk::Telemetry::set_rate_gps_info(double rate_hz)

Set rate of GPS information updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_battery()

Result mavsdk::Telemetry::set_rate_battery(double rate_hz)

Set rate of battery status updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_rc_status()

Result mavsdk::Telemetry::set_rate_rc_status(double rate_hz)

Set rate of RC status updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_actuator_control_target()

Result mavsdk::Telemetry::set_rate_actuator_control_target(double rate_hz)

Set rate of actuator controls updates (synchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_actuator_output_status()

Result mavsdk::Telemetry::set_rate_actuator_output_status(double rate_hz)

Set rate of actuator output status updates (synchronous).

o stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.

Returns

Result - Result of request.

set_rate_position_velocity_ned_async()

void mavsdk::Telemetry::set_rate_position_velocity_ned_async(double rate_hz, result_callback_t callback)

Set rate of kinematic (position and velocity) updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

See Also:

set_rate_position_async()

void mavsdk::Telemetry::set_rate_position_async(double rate_hz, result_callback_t callback)

Set rate of position updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_rate_home_position_async()

void mavsdk::Telemetry::set_rate_home_position_async(double rate_hz, result_callback_t callback)

Set rate of home position updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_rate_in_air_async()

void mavsdk::Telemetry::set_rate_in_air_async(double rate_hz, result_callback_t callback)

Set rate of in-air status updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_rate_attitude_async()

void mavsdk::Telemetry::set_rate_attitude_async(double rate_hz, result_callback_t callback)

Set rate of attitude updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_rate_camera_attitude_async()

void mavsdk::Telemetry::set_rate_camera_attitude_async(double rate_hz, result_callback_t callback)

Set rate of camera attitude updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_rate_ground_speed_ned_async()

void mavsdk::Telemetry::set_rate_ground_speed_ned_async(double rate_hz, result_callback_t callback)

Set rate of ground speed (NED) updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_rate_imu_reading_ned_async()

void mavsdk::Telemetry::set_rate_imu_reading_ned_async(double rate_hz, result_callback_t callback)

Set rate of IMU reading (NED) updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Cabllback to receive request result.

set_rate_gps_info_async()

void mavsdk::Telemetry::set_rate_gps_info_async(double rate_hz, result_callback_t callback)

Set rate of GPS information updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_rate_battery_async()

void mavsdk::Telemetry::set_rate_battery_async(double rate_hz, result_callback_t callback)

Set rate of battery status updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_rate_rc_status_async()

void mavsdk::Telemetry::set_rate_rc_status_async(double rate_hz, result_callback_t callback)

Set rate of RC status updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_rate_actuator_control_target_async()

void mavsdk::Telemetry::set_rate_actuator_control_target_async(double rate_hz, result_callback_t callback)

Set rate of actuator control target updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_rate_actuator_output_status_async()

void mavsdk::Telemetry::set_rate_actuator_output_status_async(double rate_hz, result_callback_t callback)

et rate of actuator control target updates (asynchronous).

To stop sending it completely, use a rate_hz of -1, for default rate use 0.

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

set_unix_epoch_time_async()

void mavsdk::Telemetry::set_unix_epoch_time_async(double rate_hz, result_callback_t callback)

Set rate of Unix Epoch Time update (asynchronous).

Parameters

  • double rate_hz - Rate in Hz.
  • result_callback_t callback - Callback to receive request result.

position_velocity_ned()

PositionVelocityNED mavsdk::Telemetry::position_velocity_ned() const

Get the current kinematic (position and velocity) in NED frame (synchronous).

Returns

PositionVelocityNED - PositionVelocityNED.

position()

Position mavsdk::Telemetry::position() const

Get the current position (synchronous).

Returns

Position - Position.

home_position()

Position mavsdk::Telemetry::home_position() const

Get the home position (synchronous).

Returns

Position - Home position.

status_text()

StatusText mavsdk::Telemetry::status_text() const

Get status text (synchronous).

Returns

StatusText - Status text.

in_air()

bool mavsdk::Telemetry::in_air() const

Get the in-air status (synchronous).

Returns

 bool - true if in-air (flying) and not on-ground (landed).

landed_state()

LandedState mavsdk::Telemetry::landed_state() const

Get the landed state status (synchronous).

Returns

LandedState - Landed state.

armed()

bool mavsdk::Telemetry::armed() const

Get the arming status (synchronous).

Returns

 bool - true if armed (propellers spinning).

attitude_quaternion()

Quaternion mavsdk::Telemetry::attitude_quaternion() const

Get the current attitude in quaternions (synchronous).

Returns

Quaternion - Attitude as quaternion.

attitude_euler_angle()

EulerAngle mavsdk::Telemetry::attitude_euler_angle() const

Get the current attitude in Euler angles (synchronous).

Returns

EulerAngle - Attitude as Euler angle.

attitude_angular_velocity_body()

AngularVelocityBody mavsdk::Telemetry::attitude_angular_velocity_body() const

Get the current angular speed in rad/s (synchronous).

Returns

AngularVelocityBody - Angular speed.

camera_attitude_quaternion()

Quaternion mavsdk::Telemetry::camera_attitude_quaternion() const

Get the camera's attitude in quaternions (synchronous).

Note that the yaw component of attitude is relative to North (absolute frame).

Returns

Quaternion - Camera's attitude as quaternion.

camera_attitude_euler_angle()

EulerAngle mavsdk::Telemetry::camera_attitude_euler_angle() const

Get the camera's attitude in Euler angles (synchronous).

Note that the yaw component of attitude is relative to North (absolute frame).

Returns

EulerAngle - Camera's attitude as Euler angle.

ground_speed_ned()

GroundSpeedNED mavsdk::Telemetry::ground_speed_ned() const

Get the current ground speed (NED) (synchronous).

Returns

GroundSpeedNED - Ground speed in NED.

imu_reading_ned()

IMUReadingNED mavsdk::Telemetry::imu_reading_ned() const

Get the current IMU reading (NED) (synchronous).

Returns

IMUReadingNED - IMU reading in NED.

gps_info()

GPSInfo mavsdk::Telemetry::gps_info() const

Get the current GPS information (synchronous).

Returns

GPSInfo - GPS information.

battery()

Battery mavsdk::Telemetry::battery() const

Get the current battery status (synchronous).

Returns

Battery -

flight_mode()

FlightMode mavsdk::Telemetry::flight_mode() const

Get the current flight mode (synchronous).

Returns

FlightMode - Flight mode.

health()

Health mavsdk::Telemetry::health() const

Get the current health status (synchronous).

Returns

Health - Health status.

health_all_ok()

bool mavsdk::Telemetry::health_all_ok() const

Returns true if the overall health is ok (synchronous).

Returns

 bool - True if all health flags are OK.

rc_status()

RCStatus mavsdk::Telemetry::rc_status() const

Get the RC status (synchronous).

Returns

RCStatus - RC status.

actuator_control_target()

ActuatorControlTarget mavsdk::Telemetry::actuator_control_target() const

Get the actuator control target (synchronous).

Returns

ActuatorControlTarget - Actuator control target

actuator_output_status()

ActuatorOutputStatus mavsdk::Telemetry::actuator_output_status() const

Get the actuator output status (synchronous).

Returns

ActuatorOutputStatus - Actuator output status

position_velocity_ned_async()

void mavsdk::Telemetry::position_velocity_ned_async(position_velocity_ned_callback_t callback)

Subscribe to kinematic (position and velocity) updates (asynchronous).

Parameters

position_async()

void mavsdk::Telemetry::position_async(position_callback_t callback)

Subscribe to position updates (asynchronous).

Parameters

home_position_async()

void mavsdk::Telemetry::home_position_async(position_callback_t callback)

Subscribe to home position updates (asynchronous).

Parameters

in_air_async()

void mavsdk::Telemetry::in_air_async(in_air_callback_t callback)

Subscribe to in-air updates (asynchronous).

Parameters

status_text_async()

void mavsdk::Telemetry::status_text_async(status_text_callback_t callback)

Subscribe to status text updates (asynchronous).

Parameters

armed_async()

void mavsdk::Telemetry::armed_async(armed_callback_t callback)

Subscribe to armed updates (asynchronous).

Note that armed updates are limited to 1Hz.

Parameters

attitude_quaternion_async()

void mavsdk::Telemetry::attitude_quaternion_async(attitude_quaternion_callback_t callback)

Subscribe to attitude updates in quaternion (asynchronous).

Parameters

attitude_euler_angle_async()

void mavsdk::Telemetry::attitude_euler_angle_async(attitude_euler_angle_callback_t callback)

Subscribe to attitude updates in Euler angles (asynchronous).

Parameters

attitude_angular_velocity_body_async()

void mavsdk::Telemetry::attitude_angular_velocity_body_async(attitude_angular_velocity_body_callback_t callback)

Subscribe to attitude updates in angular velocity (asynchronous).

Parameters

camera_attitude_quaternion_async()

void mavsdk::Telemetry::camera_attitude_quaternion_async(attitude_quaternion_callback_t callback)

Subscribe to camera attitude updates in quaternion (asynchronous).

Parameters

camera_attitude_euler_angle_async()

void mavsdk::Telemetry::camera_attitude_euler_angle_async(attitude_euler_angle_callback_t callback)

Subscribe to camera attitude updates in Euler angles (asynchronous).

Parameters

ground_speed_ned_async()

void mavsdk::Telemetry::ground_speed_ned_async(ground_speed_ned_callback_t callback)

Subscribe to ground speed (NED) updates (asynchronous).

Parameters

imu_reading_ned_async()

void mavsdk::Telemetry::imu_reading_ned_async(imu_reading_ned_callback_t callback)

Subscribe to IMU reading (NED) updates (asynchronous).

Parameters

gps_info_async()

void mavsdk::Telemetry::gps_info_async(gps_info_callback_t callback)

Subscribe to GPS information updates (asynchronous).

Parameters

battery_async()

void mavsdk::Telemetry::battery_async(battery_callback_t callback)

Subscribe to battery status updates (asynchronous).

Parameters

flight_mode_async()

void mavsdk::Telemetry::flight_mode_async(flight_mode_callback_t callback)

Subscribe to flight mode updates (asynchronous).

Note that flight mode updates are limited to 1Hz.

Parameters

health_async()

void mavsdk::Telemetry::health_async(health_callback_t callback)

Subscribe to health status updates (asynchronous).

Note that health status updates are limited to 1Hz.

Parameters

health_all_ok_async()

void mavsdk::Telemetry::health_all_ok_async(health_all_ok_callback_t callback)

Subscribe to overall health status updates (asynchronous).

Note that overall health status updates are limited to 1Hz.

Parameters

landed_state_async()

void mavsdk::Telemetry::landed_state_async(landed_state_callback_t callback)

Subscribe to Landed state updates (asynchronous).

Parameters

actuator_control_target_async()

void mavsdk::Telemetry::actuator_control_target_async(actuator_control_target_callback_t callback)

Subscribe to actuator control target updates (asynchronous).

Parameters

actuator_output_status_async()

void mavsdk::Telemetry::actuator_output_status_async(actuator_output_status_callback_t callback)

Subscribe to actuator output status target updates (asynchronous).

Parameters

rc_status_async()

void mavsdk::Telemetry::rc_status_async(rc_status_callback_t callback)

Subscribe to RC status updates (asynchronous).

Parameters

unix_epoch_time_async()

void mavsdk::Telemetry::unix_epoch_time_async(unix_epoch_time_callback_t callback)

Subscribe to Unix Epoch Time updates (asynchronous).

Parameters

operator=()

const Telemetry& mavsdk::Telemetry::operator=(const Telemetry &)=delete

Equality operator (object is not copyable).

Parameters

Returns

 const Telemetry & -

flight_mode_str()

static std::string mavsdk::Telemetry::flight_mode_str(FlightMode flight_mode)

Get a human readable English string for a flight mode.

Parameters

Returns

 std::string -

landed_state_str()

static std::string mavsdk::Telemetry::landed_state_str(LandedState landed_state)

Get a human readable English string for a landed state.

Parameters

Returns

 std::string -

result_str()

static const char* mavsdk::Telemetry::result_str(Result result)

Get human-readable English string for Telemetry::Result.

Parameters

  • Result result - The enum value for which string is needed.

Returns

 const char * - Human readable string for the Telemetry::Result.

© Dronecode 2017-2019. License: CC BY 4.0            Updated: 2019-08-26 04:36:58

results matching ""

    No results matching ""