Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_attitude_rc_setpoint.h File Reference

Read an attitude setpoint from the RC. More...

#include "std.h"
#include "generated/airframe.h"
#include "math/pprz_algebra_int.h"
#include "math/pprz_algebra_float.h"
#include "subsystems/radio_control.h"
#include "state.h"
+ Include dependency graph for stabilization_attitude_rc_setpoint.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ROLL_DEADBAND_EXCEEDED()   (TRUE)
 
#define PITCH_DEADBAND_EXCEEDED()   (TRUE)
 
#define YAW_DEADBAND_EXCEEDED()
 

Functions

void stabilization_attitude_reset_care_free_heading (void)
 reset the heading for care-free mode to current heading More...
 
int32_t stabilization_attitude_get_heading_i (void)
 
float stabilization_attitude_get_heading_f (void)
 
void stabilization_attitude_read_rc_setpoint_eulers (struct Int32Eulers *sp, bool_t in_flight)
 Read attitude setpoint from RC as euler angles. More...
 
void stabilization_attitude_read_rc_setpoint_eulers_f (struct FloatEulers *sp, bool_t in_flight)
 
void stabilization_attitude_read_rc_roll_pitch_quat_f (struct FloatQuat *q)
 Read roll/pitch command from RC as quaternion. More...
 
void stabilization_attitude_read_rc_roll_pitch_earth_quat_f (struct FloatQuat *q)
 Read roll/pitch command from RC as quaternion. More...
 
void stabilization_attitude_read_rc_setpoint_quat_f (struct FloatQuat *q_sp, bool_t in_flight)
 
void stabilization_attitude_read_rc_setpoint_quat_earth_bound_f (struct FloatQuat *q_sp, bool_t in_flight)
 

Detailed Description

Read an attitude setpoint from the RC.

Definition in file stabilization_attitude_rc_setpoint.h.

Macro Definition Documentation

#define PITCH_DEADBAND_EXCEEDED ( )    (TRUE)

Definition at line 51 of file stabilization_attitude_rc_setpoint.h.

#define ROLL_DEADBAND_EXCEEDED ( )    (TRUE)

Definition at line 43 of file stabilization_attitude_rc_setpoint.h.

#define YAW_DEADBAND_EXCEEDED ( )
Value:
(radio_control.values[RADIO_YAW] > STABILIZATION_ATTITUDE_DEADBAND_R || \
radio_control.values[RADIO_YAW] < -STABILIZATION_ATTITUDE_DEADBAND_R)
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
Definition: radio_control.h:55
struct RadioControl radio_control
Definition: radio_control.c:25
#define RADIO_YAW
Definition: spektrum_arch.h:41

Definition at line 54 of file stabilization_attitude_rc_setpoint.h.

Referenced by stabilization_attitude_read_rc_setpoint_eulers(), and stabilization_attitude_read_rc_setpoint_eulers_f().

Function Documentation

float stabilization_attitude_get_heading_f ( void  )

Definition at line 66 of file stabilization_attitude_rc_setpoint.c.

References heading, FloatEulers::phi, FloatEulers::psi, stateGetNedToBodyEulers_f(), and FloatEulers::theta.

Referenced by stabilization_attitude_enter(), stabilization_attitude_read_rc_setpoint_eulers_f(), and stabilization_attitude_set_failsafe_setpoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int32_t stabilization_attitude_get_heading_i ( void  )
void stabilization_attitude_read_rc_roll_pitch_earth_quat_f ( struct FloatQuat q)

Read roll/pitch command from RC as quaternion.

Both angles are are interpreted relative to to the horizontal plane (earth bound).

Parameters
[out]qquaternion representing the RC roll/pitch input

Definition at line 239 of file stabilization_attitude_rc_setpoint.c.

References ANGLE_FLOAT_OF_BFP, MAX_PPRZ, FloatQuat::qi, FloatQuat::qx, FloatQuat::qy, FloatQuat::qz, radio_control, RADIO_PITCH, RADIO_ROLL, transition_theta_offset, and RadioControl::values.

Referenced by stabilization_attitude_read_rc_setpoint_quat_earth_bound_f().

+ Here is the caller graph for this function:

void stabilization_attitude_read_rc_roll_pitch_quat_f ( struct FloatQuat q)

Read roll/pitch command from RC as quaternion.

Interprets the stick positions as axes.

Parameters
[out]qquaternion representing the RC roll/pitch input

Definition at line 223 of file stabilization_attitude_rc_setpoint.c.

References MAX_PPRZ, FloatQuat::qi, FloatQuat::qx, FloatQuat::qy, FloatQuat::qz, radio_control, RADIO_PITCH, RADIO_ROLL, SQUARE, and RadioControl::values.

Referenced by stabilization_attitude_read_rc_setpoint_quat_f().

+ Here is the caller graph for this function:

void stabilization_attitude_read_rc_setpoint_eulers ( struct Int32Eulers sp,
bool_t  in_flight 
)
void stabilization_attitude_read_rc_setpoint_quat_earth_bound_f ( struct FloatQuat q_sp,
bool_t  in_flight 
)
void stabilization_attitude_reset_care_free_heading ( void  )

reset the heading for care-free mode to current heading

Definition at line 41 of file stabilization_attitude_rc_setpoint.c.

References care_free_heading, FloatEulers::psi, and stateGetNedToBodyEulers_f().

Referenced by guidance_h_mode_changed().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: