22 #define AUTOPILOT_CORE_GUIDANCE_C
27 #include "generated/airframe.h"
32 #include "navigation.h"
78 if (fabs(omega)>0.0) {
Core autopilot interface common to all firmwares.
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
Several forms of PID controllers.
float sum
integral of input
float g[3]
controller gains (Kp, Kd, Ki)
static float get_pid_f(struct PID_f *pid)
Get current value of the PID command.
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.
Generic interface for radio control modules.
#define AP_MODE_KILL
Static autopilot modes.
void rover_guidance_steering_kill(void)
static uint8_t last_ap_mode
rover_ctrl guidance_control
Mandatory dependencies header.
void rover_guidance_steering_speed_ctrl(void)
void rover_guidance_steering_init(void)
INIT function.
static struct PID_f rover_pid
void rover_guidance_steering_pid_reset(void)
PID RESET function.
static float last_speed_cmd
void rover_guidance_steering_heading_ctrl(float omega)
CTRL functions.
#define BoundDelta(delta)
MACROS.
#define BoundThrottle(throttle)
#define BoundSpeed(speed)
#define DRIVE_SHAFT_DISTANCE
API to get/set the generic vehicle states.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.