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
guidance_h.h File Reference

Horizontal guidance for rotorcrafts. More...

#include "math/pprz_algebra_int.h"
#include "firmwares/rotorcraft/guidance/guidance_h_ref.h"
#include "generated/airframe.h"
#include "std.h"
+ Include dependency graph for guidance_h.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GUIDANCE_H_USE_REF   TRUE
 Use horizontal guidance reference trajectory. More...
 
#define GUIDANCE_H_MODE_KILL   0
 
#define GUIDANCE_H_MODE_RATE   1
 
#define GUIDANCE_H_MODE_ATTITUDE   2
 
#define GUIDANCE_H_MODE_HOVER   3
 
#define GUIDANCE_H_MODE_NAV   4
 
#define GUIDANCE_H_MODE_RC_DIRECT   5
 
#define GUIDANCE_H_MODE_CARE_FREE   6
 
#define GUIDANCE_H_MODE_FORWARD   7
 
#define guidance_h_SetKi(_val)
 
#define guidance_h_SetUseRef(_val)
 

Functions

void guidance_h_init (void)
 
void guidance_h_mode_changed (uint8_t new_mode)
 
void guidance_h_read_rc (bool_t in_flight)
 
void guidance_h_run (bool_t in_flight)
 

Variables

uint8_t guidance_h_mode
 
bool_t guidance_h_use_ref
 
struct Int32Vect2 guidance_h_pos_sp
 horizontal position setpoint in NED. More...
 
struct Int32Vect2 guidance_h_pos_ref
 with INT32_POS_FRAC More...
 
struct Int32Vect2 guidance_h_speed_ref
 with INT32_SPEED_FRAC More...
 
struct Int32Vect2 guidance_h_accel_ref
 with INT32_ACCEL_FRAC More...
 
struct Int32Vect2 guidance_h_pos_err
 
struct Int32Vect2 guidance_h_speed_err
 
struct Int32Vect2 guidance_h_pos_err_sum
 
struct Int32Vect2 guidance_h_nav_err
 
struct Int32Eulers guidance_h_rc_sp
 with INT32_ANGLE_FRAC More...
 
struct Int32Vect2 guidance_h_command_earth
 
struct Int32Eulers guidance_h_command_body
 with INT32_ANGLE_FRAC More...
 
int32_t guidance_h_pgain
 
int32_t guidance_h_dgain
 
int32_t guidance_h_igain
 
int32_t guidance_h_again
 
int32_t transition_percentage
 
int32_t transition_theta_offset
 

Detailed Description

Horizontal guidance for rotorcrafts.

Definition in file guidance_h.h.

Macro Definition Documentation

#define GUIDANCE_H_MODE_ATTITUDE   2
#define GUIDANCE_H_MODE_FORWARD   7
#define GUIDANCE_H_MODE_HOVER   3
#define GUIDANCE_H_MODE_KILL   0

Definition at line 44 of file guidance_h.h.

Referenced by autopilot_set_mode(), and guidance_h_init().

#define GUIDANCE_H_MODE_NAV   4
#define GUIDANCE_H_MODE_RATE   1
#define GUIDANCE_H_MODE_RC_DIRECT   5
#define guidance_h_SetKi (   _val)
Value:
{ \
}
struct Int32Vect2 guidance_h_pos_err_sum
Definition: guidance_h.c:69
#define INT_VECT2_ZERO(_v)
int32_t guidance_h_igain
Definition: guidance_h.c:79

Definition at line 90 of file guidance_h.h.

#define guidance_h_SetUseRef (   _val)
Value:
{ \
}
bool_t guidance_h_use_ref
Definition: guidance_h.c:60
#define GUIDANCE_H_USE_REF
Use horizontal guidance reference trajectory.
Definition: guidance_h.h:41

Definition at line 98 of file guidance_h.h.

#define GUIDANCE_H_USE_REF   TRUE

Use horizontal guidance reference trajectory.

Default is TRUE, define to FALSE to always disable it.

Definition at line 41 of file guidance_h.h.

Referenced by guidance_h_init().

Function Documentation

void guidance_h_init ( void  )

Definition at line 93 of file guidance_h.c.

References GUIDANCE_H_AGAIN, GUIDANCE_H_MODE_KILL, GUIDANCE_H_USE_REF, INT_EULERS_ZERO, and INT_VECT2_ZERO.

Referenced by autopilot_init(), and main_init().

+ Here is the caller graph for this function:

Variable Documentation

int32_t guidance_h_again

Definition at line 80 of file guidance_h.c.

Referenced by guidance_h_traj_run().

struct Int32Eulers guidance_h_command_body

with INT32_ANGLE_FRAC

Definition at line 75 of file guidance_h.c.

Referenced by guidance_h_run(), and guidance_h_traj_run().

struct Int32Vect2 guidance_h_command_earth

Definition at line 73 of file guidance_h.c.

Referenced by guidance_h_traj_run().

int32_t guidance_h_dgain

Definition at line 78 of file guidance_h.c.

Referenced by guidance_h_traj_run().

int32_t guidance_h_igain

Definition at line 79 of file guidance_h.c.

Referenced by guidance_h_traj_run().

struct Int32Vect2 guidance_h_nav_err

Definition at line 70 of file guidance_h.c.

int32_t guidance_h_pgain

Definition at line 77 of file guidance_h.c.

Referenced by guidance_h_traj_run().

struct Int32Vect2 guidance_h_pos_err

Definition at line 67 of file guidance_h.c.

Referenced by guidance_h_traj_run().

struct Int32Vect2 guidance_h_pos_err_sum
struct Int32Vect2 guidance_h_pos_sp

horizontal position setpoint in NED.

fixed point representation: Q23.8 accuracy 0.0039, range 8388km

Definition at line 62 of file guidance_h.c.

Referenced by guidance_h_hover_enter(), guidance_h_nav_enter(), guidance_h_run(), and guidance_h_update_reference().

struct Int32Eulers guidance_h_rc_sp
struct Int32Vect2 guidance_h_speed_err

Definition at line 68 of file guidance_h.c.

Referenced by guidance_h_traj_run().

bool_t guidance_h_use_ref

Definition at line 60 of file guidance_h.c.

Referenced by guidance_h_update_reference().

int32_t transition_percentage

Definition at line 82 of file guidance_h.c.

Referenced by guidance_h_mode_changed(), guidance_h_run(), and transition_run().

int32_t transition_theta_offset