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