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)))
Event structure to store callbacks in a linked list.
#define SHIFT_TRACKING_KI
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
struct FloatVect3 dir
tracking direction
struct PID_f pid
PID controller.
static const float nav_dt
Main include for ABI (AirBorneInterface).
#define SHIFT_TRACKING_ID
static void init_pid_f(struct PID_f *pid, float Kp, float Kd, float Ki, float max_sum)
struct FloatVect3 pos
last position report
static float update_pid_f(struct PID_f *pid, float value, float dt)
Update PID with a new value and return new command.
void shift_tracking_update_gains(void)
static struct shift_tracking_private stp
static void float_vect3_normalize(struct FloatVect3 *v)
normalize 3D vector in place
#define FLOAT_VECT3_ZERO(_v)
struct shift_tracking_t shift_tracking
#define SHIFT_TRACKING_DIR
void shift_tracking_init(void)
init function
void shift_tracking_reset(void)
reset function
Paparazzi floating point algebra.
#define SHIFT_TRACKING_MAXSHIFT
#define NAVIGATION_FREQUENCY
void shift_tracking_run(float *shift)
run function
#define SHIFT_TRACKING_KD
Core autopilot interface common to all firmwares.
static void reset_pid_f(struct PID_f *pid)
Reset PID struture, gains left unchanged.
Common code for AP and FBW telemetry.
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)
float kp
proportional gain
static void set_gains_pid_f(struct PID_f *pid, float Kp, float Kd, float Ki)
Set gains of the PID struct.
#define SHIFT_TRACKING_KP
Simple PID structure floating point.
Fixedwing Navigation library.
float * shift
keep track of the shift variable to change
Several forms of PID controllers.