|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
29 #define AUTOPILOT_CORE_GUIDANCE_C
32 #include "generated/airframe.h"
33 #include "generated/autopilot_core_guidance.h"
38 #if PERIODIC_TELEMETRY
60 #if PERIODIC_TELEMETRY
65 autopilot_core_guidance_init();
71 autopilot_core_guidance_periodic_task();
79 #define MAX_POS_ERR 10.f // max position error
80 #define MAX_SPEED_ERR 10.f // max speed error
81 #define MAX_INTEGRAL_CMD (MAX_PPRZ / 10.f) // 10% of max command
82 #define PROXIMITY_DIST 0.2f // proximity distance TODO improve
106 .
x = cpsi * pos_err.
x + spsi * pos_err.
y,
107 .y = -spsi * pos_err.
x + cpsi * pos_err.
y
#define FLOAT_VECT2_ZERO(_v)
static struct NedCoor_f * stateGetPositionNed_f(void)
Get position in local NED coordinates (float).
static float compute_pid(struct RoverHoloGuidancePID *pid)
void rover_holo_guidance_periodic(void)
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
static struct FloatRates * stateGetBodyRates_f(void)
Get vehicle body angular rate (float).
uint8_t mask
bit 5: vx & vy, bit 6: vz, bit 7: vyaw
void rover_holo_guidance_init(void)
float heading
heading setpoint
void rover_holo_guidance_enter(void)
#define VECT2_DIFF(_c, _a, _b)
static float float_vect2_norm(struct FloatVect2 *v)
struct RoverHoloGuidance rover_holo_guidance
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
struct RoverHoloGuidancePID turn_pid
turn rate controller
struct FloatVect2 pos
position setpoint in NED.
void rover_guidance_holonomic_set_speed_igain(float igain)
struct RoverHoloGuidanceSetpoint sp
setpoints
struct RoverHoloGuidanceControl cmd
commands
void rover_holo_guidance_run(float *heading_sp)
struct RoverHoloGuidancePID speed_pid
motor speed controller
void rover_guidance_holonomic_set_turn_igain(float igain)