onboardsdk
|
Class representing a drone. More...
#include <Drone.hpp>
Public Member Functions | |
Drone (std::array< std::shared_ptr< imu::IImu >, 2 > imu, std::shared_ptr< pmu::IPMU > pmu, std::shared_ptr< tilt::ITiltControl > tilt_controller) | |
void | set_light (float intensity) |
Sets intensity of the drone lights. | |
void | set_indicator (blunux::pmu::IndicatorsSetpoint indicators) |
Enable/diable the indicators on the light board. | |
float | get_light () const |
Get the current light intensity. | |
float | get_depth (bool wait_for_data=true) const |
Get the depth. | |
float | get_water_temperature (bool wait_for_data=true) const |
Get the water temperature. | |
std::string | get_blunux_version () const |
Get the Blunux version. | |
std::string | get_model_name () const |
Get the model name. | |
blueye::protocol::Model | get_model () const |
Get the drone Model. | |
pmu::IndicatorsSetpoint | get_indicator () const |
Get the indicator status. | |
imu::ImuData | get_imu_raw (unsigned int n) const |
Get the raw IMU data of IMU. | |
imu::ImuData | get_imu () const |
Get the calibrated IMU data. | |
imu::ImuSelfTest | imu_self_test (unsigned int n) const |
Get the IMU self test result. | |
sensors::DepthSelfTestResult | depth_self_test () const |
Get the depth self test result. | |
std::optional< float > | get_battery_percentage (bool wait_for_data=true) const |
Get the battery percentage. | |
std::optional< std::string > | get_battery_type (bool wait_for_data=true) const |
Get the battery type. | |
void | add_pressure_callback (std::function< void(const Pressure &)> cb) |
void | add_temperature_callback (std::function< void(const Temperature &)> cb) |
void | add_error_callback (std::function< void(const DroneError &)> cb) |
std::shared_ptr< tilt::ITiltControl > | tilt () |
std::shared_ptr< observer::ICompassCalibration > | compass_calibration () |
std::shared_ptr< pmu::IPMUCallbacks > | pmu_callbacks () |
std::shared_ptr< observer::IObserverState > | observer_state () |
void | set_fluid_density (double density) |
Set the fluid density to change between saltwater and freshwater for the depth output. | |
double | get_fluid_density () const |
Get the fluid density. | |
blueye::protocol::PressureSensorType | get_depth_sensor_type () const |
Get the depth sensor type. | |
void | clear_callbacks () |
Protected Attributes | |
const std::array< std::shared_ptr< imu::IImu >, 2 > | imu |
const std::shared_ptr< pmu::IPMU > | pmu |
std::shared_ptr< observer::PioneerObserver > | observer |
Class representing a drone.
This class represents a drone and provides functionalities for controlling and monitoring the drone's behavior. It encapsulates various components and subsystems of the drone, such as the flight controller, sensors, and communication interfaces.
sensors::DepthSelfTestResult blunux::drone::Drone::depth_self_test | ( | ) | const |
Get the depth self test result.
std::optional< float > blunux::drone::Drone::get_battery_percentage | ( | bool | wait_for_data = true | ) | const |
Get the battery percentage.
wait_for_data | If true, wait for data from the PMU |
std::optional< std::string > blunux::drone::Drone::get_battery_type | ( | bool | wait_for_data = true | ) | const |
Get the battery type.
wait_for_data | If true, wait for data from the PMU |
std::string blunux::drone::Drone::get_blunux_version | ( | ) | const |
Get the Blunux version.
float blunux::drone::Drone::get_depth | ( | bool | wait_for_data = true | ) | const |
|
inline |
Get the depth sensor type.
|
inline |
Get the fluid density.
imu::ImuData blunux::drone::Drone::get_imu | ( | ) | const |
imu::ImuData blunux::drone::Drone::get_imu_raw | ( | unsigned int | n | ) | const |
pmu::IndicatorsSetpoint blunux::drone::Drone::get_indicator | ( | ) | const |
float blunux::drone::Drone::get_light | ( | ) | const |
blueye::protocol::Model blunux::drone::Drone::get_model | ( | ) | const |
Get the drone Model.
std::string blunux::drone::Drone::get_model_name | ( | ) | const |
Get the model name.
float blunux::drone::Drone::get_water_temperature | ( | bool | wait_for_data = true | ) | const |
Get the water temperature.
imu::ImuSelfTest blunux::drone::Drone::imu_self_test | ( | unsigned int | n | ) | const |
Get the IMU self test result.
n | IMU number |
|
inline |
Set the fluid density to change between saltwater and freshwater for the depth output.
density | Density in [g/L] |
void blunux::drone::Drone::set_indicator | ( | blunux::pmu::IndicatorsSetpoint | indicators | ) |
Enable/diable the indicators on the light board.
indicators | Indicator status |
void blunux::drone::Drone::set_light | ( | float | intensity | ) |
Sets intensity of the drone lights.
intensity | Light intensity [0..1] |