|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
35 #include "generated/airframe.h"
40 #ifndef SHIFT_TRACKING_ID
41 #define SHIFT_TRACKING_ID ABI_BROADCAST
45 #ifndef SHIFT_TRACKING_DEBUG
46 #define SHIFT_TRACKING_DEBUG FALSE
49 #if SHIFT_TRACKING_DEBUG
51 #include "pprzlink/messages.h"
55 #ifndef SHIFT_TRACKING_DIR
56 #define SHIFT_TRACKING_DIR { -1.0f, 0.f, 0.f }
59 #ifndef SHIFT_TRACKING_KP
60 #define SHIFT_TRACKING_KP 1.5f
63 #ifndef SHIFT_TRACKING_KI
64 #define SHIFT_TRACKING_KI 0.5f
67 #ifndef SHIFT_TRACKING_KD
68 #define SHIFT_TRACKING_KD 1.f
71 #ifndef SHIFT_TRACKING_MAXSHIFT
72 #define SHIFT_TRACKING_MAXSHIFT 30.f
99 float noise_x __attribute__((unused)),
100 float noise_y __attribute__((unused)),
101 float noise_z __attribute__((unused)))
static const float nav_dt
static float update_pid_f(struct PID_f *pid, float value, float dt)
Update PID with a new value and return new command.
#define NAVIGATION_FREQUENCY
void shift_tracking_run(float *shift)
run function
#define SHIFT_TRACKING_KD
#define SHIFT_TRACKING_KI
Event structure to store callbacks in a linked list.
struct PID_f pid
PID controller.
Paparazzi floating point algebra.
static void reset_pid_f(struct PID_f *pid)
Reset PID struture, gains left unchanged.
static void float_vect3_normalize(struct FloatVect3 *v)
normalize 3D vector in place
struct FloatVect3 pos
last position report
void shift_tracking_update_gains(void)
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define SHIFT_TRACKING_ID
struct FloatVect3 dir
tracking direction
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)
#define FLOAT_VECT3_ZERO(_v)
static struct shift_tracking_private stp
static void set_gains_pid_f(struct PID_f *pid, float Kp, float Kd, float Ki)
Set gains of the PID struct.
Simple PID structure floating point.
Common code for AP and FBW telemetry.
static void init_pid_f(struct PID_f *pid, float Kp, float Kd, float Ki, float max_sum)
#define SHIFT_TRACKING_KP
void shift_tracking_reset(void)
reset function
struct shift_tracking_t shift_tracking
#define SHIFT_TRACKING_MAXSHIFT
Several forms of PID controllers.
float * shift
keep track of the shift variable to change
void shift_tracking_init(void)
init function
float kp
proportional gain
#define SHIFT_TRACKING_DIR