MAV'RIC
|
Simulated dynamics of a quadcopter in diag configuration. More...
#include <dynamic_model_quad_diag.hpp>
Public Member Functions | |
Dynamic_model_quad_diag (Servo &servo_rear_left, Servo &servo_front_left, Servo &servo_front_right, Servo &servo_rear_right, dynamic_model_quad_diag_conf_t config=dynamic_model_quad_diag_default_config()) | |
Constructor. | |
bool | update (void) |
Main update function Reads new values from sensor. | |
const float & | last_update_us (void) const |
Get last update time in microseconds. | |
const std::array< float, 3 > & | acceleration_bf (void) const |
Get X, Y and Z components of acceleration in body frame in m/s^2. | |
const std::array< float, 3 > & | velocity_lf (void) const |
Get X, Y and Z components of velocity in local frame. | |
const local_position_t & | position_lf (void) const |
Get X, Y and Z position in local frame (centered on home) | |
const global_position_t & | position_gf (void) const |
Get X, Y and Z position in global frame. | |
const std::array< float, 3 > & | angular_velocity_bf (void) const |
Get X, Y and Z components of angular velocity in body frame. | |
const quat_t & | attitude (void) const |
Get attitude quaternion. |
Simulated dynamics of a quadcopter in diag configuration.
Dynamic_model_quad_diag::Dynamic_model_quad_diag | ( | Servo & | servo_rear_left, |
Servo & | servo_front_left, | ||
Servo & | servo_front_right, | ||
Servo & | servo_rear_right, | ||
dynamic_model_quad_diag_conf_t | config = dynamic_model_quad_diag_default_config() |
||
) |
Constructor.
servo_rear_left | Reference to rear left servo, |
servo_front_left | Reference to front left servo |
servo_front_right | Reference to front right servo |
servo_rear_right | Reference to rear right servo |
config | Configuration |
const std::array< float, 3 > & Dynamic_model_quad_diag::acceleration_bf | ( | void | ) | const [virtual] |
Get X, Y and Z components of acceleration in body frame in m/s^2.
Implements Dynamic_model.
const std::array< float, 3 > & Dynamic_model_quad_diag::angular_velocity_bf | ( | void | ) | const [virtual] |
Get X, Y and Z components of angular velocity in body frame.
Implements Dynamic_model.
const quat_t & Dynamic_model_quad_diag::attitude | ( | void | ) | const [virtual] |
const float & Dynamic_model_quad_diag::last_update_us | ( | void | ) | const [virtual] |
const global_position_t & Dynamic_model_quad_diag::position_gf | ( | void | ) | const [virtual] |
const local_position_t & Dynamic_model_quad_diag::position_lf | ( | void | ) | const [virtual] |
bool Dynamic_model_quad_diag::update | ( | void | ) | [virtual] |
Main update function Reads new values from sensor.
Implements Dynamic_model.
const std::array< float, 3 > & Dynamic_model_quad_diag::velocity_lf | ( | void | ) | const [virtual] |