|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/ctrl/shift_tracking.h"#include "firmwares/fixedwing/nav.h"#include "autopilot.h"#include "modules/core/abi.h"#include "math/pprz_algebra_float.h"#include "generated/airframe.h"#include "filters/pid.h"Go to the source code of this file.
Data Structures | |
| struct | shift_tracking_private |
Macros | |
| #define | SHIFT_TRACKING_ID ABI_BROADCAST |
| #define | SHIFT_TRACKING_DEBUG FALSE |
| #define | SHIFT_TRACKING_DIR { -1.0f, 0.f, 0.f } |
| #define | SHIFT_TRACKING_KP 1.5f |
| #define | SHIFT_TRACKING_KI 0.5f |
| #define | SHIFT_TRACKING_KD 1.f |
| #define | SHIFT_TRACKING_MAXSHIFT 30.f |
Functions | |
| static void | get_pos (uint8_t sender_id, uint32_t id, float x, float y, float z, float noise_x, float noise_y, float noise_z) |
| void | shift_tracking_init (void) |
| init function | |
| void | shift_tracking_reset (void) |
| reset function | |
| void | shift_tracking_run (float *shift) |
| run function | |
| void | shift_tracking_update_gains (void) |
Variables | |
| struct shift_tracking_t | shift_tracking |
| static const float | nav_dt = 1.f / NAVIGATION_FREQUENCY |
| static struct shift_tracking_private | stp |
| static const float | dir [] = SHIFT_TRACKING_DIR |
| struct shift_tracking_private |
Definition at line 81 of file shift_tracking.c.
| Data Fields | ||
|---|---|---|
| struct FloatVect3 | dir | tracking direction |
| struct PID_f | pid | PID controller. |
| struct FloatVect3 | pos | last position report |
| abi_event | pos_ev | |
| float * | shift | keep track of the shift variable to change |
| #define SHIFT_TRACKING_DEBUG FALSE |
Definition at line 46 of file shift_tracking.c.
Definition at line 56 of file shift_tracking.c.
| #define SHIFT_TRACKING_ID ABI_BROADCAST |
Definition at line 41 of file shift_tracking.c.
Referenced by shift_tracking_init().
| #define SHIFT_TRACKING_KD 1.f |
Definition at line 68 of file shift_tracking.c.
Referenced by shift_tracking_init().
| #define SHIFT_TRACKING_KI 0.5f |
Definition at line 64 of file shift_tracking.c.
Referenced by shift_tracking_init().
| #define SHIFT_TRACKING_KP 1.5f |
Definition at line 60 of file shift_tracking.c.
Referenced by shift_tracking_init().
| #define SHIFT_TRACKING_MAXSHIFT 30.f |
Definition at line 72 of file shift_tracking.c.
Referenced by shift_tracking_run().
|
static |
Definition at line 94 of file shift_tracking.c.
References stp.
Referenced by shift_tracking_init().
| void shift_tracking_init | ( | void | ) |
init function
Definition at line 108 of file shift_tracking.c.
References dir, float_vect3_normalize(), FLOAT_VECT3_ZERO, get_pos(), init_pid_f(), shift_tracking, SHIFT_TRACKING_ID, SHIFT_TRACKING_KD, SHIFT_TRACKING_KI, SHIFT_TRACKING_KP, and stp.
| void shift_tracking_reset | ( | void | ) |
reset function
reset integral and offset command
Definition at line 127 of file shift_tracking.c.
References reset_pid_f(), shift_tracking, and stp.
| void shift_tracking_run | ( | float * | shift | ) |
run function
should be called in flight plan pre_call
| [out] | shift | pointer to the navigation shift to control |
Definition at line 136 of file shift_tracking.c.
References nav_dt, shift_tracking_private::shift, shift_tracking, SHIFT_TRACKING_MAXSHIFT, stp, and update_pid_f().
| void shift_tracking_update_gains | ( | void | ) |
Definition at line 163 of file shift_tracking.c.
References set_gains_pid_f(), shift_tracking, and stp.
|
static |
Definition at line 91 of file shift_tracking.c.
Referenced by _lseek_r(), angle_to_wall(), change_rep(), change_rep(), change_rep(), default_compute_angles(), getFileName(), gimbal_caddx_compute_angles(), hist_restore_line(), hist_search(), init_gazebo(), nav_land_at_loc(), nav_land_at_loc(), nav_oval(), nav_oval(), nav_survey_hybrid_run(), nps_atmosphere_set_wind_dir(), nps_atmosphere_set_wind_ned(), nps_fdm_set_wind(), removeEmptyLogs(), sdlog_chibios_init(), sdlog_next_number(), sdlog_open(), shift_tracking_init(), uid_from_mac(), and viewing_angle().
|
static |
Definition at line 78 of file shift_tracking.c.
| struct shift_tracking_t shift_tracking |
Definition at line 75 of file shift_tracking.c.
Referenced by shift_tracking_init(), shift_tracking_reset(), shift_tracking_run(), and shift_tracking_update_gains().
|
static |
Definition at line 89 of file shift_tracking.c.
Referenced by get_pos(), shift_tracking_init(), shift_tracking_reset(), shift_tracking_run(), and shift_tracking_update_gains().