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

#include <WeatherVane.hpp>

Inheritance diagram for WeatherVane:
Collaboration diagram for WeatherVane:

Public Member Functions

 WeatherVane ()
 
 ~WeatherVane ()=default
 
void activate ()
 
void deactivate ()
 
bool is_active ()
 
bool weathervane_enabled ()
 
void update (const matrix::Vector3f &dcm_z_sp_prev, float yaw)
 
float get_weathervane_yawrate ()
 
void update_parameters ()
 

Private Attributes

matrix::Vector3f _dcm_z_sp_prev
 previous attitude setpoint body z axis More...
 
float _yaw = 0.0f
 current yaw angle More...
 
bool _is_active = true
 

Detailed Description

Definition at line 48 of file WeatherVane.hpp.

Constructor & Destructor Documentation

◆ WeatherVane()

WeatherVane::WeatherVane ( )

Definition at line 44 of file WeatherVane.cpp.

◆ ~WeatherVane()

WeatherVane::~WeatherVane ( )
default

Member Function Documentation

◆ activate()

void WeatherVane::activate ( )
inline

Definition at line 55 of file WeatherVane.hpp.

References _is_active.

Referenced by FlightTaskAuto::_evaluateTriplets(), and MulticopterPositionControl::Run().

Here is the caller graph for this function:

◆ deactivate()

void WeatherVane::deactivate ( )
inline

Definition at line 57 of file WeatherVane.hpp.

References _is_active.

Referenced by FlightTaskAuto::_evaluateTriplets(), and MulticopterPositionControl::Run().

Here is the caller graph for this function:

◆ get_weathervane_yawrate()

float WeatherVane::get_weathervane_yawrate ( )

Definition at line 54 of file WeatherVane.cpp.

References _dcm_z_sp_prev, _yaw, math::constrain(), f(), matrix::Vector< Type, M >::normalize(), and math::radians().

Referenced by FlightTaskAuto::_evaluateTriplets(), FlightTaskManualPosition::_updateSetpoints(), and weathervane_enabled().

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

◆ is_active()

bool WeatherVane::is_active ( )
inline

Definition at line 59 of file WeatherVane.hpp.

References _is_active.

Referenced by FlightTaskAuto::_evaluateTriplets(), and FlightTaskManualPosition::_updateSetpoints().

Here is the caller graph for this function:

◆ update()

void WeatherVane::update ( const matrix::Vector3f dcm_z_sp_prev,
float  yaw 
)

Definition at line 48 of file WeatherVane.cpp.

References _dcm_z_sp_prev, and _yaw.

Referenced by MulticopterPositionControl::Run(), and weathervane_enabled().

Here is the caller graph for this function:

◆ update_parameters()

void WeatherVane::update_parameters ( )
inline

Definition at line 67 of file WeatherVane.hpp.

Referenced by MulticopterPositionControl::parameters_update().

Here is the caller graph for this function:

◆ weathervane_enabled()

bool WeatherVane::weathervane_enabled ( )
inline

Definition at line 61 of file WeatherVane.hpp.

References get_weathervane_yawrate(), and update().

Referenced by MulticopterPositionControl::Run().

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

Member Data Documentation

◆ _dcm_z_sp_prev

matrix::Vector3f WeatherVane::_dcm_z_sp_prev
private

previous attitude setpoint body z axis

Definition at line 70 of file WeatherVane.hpp.

Referenced by get_weathervane_yawrate(), and update().

◆ _is_active

bool WeatherVane::_is_active = true
private

Definition at line 73 of file WeatherVane.hpp.

Referenced by activate(), deactivate(), and is_active().

◆ _yaw

float WeatherVane::_yaw = 0.0f
private

current yaw angle

Definition at line 71 of file WeatherVane.hpp.

Referenced by get_weathervane_yawrate(), and update().


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