Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
rover_guidance.c File Reference
#include "firmwares/rover/guidance/rover_guidance.h"
#include "generated/airframe.h"
#include "generated/autopilot_core_guidance.h"
#include "state.h"
#include "modules/datalink/telemetry.h"
+ Include dependency graph for rover_guidance.c:

Go to the source code of this file.

Macros

#define AUTOPILOT_CORE_GUIDANCE_C
 
#define MAX_POS_ERR   10.f
 
#define MAX_SPEED_ERR   10.f
 
#define MAX_INTEGRAL_CMD   (MAX_PPRZ / 10.f)
 
#define PROXIMITY_DIST   0.5f
 

Functions

void rover_guidance_init (void)
 
void rover_guidance_periodic (void)
 
static float compute_pid (struct RoverGuidancePID *pid)
 
void rover_guidance_run (float *heading_sp)
 
void rover_guidance_enter (void)
 
void rover_guidance_set_speed_igain (uint32_t igain)
 
void rover_guidance_set_turn_igain (uint32_t igain)
 

Variables

struct RoverGuidance rover_guidance
 

Detailed Description

Basic guidance for rover. Implement standard PID control loop to track a navigation target. Guidance "modes" are using the autopilot generation with the "guidance" state machine.

Definition in file rover_guidance.c.

Macro Definition Documentation

◆ AUTOPILOT_CORE_GUIDANCE_C

#define AUTOPILOT_CORE_GUIDANCE_C

Definition at line 28 of file rover_guidance.c.

◆ MAX_INTEGRAL_CMD

#define MAX_INTEGRAL_CMD   (MAX_PPRZ / 10.f)

Definition at line 80 of file rover_guidance.c.

◆ MAX_POS_ERR

#define MAX_POS_ERR   10.f

Definition at line 78 of file rover_guidance.c.

◆ MAX_SPEED_ERR

#define MAX_SPEED_ERR   10.f

Definition at line 79 of file rover_guidance.c.

◆ PROXIMITY_DIST

#define PROXIMITY_DIST   0.5f

Definition at line 81 of file rover_guidance.c.

Function Documentation

◆ compute_pid()

static float compute_pid ( struct RoverGuidancePID pid)
static

Definition at line 73 of file rover_guidance.c.

References RoverGuidancePID::d, RoverGuidancePID::d_err, RoverGuidancePID::err, RoverGuidancePID::i, RoverGuidancePID::p, and RoverGuidancePID::sum_err.

Referenced by rover_guidance_run().

+ Here is the caller graph for this function:

◆ rover_guidance_enter()

void rover_guidance_enter ( void  )

Definition at line 124 of file rover_guidance.c.

References RoverGuidanceSetpoint::heading, RoverGuidanceSetpoint::mask, FloatEulers::psi, rover_guidance, RoverGuidance::sp, and stateGetNedToBodyEulers_f().

+ Here is the call graph for this function:

◆ rover_guidance_init()

◆ rover_guidance_periodic()

void rover_guidance_periodic ( void  )

Definition at line 67 of file rover_guidance.c.

◆ rover_guidance_run()

◆ rover_guidance_set_speed_igain()

void rover_guidance_set_speed_igain ( uint32_t  igain)

◆ rover_guidance_set_turn_igain()

void rover_guidance_set_turn_igain ( uint32_t  igain)

Variable Documentation

◆ rover_guidance