PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <mavlink_high_latency2.h>
Classes | |
struct | PerBatteryData |
Public Member Functions | |
const char * | get_name () const |
uint16_t | get_id () |
unsigned | get_size () |
Get maximal total messages size on update. More... | |
bool | const_rate () |
Public Member Functions inherited from MavlinkStream | |
MavlinkStream (Mavlink *mavlink) | |
virtual | ~MavlinkStream ()=default |
MavlinkStream (const MavlinkStream &)=delete | |
MavlinkStream & | operator= (const MavlinkStream &)=delete |
MavlinkStream (MavlinkStream &&)=delete | |
MavlinkStream & | operator= (MavlinkStream &&)=delete |
void | set_interval (const int interval) |
Get the interval. More... | |
int | get_interval () |
Get the interval. More... | |
int | update (const hrt_abstime &t) |
Update subscriptions and send message if necessary. More... | |
virtual unsigned | get_size_avg () |
Get the average message size. More... | |
bool | first_message_sent () const |
void | reset_last_sent () |
Reset the time of last sent to 0. More... | |
Public Member Functions inherited from ListNode< MavlinkStream *> | |
void | setSibling (MavlinkStream * sibling) |
const MavlinkStream * | getSibling () const |
Static Public Member Functions | |
static const char * | get_name_static () |
static uint16_t | get_id_static () |
static MavlinkStream * | new_instance (Mavlink *mavlink) |
Protected Member Functions | |
MavlinkStreamHighLatency2 (Mavlink *mavlink) | |
bool | send (const hrt_abstime t) |
void | reset_analysers (const hrt_abstime t) |
bool | write_airspeed (mavlink_high_latency2_t *msg) |
bool | write_attitude_sp (mavlink_high_latency2_t *msg) |
bool | write_battery_status (mavlink_high_latency2_t *msg) |
bool | write_estimator_status (mavlink_high_latency2_t *msg) |
bool | write_fw_ctrl_status (mavlink_high_latency2_t *msg) |
bool | write_geofence_result (mavlink_high_latency2_t *msg) |
bool | write_global_position (mavlink_high_latency2_t *msg) |
bool | write_mission_result (mavlink_high_latency2_t *msg) |
bool | write_tecs_status (mavlink_high_latency2_t *msg) |
bool | write_vehicle_status (mavlink_high_latency2_t *msg) |
bool | write_vehicle_status_flags (mavlink_high_latency2_t *msg) |
bool | write_wind_estimate (mavlink_high_latency2_t *msg) |
void | update_data () |
Function to collect/update data for the streams at a high rate independant of actual stream rate. More... | |
void | update_airspeed () |
void | update_tecs_status () |
void | update_battery_status () |
void | update_global_position () |
void | update_gps () |
void | update_vehicle_status () |
void | update_wind_estimate () |
void | set_default_values (mavlink_high_latency2_t &msg) const |
Private Member Functions | |
MavlinkStreamHighLatency2 (MavlinkStreamHighLatency2 &) | |
MavlinkStreamHighLatency2 & | operator= (const MavlinkStreamHighLatency2 &) |
Additional Inherited Members | |
Protected Attributes inherited from MavlinkStream | |
Mavlink *const | _mavlink |
int | _interval {1000000} |
if set to negative value = unlimited rate More... | |
Protected Attributes inherited from ListNode< MavlinkStream *> | |
MavlinkStream * | _list_node_sibling |
Definition at line 47 of file mavlink_high_latency2.h.
|
private |
|
explicitprotected |
Definition at line 64 of file mavlink_high_latency2.cpp.
References _batteries, MavlinkStream::_mavlink, Mavlink::add_orb_subscription(), ORB_ID, ORB_MULTI_MAX_INSTANCES, MavlinkStream::reset_last_sent(), and MavlinkStreamHighLatency2::PerBatteryData::subscription.
|
inlinevirtual |
Reimplemented from MavlinkStream.
Definition at line 80 of file mavlink_high_latency2.h.
|
inlinevirtual |
Implements MavlinkStream.
Definition at line 65 of file mavlink_high_latency2.h.
References get_id_static().
|
inlinestatic |
Definition at line 60 of file mavlink_high_latency2.h.
Referenced by get_id().
|
inlinevirtual |
Implements MavlinkStream.
Definition at line 50 of file mavlink_high_latency2.h.
References get_name_static().
|
inlinestatic |
Definition at line 55 of file mavlink_high_latency2.h.
Referenced by get_name().
|
inlinevirtual |
Get maximal total messages size on update.
Implements MavlinkStream.
Definition at line 75 of file mavlink_high_latency2.h.
|
inlinestatic |
Definition at line 70 of file mavlink_high_latency2.h.
References MavlinkStreamHighLatency2().
|
private |
|
protected |
Definition at line 227 of file mavlink_high_latency2.cpp.
References _airspeed, _airspeed_sp, _batteries, _climb_rate, _eph, _epv, _groundspeed, _last_reset_time, _temperature, _throttle, _windspeed, MavlinkStreamHighLatency2::PerBatteryData::analyzer, ORB_MULTI_MAX_INSTANCES, and SimpleAnalyzer::reset().
Referenced by send().
|
protectedvirtual |
Implements MavlinkStream.
Definition at line 111 of file mavlink_high_latency2.cpp.
References _airspeed, _airspeed_sp, _batteries, _climb_rate, _eph, _epv, _groundspeed, _last_reset_time, MavlinkStream::_mavlink, _temperature, _throttle, _windspeed, MavlinkStreamHighLatency2::PerBatteryData::analyzer, MavlinkStreamHighLatency2::PerBatteryData::connected, f(), Mavlink::get_channel(), SimpleAnalyzer::get_scaled(), Mavlink::get_system_type(), msg, ORB_MULTI_MAX_INSTANCES, reset_analysers(), set_default_values(), Mavlink::should_transmit(), SimpleAnalyzer::valid(), write_airspeed(), write_attitude_sp(), write_battery_status(), write_estimator_status(), write_fw_ctrl_status(), write_geofence_result(), write_global_position(), write_mission_result(), write_tecs_status(), write_vehicle_status(), write_vehicle_status_flags(), and write_wind_estimate().
|
protected |
Definition at line 602 of file mavlink_high_latency2.cpp.
Referenced by send().
|
protected |
Definition at line 515 of file mavlink_high_latency2.cpp.
References _airspeed, _airspeed_sub, _temperature, _update_rate_filtered, SimpleAnalyzer::add_value(), airspeed_s::air_temperature_celsius, airspeed_s::indicated_airspeed_m_s, and MavlinkOrbSubscription::update().
Referenced by update_data().
|
protected |
Definition at line 534 of file mavlink_high_latency2.cpp.
References _batteries, _update_rate_filtered, SimpleAnalyzer::add_value(), MavlinkStreamHighLatency2::PerBatteryData::analyzer, battery_status_s::connected, MavlinkStreamHighLatency2::PerBatteryData::connected, ORB_MULTI_MAX_INSTANCES, and battery_status_s::remaining.
Referenced by update_data().
|
protectedvirtual |
Function to collect/update data for the streams at a high rate independant of actual stream rate.
This function is called at every iteration of the mavlink module.
Reimplemented from MavlinkStream.
Definition at line 490 of file mavlink_high_latency2.cpp.
References _last_update_time, _update_rate_filtered, f(), hrt_absolute_time(), hrt_abstime, update_airspeed(), update_battery_status(), update_global_position(), update_gps(), update_tecs_status(), update_vehicle_status(), and update_wind_estimate().
|
protected |
Definition at line 546 of file mavlink_high_latency2.cpp.
References _climb_rate, _global_pos_sub, _groundspeed, _update_rate_filtered, SimpleAnalyzer::add_value(), MavlinkOrbSubscription::update(), vehicle_global_position_s::vel_d, vehicle_global_position_s::vel_e, and vehicle_global_position_s::vel_n.
Referenced by update_data().
|
protected |
Definition at line 557 of file mavlink_high_latency2.cpp.
References _eph, _epv, _gps_sub, _update_rate_filtered, SimpleAnalyzer::add_value(), vehicle_gps_position_s::eph, vehicle_gps_position_s::epv, gps, and MavlinkOrbSubscription::update().
Referenced by update_data().
|
protected |
Definition at line 525 of file mavlink_high_latency2.cpp.
References _airspeed_sp, _tecs_status_sub, _update_rate_filtered, SimpleAnalyzer::add_value(), tecs_status_s::airspeed_sp, and MavlinkOrbSubscription::update().
Referenced by update_data().
|
protected |
Definition at line 567 of file mavlink_high_latency2.cpp.
References _actuator_sub_0, _actuator_sub_1, _status_sub, _throttle, _update_rate_filtered, SimpleAnalyzer::add_value(), vehicle_status_s::arming_state, actuator_controls_s::control, f(), vehicle_status_s::is_vtol, status, MavlinkOrbSubscription::update(), vehicle_status_s::vehicle_type, and VEHICLE_TYPE_FIXED_WING.
Referenced by update_data().
|
protected |
Definition at line 592 of file mavlink_high_latency2.cpp.
References _update_rate_filtered, _wind_sub, _windspeed, SimpleAnalyzer::add_value(), MavlinkOrbSubscription::update(), wind_estimate_s::windspeed_east, and wind_estimate_s::windspeed_north.
Referenced by update_data().
|
protected |
Definition at line 248 of file mavlink_high_latency2.cpp.
References _airspeed_sub, _airspeed_time, airspeed_s::confidence, and MavlinkOrbSubscription::update().
Referenced by send().
|
protected |
Definition at line 263 of file mavlink_high_latency2.cpp.
References _attitude_sp_sub, _attitude_sp_time, math::degrees(), MavlinkOrbSubscription::update(), matrix::wrap_2pi(), and vehicle_attitude_setpoint_s::yaw_body.
Referenced by send().
|
protected |
Definition at line 276 of file mavlink_high_latency2.cpp.
References _batteries, battery_status_s::connected, MavlinkStreamHighLatency2::PerBatteryData::connected, ORB_MULTI_MAX_INSTANCES, MavlinkStreamHighLatency2::PerBatteryData::timestamp, and battery_status_s::warning.
Referenced by send().
|
protected |
Definition at line 295 of file mavlink_high_latency2.cpp.
References _estimator_status_sub, _estimator_status_time, estimator_status_s::filter_fault_flags, estimator_status_s::gps_check_fail_flags, estimator_status_s::innovation_check_flags, and MavlinkOrbSubscription::update().
Referenced by send().
|
protected |
Definition at line 312 of file mavlink_high_latency2.cpp.
References _pos_ctrl_status_sub, _pos_ctrl_status_time, convert_limit_safe(), MavlinkOrbSubscription::update(), and position_controller_status_s::wp_dist.
Referenced by send().
|
protected |
Definition at line 327 of file mavlink_high_latency2.cpp.
References _geofence_sub, _geofence_time, geofence_result_s::geofence_violated, and MavlinkOrbSubscription::update().
Referenced by send().
|
protected |
Definition at line 342 of file mavlink_high_latency2.cpp.
References _global_pos_sub, _global_pos_time, vehicle_global_position_s::alt, convert_limit_safe(), math::degrees(), vehicle_global_position_s::lat, vehicle_global_position_s::lon, MavlinkOrbSubscription::update(), matrix::wrap_2pi(), and vehicle_global_position_s::yaw.
Referenced by send().
|
protected |
Definition at line 369 of file mavlink_high_latency2.cpp.
References _mission_result_sub, _mission_result_time, mission_result_s::seq_current, and MavlinkOrbSubscription::update().
Referenced by send().
|
protected |
Definition at line 382 of file mavlink_high_latency2.cpp.
References _tecs_status_sub, _tecs_time, tecs_status_s::altitude_sp, convert_limit_safe(), and MavlinkOrbSubscription::update().
Referenced by send().
|
protected |
Definition at line 397 of file mavlink_high_latency2.cpp.
References _status_sub, _status_time, px4_custom_mode::custom_mode_hl, vehicle_status_s::engine_failure, get_mavlink_navigation_mode(), vehicle_status_s::mission_failure, vehicle_status_s::onboard_control_sensors_enabled, vehicle_status_s::onboard_control_sensors_health, vehicle_status_s::rc_signal_lost, and MavlinkOrbSubscription::update().
Referenced by send().
|
protected |
Definition at line 457 of file mavlink_high_latency2.cpp.
References _status_flags_sub, _status_flags_time, vehicle_status_flags_s::condition_global_position_valid, vehicle_status_flags_s::offboard_control_signal_found_once, vehicle_status_flags_s::offboard_control_signal_lost, and MavlinkOrbSubscription::update().
Referenced by send().
|
protected |
Definition at line 476 of file mavlink_high_latency2.cpp.
References _wind_sub, _wind_time, math::degrees(), MavlinkOrbSubscription::update(), wind_estimate_s::windspeed_east, wind_estimate_s::windspeed_north, and matrix::wrap_2pi().
Referenced by send().
|
private |
Definition at line 95 of file mavlink_high_latency2.h.
Referenced by update_vehicle_status().
|
private |
Definition at line 98 of file mavlink_high_latency2.h.
Referenced by update_vehicle_status().
|
private |
Definition at line 96 of file mavlink_high_latency2.h.
|
private |
Definition at line 99 of file mavlink_high_latency2.h.
|
private |
Definition at line 137 of file mavlink_high_latency2.h.
Referenced by reset_analysers(), send(), and update_airspeed().
|
private |
Definition at line 138 of file mavlink_high_latency2.h.
Referenced by reset_analysers(), send(), and update_tecs_status().
|
private |
Definition at line 101 of file mavlink_high_latency2.h.
Referenced by update_airspeed(), and write_airspeed().
|
private |
Definition at line 102 of file mavlink_high_latency2.h.
Referenced by write_airspeed().
|
private |
Definition at line 104 of file mavlink_high_latency2.h.
Referenced by write_attitude_sp().
|
private |
Definition at line 105 of file mavlink_high_latency2.h.
Referenced by write_attitude_sp().
|
private |
Definition at line 151 of file mavlink_high_latency2.h.
Referenced by MavlinkStreamHighLatency2(), reset_analysers(), send(), update_battery_status(), and write_battery_status().
|
private |
Definition at line 139 of file mavlink_high_latency2.h.
Referenced by reset_analysers(), send(), and update_global_position().
|
private |
Definition at line 140 of file mavlink_high_latency2.h.
Referenced by reset_analysers(), send(), and update_gps().
|
private |
Definition at line 141 of file mavlink_high_latency2.h.
Referenced by reset_analysers(), send(), and update_gps().
|
private |
Definition at line 107 of file mavlink_high_latency2.h.
Referenced by write_estimator_status().
|
private |
Definition at line 108 of file mavlink_high_latency2.h.
Referenced by write_estimator_status().
|
private |
Definition at line 113 of file mavlink_high_latency2.h.
Referenced by write_geofence_result().
|
private |
Definition at line 114 of file mavlink_high_latency2.h.
Referenced by write_geofence_result().
|
private |
Definition at line 116 of file mavlink_high_latency2.h.
Referenced by update_global_position(), and write_global_position().
|
private |
Definition at line 117 of file mavlink_high_latency2.h.
Referenced by write_global_position().
|
private |
Definition at line 119 of file mavlink_high_latency2.h.
Referenced by update_gps().
|
private |
Definition at line 120 of file mavlink_high_latency2.h.
|
private |
Definition at line 142 of file mavlink_high_latency2.h.
Referenced by reset_analysers(), send(), and update_global_position().
|
private |
Definition at line 147 of file mavlink_high_latency2.h.
Referenced by reset_analysers(), and send().
|
private |
Definition at line 148 of file mavlink_high_latency2.h.
Referenced by update_data().
|
private |
Definition at line 122 of file mavlink_high_latency2.h.
Referenced by write_mission_result().
|
private |
Definition at line 123 of file mavlink_high_latency2.h.
Referenced by write_mission_result().
|
private |
Definition at line 110 of file mavlink_high_latency2.h.
Referenced by write_fw_ctrl_status().
|
private |
Definition at line 111 of file mavlink_high_latency2.h.
Referenced by write_fw_ctrl_status().
|
private |
Definition at line 128 of file mavlink_high_latency2.h.
Referenced by write_vehicle_status_flags().
|
private |
Definition at line 129 of file mavlink_high_latency2.h.
Referenced by write_vehicle_status_flags().
|
private |
Definition at line 125 of file mavlink_high_latency2.h.
Referenced by update_vehicle_status(), and write_vehicle_status().
|
private |
Definition at line 126 of file mavlink_high_latency2.h.
Referenced by write_vehicle_status().
|
private |
Definition at line 131 of file mavlink_high_latency2.h.
Referenced by update_tecs_status(), and write_tecs_status().
|
private |
Definition at line 132 of file mavlink_high_latency2.h.
Referenced by write_tecs_status().
|
private |
Definition at line 143 of file mavlink_high_latency2.h.
Referenced by reset_analysers(), send(), and update_airspeed().
|
private |
Definition at line 144 of file mavlink_high_latency2.h.
Referenced by reset_analysers(), send(), and update_vehicle_status().
|
private |
Definition at line 149 of file mavlink_high_latency2.h.
Referenced by update_airspeed(), update_battery_status(), update_data(), update_global_position(), update_gps(), update_tecs_status(), update_vehicle_status(), and update_wind_estimate().
|
private |
Definition at line 134 of file mavlink_high_latency2.h.
Referenced by update_wind_estimate(), and write_wind_estimate().
|
private |
Definition at line 135 of file mavlink_high_latency2.h.
Referenced by write_wind_estimate().
|
private |
Definition at line 145 of file mavlink_high_latency2.h.
Referenced by reset_analysers(), send(), and update_wind_estimate().