28#define AUTOPILOT_CORE_GUIDANCE_C
31#include "generated/airframe.h"
32#include "generated/autopilot_core_guidance.h"
78#define MAX_POS_ERR 10.f
79#define MAX_SPEED_ERR 10.f
80#define MAX_INTEGRAL_CMD (MAX_PPRZ / 10.f)
81#define PROXIMITY_DIST 0.5f
182#ifdef ROVER_GUIDANCE_MODE_GUIDED
#define FLOAT_ANGLE_NORMALIZE(_a)
static float float_vect2_norm(struct FloatVect2 *v)
#define FLOAT_VECT2_ZERO(_v)
#define VECT2_DIFF(_c, _a, _b)
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static struct FloatRates * stateGetBodyRates_f(void)
Get vehicle body angular rate (float).
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
void rover_guidance_run(float *heading_sp)
void rover_guidance_set_speed_igain(uint32_t igain)
void rover_guidance_set_turn_igain(uint32_t igain)
void rover_guidance_enter(void)
static float compute_pid(struct RoverGuidancePID *pid)
void rover_guidance_periodic(void)
void rover_guidance_init(void)
struct RoverGuidance rover_guidance
Basic guidance for rover.
uint8_t mask
bit 5: vx & vy, bit 6: vz, bit 7: vyaw
struct RoverGuidanceSetpoint sp
setpoints
struct RoverGuidancePID turn_pid
turn rate controller
float heading
heading setpoint
struct FloatVect2 speed
speed setpoint
struct RoverGuidancePID speed_pid
motor speed controller
struct FloatVect2 pos
position setpoint in NED.
struct RoverGuidanceControl cmd
commands
API to get/set the generic vehicle states.
Periodic telemetry system header (includes downlink utility and generated code).
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.