PX4 Firmware
PX4 Autopilot Software http://px4.io
FailureDetector Class Reference

#include <FailureDetector.hpp>

Inheritance diagram for FailureDetector:
Collaboration diagram for FailureDetector:

Public Member Functions

 FailureDetector (ModuleParams *parent)
 
bool update (const vehicle_status_s &vehicle_status)
 
uint8_t getStatus () const
 
bool isFailure () const
 

Private Member Functions

bool resetStatus ()
 
bool isAttitudeStabilized (const vehicle_status_s &vehicle_status)
 
bool updateAttitudeStatus ()
 

Private Attributes

DEFINE_PARAMETERS((ParamInt< px4::params::FD_FAIL_P >) _param_fd_fail_p,(ParamInt< px4::params::FD_FAIL_R >) _param_fd_fail_r,(ParamFloat< px4::params::FD_FAIL_R_TTRI >) _param_fd_fail_r_ttri,(ParamFloat< px4::params::FD_FAIL_P_TTRI >) _param_fd_fail_p_ttri) uORB uint8_t _status {FAILURE_NONE}
 
systemlib::Hysteresis _roll_failure_hysteresis {false}
 
systemlib::Hysteresis _pitch_failure_hysteresis {false}
 

Detailed Description

Definition at line 66 of file FailureDetector.hpp.

Constructor & Destructor Documentation

◆ FailureDetector()

FailureDetector::FailureDetector ( ModuleParams *  parent)

Definition at line 43 of file FailureDetector.cpp.

Member Function Documentation

◆ getStatus()

uint8_t FailureDetector::getStatus ( ) const
inline

Definition at line 73 of file FailureDetector.hpp.

References _status.

Referenced by Commander::run().

Here is the caller graph for this function:

◆ isAttitudeStabilized()

bool FailureDetector::isAttitudeStabilized ( const vehicle_status_s vehicle_status)
private

Definition at line 72 of file FailureDetector.cpp.

References vehicle_status_s::nav_state, vehicle_status_s::vehicle_type, and VEHICLE_TYPE_FIXED_WING.

Referenced by update().

Here is the caller graph for this function:

◆ isFailure()

bool FailureDetector::isFailure ( ) const
inline

Definition at line 74 of file FailureDetector.hpp.

References _status, FAILURE_NONE, and ORB_ID.

Referenced by Commander::run().

Here is the caller graph for this function:

◆ resetStatus()

bool FailureDetector::resetStatus ( )
private

Definition at line 48 of file FailureDetector.cpp.

References _status, and FAILURE_NONE.

Referenced by update().

Here is the caller graph for this function:

◆ update()

bool FailureDetector::update ( const vehicle_status_s vehicle_status)

Definition at line 57 of file FailureDetector.cpp.

References isAttitudeStabilized(), resetStatus(), and updateAttitudeStatus().

Referenced by Commander::run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateAttitudeStatus()

bool FailureDetector::updateAttitudeStatus ( )
private

Definition at line 92 of file FailureDetector.cpp.

References _pitch_failure_hysteresis, _roll_failure_hysteresis, _status, attitude, FAILURE_PITCH, FAILURE_ROLL, systemlib::Hysteresis::get_state(), hrt_absolute_time(), hrt_abstime, matrix::Euler< Type >::phi(), vehicle_attitude_s::q, math::radians(), systemlib::Hysteresis::set_hysteresis_time_from(), systemlib::Hysteresis::set_state_and_update(), and matrix::Euler< Type >::theta().

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _pitch_failure_hysteresis

systemlib::Hysteresis FailureDetector::_pitch_failure_hysteresis {false}
private

Definition at line 91 of file FailureDetector.hpp.

Referenced by updateAttitudeStatus().

◆ _roll_failure_hysteresis

systemlib::Hysteresis FailureDetector::_roll_failure_hysteresis {false}
private

Definition at line 90 of file FailureDetector.hpp.

Referenced by updateAttitudeStatus().

◆ _status

DEFINE_PARAMETERS ( (ParamInt<px4::params::FD_FAIL_P>) _param_fd_fail_p, (ParamInt<px4::params::FD_FAIL_R>) _param_fd_fail_r, (ParamFloat<px4::params::FD_FAIL_R_TTRI>) _param_fd_fail_r_ttri, (ParamFloat<px4::params::FD_FAIL_P_TTRI>) _param_fd_fail_p_ttri ) uORB uint8_t FailureDetector::_status {FAILURE_NONE}
private

Definition at line 88 of file FailureDetector.hpp.

Referenced by getStatus(), isFailure(), resetStatus(), and updateAttitudeStatus().


The documentation for this class was generated from the following files: