Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
rover_guidance_steering.h File Reference
#include "std.h"
#include <math.h>
#include "math/pprz_geodetic_float.h"
#include "generated/airframe.h"
Include dependency graph for rover_guidance_steering.h:
This graph shows which files directly or indirectly include this file:

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.
#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.
#define BoundSpeed(speed)
#define BoundThrottle(throttle)
#define GetCmdFromDelta(delta)
#define GetCmdFromThrottle(throttle)
#define SetAPThrottleFromCommands(void)

Functions

void rover_guidance_steering_init (void)
 Steering rover guidance EXT FUNCTIONS.
void rover_guidance_steering_periodic (void)
void rover_guidance_steering_heading_ctrl (float omega)
 CTRL functions.
void rover_guidance_steering_speed_ctrl (void)
void rover_guidance_steering_setpoints (struct EnuCoor_f pos_sp, float *heading_sp)
void rover_guidance_steering_pid_reset (void)
 PID RESET function.
void rover_guidance_steering_kill (void)
void rover_guidance_steering_set_speed_pgain (float pgain)
void rover_guidance_steering_set_speed_igain (float igain)

Variables

rover_ctrl guidance_control

Data Structure Documentation

◆ sr_cmd_t

struct sr_cmd_t

Steering rover guidance STRUCTURES.

Definition at line 102 of file rover_guidance_steering.h.

Data Fields
float delta
float speed

◆ rover_ctrl

struct rover_ctrl

Definition at line 108 of file rover_guidance_steering.h.

Collaboration diagram for rover_ctrl:
Data Fields
sr_cmd_t cmd
float heading_kp
float heading_sp heading setpoint
float kf
float ki
float kp
float omega_sp omega setpoint
float pos_kp
float speed_error
float throttle

Macro Definition Documentation

◆ BoundDelta

#define BoundDelta ( delta)
Value:
(delta < -MIN_DELTA ? -MIN_DELTA : \
(delta > MAX_DELTA ? MAX_DELTA : \
delta))
#define MAX_DELTA
Generated airframe.h from airframe.xml.
#define MIN_DELTA

MACROS.

Definition at line 138 of file rover_guidance_steering.h.

Referenced by rover_guidance_steering_heading_ctrl().

◆ BoundSpeed

#define BoundSpeed ( speed)
Value:
(speed < MIN_SPEED ? MIN_SPEED : \
(speed > MAX_SPEED ? MAX_SPEED : \
speed))
#define MAX_SPEED
#define MIN_SPEED

Definition at line 143 of file rover_guidance_steering.h.

Referenced by rover_guidance_steering_heading_ctrl().

◆ BoundThrottle

#define BoundThrottle ( throttle)
Value:
TRIM_PPRZ((int)throttle)
#define TRIM_PPRZ(pprz)
Definition paparazzi.h:11

Definition at line 148 of file rover_guidance_steering.h.

Referenced by rover_guidance_steering_speed_ctrl().

◆ DRIVE_SHAFT_DISTANCE

#define DRIVE_SHAFT_DISTANCE   0.25

◆ GetCmdFromDelta

#define GetCmdFromDelta ( delta)
Value:
(delta >= 0 ? delta/MAX_DELTA * (MAX_PPRZ - (int)MAX_CMD_SHUT) : \
delta/MIN_DELTA * (MAX_PPRZ - (int)MIN_CMD_SHUT))
#define MAX_PPRZ
Definition paparazzi.h:8
#define MAX_CMD_SHUT
#define MIN_CMD_SHUT

Definition at line 151 of file rover_guidance_steering.h.

◆ GetCmdFromThrottle

#define GetCmdFromThrottle ( throttle)
Value:
(autopilot_throttle_killed() ? 0 : TRIM_PPRZ((int)throttle))
bool autopilot_throttle_killed(void)
get kill status
Definition autopilot.c:324

Definition at line 155 of file rover_guidance_steering.h.

◆ MAX_CMD_SHUT

#define MAX_CMD_SHUT   0

Definition at line 73 of file rover_guidance_steering.h.

◆ MAX_DELTA

#define MAX_DELTA   15.0

Generated airframe.h from airframe.xml.

  • fun: SetActuatorsFromCommands
  • var: commands
  • var: hardware and construction parameters Global variables definitions

Definition at line 62 of file rover_guidance_steering.h.

Referenced by nps_fdm_run_step().

◆ MAX_SPEED

#define MAX_SPEED   999.0

Definition at line 81 of file rover_guidance_steering.h.

◆ MIN_CMD_SHUT

#define MIN_CMD_SHUT   0

Definition at line 76 of file rover_guidance_steering.h.

◆ MIN_DELTA

#define MIN_DELTA   MAX_DELTA

Definition at line 65 of file rover_guidance_steering.h.

◆ MIN_SPEED

#define MIN_SPEED   0.2

Definition at line 84 of file rover_guidance_steering.h.

◆ SetAPThrottleFromCommands

#define SetAPThrottleFromCommands ( void)
Value:
{ \
autopilot.throttle = commands[COMMAND_THROTTLE]; \
}
struct pprz_autopilot autopilot
Global autopilot structure.
Definition autopilot.c:50
static const ShellCommand commands[]
Definition shell_arch.c:77

Definition at line 158 of file rover_guidance_steering.h.

◆ SR_MEASURED_KF

#define SR_MEASURED_KF   10

Definition at line 95 of file rover_guidance_steering.h.

Referenced by rover_guidance_steering_init().

Function Documentation

◆ rover_guidance_steering_heading_ctrl()

void rover_guidance_steering_heading_ctrl ( float omega)
extern

CTRL functions.

Definition at line 98 of file rover_guidance_steering.c.

References BoundDelta, BoundSpeed, DRIVE_SHAFT_DISTANCE, guidance_control, and stateGetHorizontalSpeedNorm_f().

Here is the call graph for this function:

◆ rover_guidance_steering_init()

void rover_guidance_steering_init ( void )
extern

Steering rover guidance EXT FUNCTIONS.

Steering rover guidance EXT FUNCTIONS.

Definition at line 71 of file rover_guidance_steering.c.

References guidance_control, init_pid_f(), MAX_PPRZ, ROVER_GUIDANCE_HEADING_KP, ROVER_GUIDANCE_POS_KP, ROVER_GUIDANCE_SPEED_KI, ROVER_GUIDANCE_SPEED_KP, rover_pid, SR_MEASURED_KF, and time_step.

Here is the call graph for this function:

◆ rover_guidance_steering_kill()

void rover_guidance_steering_kill ( void )
extern

Definition at line 156 of file rover_guidance_steering.c.

References guidance_control.

◆ rover_guidance_steering_periodic()

void rover_guidance_steering_periodic ( void )
extern

Definition at line 90 of file rover_guidance_steering.c.

◆ rover_guidance_steering_pid_reset()

void rover_guidance_steering_pid_reset ( void )
extern

PID RESET function.

Definition at line 151 of file rover_guidance_steering.c.

References reset_pid_f(), and rover_pid.

Here is the call graph for this function:

◆ rover_guidance_steering_set_speed_igain()

void rover_guidance_steering_set_speed_igain ( float igain)
extern

Definition at line 168 of file rover_guidance_steering.c.

References guidance_control, rover_pid, and set_gains_pid_f().

Here is the call graph for this function:

◆ rover_guidance_steering_set_speed_pgain()

void rover_guidance_steering_set_speed_pgain ( float pgain)
extern

Definition at line 162 of file rover_guidance_steering.c.

References guidance_control, rover_pid, and set_gains_pid_f().

Here is the call graph for this function:

◆ rover_guidance_steering_setpoints()

void rover_guidance_steering_setpoints ( struct EnuCoor_f pos_sp,
float * heading_sp )
extern

◆ rover_guidance_steering_speed_ctrl()

void rover_guidance_steering_speed_ctrl ( void )
extern

Definition at line 109 of file rover_guidance_steering.c.

References BoundThrottle, get_pid_f(), guidance_control, rover_pid, stateGetHorizontalSpeedNorm_f(), time_step, and update_pid_f().

Here is the call graph for this function:

Variable Documentation

◆ guidance_control