dronecode_sdk::Calibration Class Reference

#include: calibration.h


The Calibration class enables to calibrate sensors of a drone such as gyro, accelerometer, and magnetometer.

Public Types

Type Description
enum Result Possible results returned for camera commands.
std::function< void(Result result, float progress, const std::string &text)> calibration_callback_t Callback type for asynchronous calibration call.

Public Member Functions

Type Name Description
  Calibration (System & system) Constructor. Creates the plugin for a specific System.
  ~Calibration () Destructor (internal use only).
  Calibration (const Calibration &)=delete Copy constructor (object is not copyable).
void calibrate_gyro_async (calibration_callback_t callback) Perform gyro calibration (asynchronous call).
void calibrate_accelerometer_async (calibration_callback_t callback) Perform accelerometer calibration (asynchronous call).
void calibrate_magnetometer_async (calibration_callback_t callback) Perform magnetometer calibration (asynchronous call).
void calibrate_gimbal_accelerometer_async (calibration_callback_t callback) Perform gimbal accelerometer calibration (asynchronous call).
const Calibration & operator= (const Calibration &)=delete Equality operator (object is not copyable).

Static Public Member Functions

Type Name Description
const char * result_str (Result result) Returns a human-readable English string for Calibration::Result.

Constructor & Destructor Documentation

Calibration()

dronecode_sdk::Calibration::Calibration(System &system)

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto calibration = std::make_shared<Calibration>(system);

Parameters

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

~Calibration()

dronecode_sdk::Calibration::~Calibration()

Destructor (internal use only).

Calibration()

dronecode_sdk::Calibration::Calibration(const Calibration &)=delete

Copy constructor (object is not copyable).

Parameters

Member Typdef Documentation

typedef calibration_callback_t

typedef std::function<void(Result result, float progress, const std::string &text)> dronecode_sdk::Calibration::calibration_callback_t

Callback type for asynchronous calibration call.

Member Enumeration Documentation

enum Result

Possible results returned for camera commands.

Value Description
UNKNOWN
SUCCESS
IN_PROGRESS
INSTRUCTION
FAILED
NO_SYSTEM
CONNECTION_ERROR
BUSY
COMMAND_DENIED
TIMEOUT
CANCELLED

Member Function Documentation

calibrate_gyro_async()

void dronecode_sdk::Calibration::calibrate_gyro_async(calibration_callback_t callback)

Perform gyro calibration (asynchronous call).

Parameters

calibrate_accelerometer_async()

void dronecode_sdk::Calibration::calibrate_accelerometer_async(calibration_callback_t callback)

Perform accelerometer calibration (asynchronous call).

Parameters

calibrate_magnetometer_async()

void dronecode_sdk::Calibration::calibrate_magnetometer_async(calibration_callback_t callback)

Perform magnetometer calibration (asynchronous call).

Parameters

calibrate_gimbal_accelerometer_async()

void dronecode_sdk::Calibration::calibrate_gimbal_accelerometer_async(calibration_callback_t callback)

Perform gimbal accelerometer calibration (asynchronous call).

Parameters

operator=()

const Calibration& dronecode_sdk::Calibration::operator=(const Calibration &)=delete

Equality operator (object is not copyable).

Parameters

Returns

 const Calibration & -

result_str()

static const char* dronecode_sdk::Calibration::result_str(Result result)

Returns a human-readable English string for Calibration::Result.

Parameters

  • Result result - The enum value for which a human readable string is required.

Returns

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

© Dronecode 2017. License: CC BY 4.0            Updated: 2018-09-20 23:28:43

results matching ""

    No results matching ""