Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
#include <math.h>
#include "generated/airframe.h"
Go to the source code of this file.
Data Structures | |
struct | sr_cmd_t |
Steering rover guidance STRUCTURES. More... | |
struct | rover_ctrl |
Macros | |
#define | MAX_DELTA 15.0 |
Generated airframe.h from airframe.xml. More... | |
#define | MIN_DELTA MAX_DELTA |
#define | MAX_CMD_SHUT 0 |
#define | MIN_CMD_SHUT 0 |
#define | MAX_SPEED 999.0 |
#define | MIN_SPEED 0.2 |
#define | DRIVE_SHAFT_DISTANCE 0.25 |
#define | SR_MEASURED_KF 10 |
#define | BoundDelta(delta) |
MACROS. More... | |
#define | BoundSpeed(speed) |
#define | BoundThrottle(throttle) TRIM_PPRZ((int)throttle) |
#define | GetCmdFromDelta(delta) |
#define | GetCmdFromThrottle(throttle) (autopilot_throttle_killed() ? 0 : TRIM_PPRZ((int)throttle)) |
#define | SetAPThrottleFromCommands(void) |
Functions | |
void | rover_guidance_steering_init (void) |
Steering rover guidance EXT FUNCTIONS. More... | |
void | rover_guidance_steering_heading_ctrl (float omega) |
CTRL functions. More... | |
void | rover_guidance_steering_speed_ctrl (void) |
void | rover_guidance_steering_pid_reset (void) |
PID RESET function. More... | |
void | rover_guidance_steering_kill (void) |
Variables | |
rover_ctrl | guidance_control |
Mandatory dependencies header. More... | |
struct sr_cmd_t |
Steering rover guidance STRUCTURES.
Definition at line 100 of file rover_guidance_steering.h.
Data Fields | ||
---|---|---|
float | delta | |
float | speed |
struct rover_ctrl |
Definition at line 106 of file rover_guidance_steering.h.
Data Fields | ||
---|---|---|
sr_cmd_t | cmd | |
float | kf | |
float | ki | |
float | kp | |
float | speed_error | |
float | throttle |
#define BoundDelta | ( | delta | ) |
MACROS.
Definition at line 128 of file rover_guidance_steering.h.
#define BoundSpeed | ( | speed | ) |
Definition at line 133 of file rover_guidance_steering.h.
#define BoundThrottle | ( | throttle | ) | TRIM_PPRZ((int)throttle) |
Definition at line 138 of file rover_guidance_steering.h.
#define DRIVE_SHAFT_DISTANCE 0.25 |
Definition at line 87 of file rover_guidance_steering.h.
#define GetCmdFromDelta | ( | delta | ) |
Definition at line 141 of file rover_guidance_steering.h.
#define GetCmdFromThrottle | ( | throttle | ) | (autopilot_throttle_killed() ? 0 : TRIM_PPRZ((int)throttle)) |
Definition at line 145 of file rover_guidance_steering.h.
#define MAX_CMD_SHUT 0 |
Definition at line 71 of file rover_guidance_steering.h.
#define MAX_DELTA 15.0 |
Generated airframe.h from airframe.xml.
Definition at line 60 of file rover_guidance_steering.h.
#define MAX_SPEED 999.0 |
Definition at line 79 of file rover_guidance_steering.h.
#define MIN_CMD_SHUT 0 |
Definition at line 74 of file rover_guidance_steering.h.
#define MIN_DELTA MAX_DELTA |
Definition at line 63 of file rover_guidance_steering.h.
#define MIN_SPEED 0.2 |
Definition at line 82 of file rover_guidance_steering.h.
#define SetAPThrottleFromCommands | ( | void | ) |
Definition at line 148 of file rover_guidance_steering.h.
#define SR_MEASURED_KF 10 |
Definition at line 93 of file rover_guidance_steering.h.
void rover_guidance_steering_heading_ctrl | ( | float | omega | ) |
CTRL functions.
Definition at line 71 of file rover_guidance_steering.c.
References BoundDelta, BoundSpeed, rover_ctrl::cmd, sr_cmd_t::delta, DRIVE_SHAFT_DISTANCE, guidance_control, and stateGetHorizontalSpeedNorm_f().
void rover_guidance_steering_init | ( | void | ) |
Steering rover guidance EXT FUNCTIONS.
Steering rover guidance EXT FUNCTIONS.
Definition at line 49 of file rover_guidance_steering.c.
References AP_MODE_KILL, rover_ctrl::cmd, sr_cmd_t::delta, guidance_control, init_pid_f(), rover_ctrl::kf, rover_ctrl::ki, rover_ctrl::kp, last_ap_mode, last_speed_cmd, MAX_PPRZ, rover_pid, sr_cmd_t::speed, rover_ctrl::speed_error, SR_MEASURED_KF, rover_ctrl::throttle, and time_step.
void rover_guidance_steering_kill | ( | void | ) |
Definition at line 114 of file rover_guidance_steering.c.
References rover_ctrl::cmd, sr_cmd_t::delta, guidance_control, and sr_cmd_t::speed.
void rover_guidance_steering_pid_reset | ( | void | ) |
PID RESET function.
Definition at line 106 of file rover_guidance_steering.c.
References reset_pid_f(), rover_pid, and PID_f::sum.
void rover_guidance_steering_speed_ctrl | ( | void | ) |
Definition at line 86 of file rover_guidance_steering.c.
References BoundThrottle, rover_ctrl::cmd, PID_f::g, get_pid_f(), guidance_control, rover_ctrl::kf, rover_ctrl::ki, rover_ctrl::kp, last_speed_cmd, rover_pid, set_gains_pid_f(), sr_cmd_t::speed, rover_ctrl::speed_error, stateGetHorizontalSpeedNorm_f(), rover_ctrl::throttle, time_step, and update_pid_f().
|
extern |
Mandatory dependencies header.
Definition at line 41 of file rover_guidance_steering.c.
Referenced by rover_guidance_steering_heading_ctrl(), rover_guidance_steering_init(), rover_guidance_steering_kill(), and rover_guidance_steering_speed_ctrl().