Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Basic guidance for rover. More...
Go to the source code of this file.
Data Structures | |
struct | RoverGuidanceSetpoint |
struct | RoverGuidancePID |
struct | RoverGuidanceControl |
struct | RoverGuidance |
Functions | |
void | rover_guidance_init (void) |
void | rover_guidance_periodic (void) |
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 |
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.h.
struct RoverGuidanceSetpoint |
Definition at line 36 of file rover_guidance.h.
Data Fields | ||
---|---|---|
float | heading | heading setpoint |
uint8_t | mask | bit 5: vx & vy, bit 6: vz, bit 7: vyaw |
struct FloatVect2 | pos |
position setpoint in NED. position setpoint |
struct FloatVect2 | speed | speed setpoint |
struct RoverGuidancePID |
Definition at line 46 of file rover_guidance.h.
Data Fields | ||
---|---|---|
float | d | |
float | d_err | |
float | err | |
float | i | |
float | p | |
float | sum_err |
struct RoverGuidanceControl |
Definition at line 55 of file rover_guidance.h.
Data Fields | ||
---|---|---|
float | motor_speed | |
float | motor_turn |
struct RoverGuidance |
Definition at line 60 of file rover_guidance.h.
Data Fields | ||
---|---|---|
struct RoverGuidanceControl | cmd | commands |
struct RoverGuidanceSetpoint | sp | setpoints |
struct RoverGuidancePID | speed_pid | motor speed controller |
struct RoverGuidancePID | turn_pid | turn rate controller |
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().
void rover_guidance_init | ( | void | ) |
Definition at line 42 of file rover_guidance.c.
References RoverGuidancePID::d, RoverGuidancePID::d_err, RoverGuidancePID::err, FLOAT_VECT2_ZERO, RoverGuidanceSetpoint::heading, RoverGuidancePID::i, RoverGuidancePID::p, RoverGuidanceSetpoint::pos, rover_guidance, RoverGuidance::sp, RoverGuidance::speed_pid, RoverGuidancePID::sum_err, and RoverGuidance::turn_pid.
void rover_guidance_periodic | ( | void | ) |
Definition at line 67 of file rover_guidance.c.
void rover_guidance_run | ( | float * | heading_sp | ) |
Definition at line 83 of file rover_guidance.c.
References RoverGuidance::cmd, compute_pid(), RoverGuidancePID::d_err, RoverGuidancePID::err, float_vect2_norm(), RoverGuidanceSetpoint::heading, MAX_POS_ERR, MAX_PPRZ, MAX_SPEED_ERR, RoverGuidanceControl::motor_speed, RoverGuidanceControl::motor_turn, RoverGuidanceSetpoint::pos, PROXIMITY_DIST, FloatEulers::psi, FloatRates::r, rover_guidance, RoverGuidance::sp, RoverGuidance::speed_pid, stateGetBodyRates_f(), stateGetHorizontalSpeedNorm_f(), stateGetNedToBodyEulers_f(), stateGetPositionEnu_f(), RoverGuidancePID::sum_err, TRIM_PPRZ, RoverGuidance::turn_pid, VECT2_DIFF, FloatVect2::x, and FloatVect2::y.
void rover_guidance_set_speed_igain | ( | uint32_t | igain | ) |
Definition at line 169 of file rover_guidance.c.
References RoverGuidancePID::i, rover_guidance, RoverGuidance::speed_pid, and RoverGuidancePID::sum_err.
void rover_guidance_set_turn_igain | ( | uint32_t | igain | ) |
Definition at line 175 of file rover_guidance.c.
References RoverGuidancePID::i, rover_guidance, RoverGuidancePID::sum_err, and RoverGuidance::turn_pid.
|
extern |
Definition at line 1 of file rover_guidance.c.
Referenced by rover_guidance_enter(), rover_guidance_init(), rover_guidance_run(), rover_guidance_set_speed_igain(), and rover_guidance_set_turn_igain().