PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Public Member Functions | |
AttitudeEstimatorQ () | |
~AttitudeEstimatorQ () override=default | |
void | Run () override |
bool | init () |
Static Public Member Functions | |
static int | task_spawn (int argc, char *argv[]) |
static int | custom_command (int argc, char *argv[]) |
static int | print_usage (const char *reason=nullptr) |
Private Member Functions | |
void | update_parameters (bool force=false) |
bool | init_attq () |
bool | update (float dt) |
void | update_mag_declination (float new_declination) |
Private Attributes | |
const float | _eo_max_std_dev = 100.0f |
Maximum permissible standard deviation for estimated orientation. More... | |
const float | _dt_min = 0.00001f |
const float | _dt_max = 0.02f |
uORB::SubscriptionCallbackWorkItem | _sensors_sub {this, ORB_ID(sensor_combined)} |
uORB::Subscription | _parameter_update_sub {ORB_ID(parameter_update)} |
uORB::Subscription | _global_pos_sub {ORB_ID(vehicle_global_position)} |
uORB::Subscription | _vision_odom_sub {ORB_ID(vehicle_visual_odometry)} |
uORB::Subscription | _mocap_odom_sub {ORB_ID(vehicle_mocap_odometry)} |
uORB::Subscription | _magnetometer_sub {ORB_ID(vehicle_magnetometer)} |
uORB::Publication< vehicle_attitude_s > | _att_pub {ORB_ID(vehicle_attitude)} |
float | _mag_decl {0.0f} |
float | _bias_max {0.0f} |
Vector3f | _gyro |
Vector3f | _accel |
Vector3f | _mag |
Vector3f | _vision_hdg |
Vector3f | _mocap_hdg |
Quatf | _q |
Vector3f | _rates |
Vector3f | _gyro_bias |
Vector3f | _vel_prev |
hrt_abstime | _vel_prev_t {0} |
Vector3f | _pos_acc |
hrt_abstime | _last_time {0} |
bool | _inited {false} |
bool | _data_good {false} |
bool | _ext_hdg_good {false} |
Definition at line 72 of file attitude_estimator_q_main.cpp.
AttitudeEstimatorQ::AttitudeEstimatorQ | ( | ) |
Definition at line 157 of file attitude_estimator_q_main.cpp.
References _accel, _gyro, _gyro_bias, _mag, _mocap_hdg, _pos_acc, _q, _rates, _vel_prev, _vision_hdg, and update_parameters().
Referenced by task_spawn().
|
overridedefault |
|
static |
Definition at line 551 of file attitude_estimator_q_main.cpp.
References print_usage().
bool AttitudeEstimatorQ::init | ( | ) |
Definition at line 179 of file attitude_estimator_q_main.cpp.
References _sensors_sub, and uORB::SubscriptionCallback::registerCallback().
Referenced by task_spawn().
|
private |
Definition at line 381 of file attitude_estimator_q_main.cpp.
References _accel, _inited, _mag, _mag_decl, _q, f(), and matrix::Matrix< Type, M, N >::row().
Referenced by update().
|
static |
Definition at line 581 of file attitude_estimator_q_main.cpp.
Referenced by custom_command().
|
override |
Definition at line 190 of file attitude_estimator_q_main.cpp.
References _accel, _att_pub, _data_good, _dt_max, _dt_min, _eo_max_std_dev, _ext_hdg_good, _global_pos_sub, _gyro, _inited, _last_time, _mag, _magnetometer_sub, _mocap_hdg, _mocap_odom_sub, _pos_acc, _q, _sensors_sub, _vel_prev, _vel_prev_t, _vision_hdg, _vision_odom_sub, sensor_combined_s::accelerometer_m_s2, sensor_combined_s::accelerometer_timestamp_relative, math::constrain(), uORB::Subscription::copy(), dt, vehicle_global_position_s::eph, f(), get_mag_declination(), sensor_combined_s::gyro_rad, hrt_absolute_time(), hrt_abstime, hrt_elapsed_time(), vehicle_global_position_s::lat, vehicle_global_position_s::lon, vehicle_magnetometer_s::magnetometer_ga, vehicle_odometry_s::pose_covariance, uORB::Publication< T >::publish(), vehicle_attitude_s::q, vehicle_odometry_s::q, math::radians(), vehicle_attitude_s::timestamp, vehicle_global_position_s::timestamp, sensor_combined_s::timestamp, vehicle_odometry_s::timestamp, uORB::SubscriptionCallback::unregisterCallback(), uORB::SubscriptionInterval::update(), update(), update_mag_declination(), update_parameters(), uORB::Subscription::updated(), vehicle_global_position_s::vel_d, vehicle_global_position_s::vel_e, and vehicle_global_position_s::vel_n.
|
static |
Definition at line 557 of file attitude_estimator_q_main.cpp.
References AttitudeEstimatorQ(), init(), and ll40ls::instance.
|
private |
Definition at line 423 of file attitude_estimator_q_main.cpp.
References _accel, _bias_max, _data_good, _ext_hdg_good, _gyro, _gyro_bias, _inited, _mag, _mag_decl, _mocap_hdg, _pos_acc, _q, _rates, _vision_hdg, CONSTANTS_ONE_G, math::constrain(), dt, f(), init_attq(), math::min(), and matrix::wrap_pi().
Referenced by Run().
|
private |
Definition at line 536 of file attitude_estimator_q_main.cpp.
References _inited, _mag_decl, _q, and f().
Referenced by Run(), and update_parameters().
|
private |
Definition at line 353 of file attitude_estimator_q_main.cpp.
References _mag, _parameter_update_sub, uORB::Subscription::copy(), f(), FLT_EPSILON, math::radians(), update_mag_declination(), and uORB::Subscription::updated().
Referenced by AttitudeEstimatorQ(), and Run().
|
private |
Definition at line 122 of file attitude_estimator_q_main.cpp.
Referenced by AttitudeEstimatorQ(), init_attq(), Run(), and update().
|
private |
Definition at line 116 of file attitude_estimator_q_main.cpp.
Referenced by Run().
|
private |
Definition at line 119 of file attitude_estimator_q_main.cpp.
Referenced by update().
|
private |
Definition at line 140 of file attitude_estimator_q_main.cpp.
|
private |
Definition at line 106 of file attitude_estimator_q_main.cpp.
Referenced by Run().
|
private |
Definition at line 105 of file attitude_estimator_q_main.cpp.
Referenced by Run().
|
private |
Maximum permissible standard deviation for estimated orientation.
Definition at line 104 of file attitude_estimator_q_main.cpp.
Referenced by Run().
|
private |
Definition at line 141 of file attitude_estimator_q_main.cpp.
|
private |
Definition at line 111 of file attitude_estimator_q_main.cpp.
Referenced by Run().
|
private |
Definition at line 121 of file attitude_estimator_q_main.cpp.
Referenced by AttitudeEstimatorQ(), Run(), and update().
|
private |
Definition at line 130 of file attitude_estimator_q_main.cpp.
Referenced by AttitudeEstimatorQ(), and update().
|
private |
Definition at line 139 of file attitude_estimator_q_main.cpp.
Referenced by init_attq(), Run(), update(), and update_mag_declination().
|
private |
Definition at line 137 of file attitude_estimator_q_main.cpp.
Referenced by Run().
|
private |
Definition at line 123 of file attitude_estimator_q_main.cpp.
Referenced by AttitudeEstimatorQ(), init_attq(), Run(), update(), and update_parameters().
|
private |
Definition at line 118 of file attitude_estimator_q_main.cpp.
Referenced by init_attq(), update(), and update_mag_declination().
|
private |
Definition at line 114 of file attitude_estimator_q_main.cpp.
Referenced by Run().
|
private |
Definition at line 126 of file attitude_estimator_q_main.cpp.
Referenced by AttitudeEstimatorQ(), Run(), and update().
|
private |
Definition at line 113 of file attitude_estimator_q_main.cpp.
Referenced by Run().
|
private |
Definition at line 110 of file attitude_estimator_q_main.cpp.
Referenced by update_parameters().
|
private |
Definition at line 135 of file attitude_estimator_q_main.cpp.
Referenced by AttitudeEstimatorQ(), Run(), and update().
|
private |
Definition at line 128 of file attitude_estimator_q_main.cpp.
Referenced by AttitudeEstimatorQ(), init_attq(), Run(), update(), and update_mag_declination().
|
private |
Definition at line 129 of file attitude_estimator_q_main.cpp.
Referenced by AttitudeEstimatorQ(), and update().
|
private |
Definition at line 108 of file attitude_estimator_q_main.cpp.
|
private |
Definition at line 132 of file attitude_estimator_q_main.cpp.
Referenced by AttitudeEstimatorQ(), and Run().
|
private |
Definition at line 133 of file attitude_estimator_q_main.cpp.
Referenced by Run().
|
private |
Definition at line 125 of file attitude_estimator_q_main.cpp.
Referenced by AttitudeEstimatorQ(), Run(), and update().
|
private |
Definition at line 112 of file attitude_estimator_q_main.cpp.
Referenced by Run().