Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
rover_guidance_steering.h File Reference
#include "std.h"
#include <math.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


#define MAX_DELTA   15.0
 Generated airframe.h from airframe.xml. More...
#define MAX_CMD_SHUT   0
#define MIN_CMD_SHUT   0
#define MAX_SPEED   999.0
#define MIN_SPEED   0.2
#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)


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)


rover_ctrl guidance_control
 Mandatory dependencies header. More...

Data Structure Documentation

◆ sr_cmd_t

struct sr_cmd_t

Steering rover guidance STRUCTURES.

Definition at line 100 of file rover_guidance_steering.h.

Data Fields
float delta
float speed

◆ rover_ctrl

struct rover_ctrl

Definition at line 106 of file rover_guidance_steering.h.

+ Collaboration diagram for rover_ctrl:
Data Fields
sr_cmd_t cmd
float kf
float ki
float kp
float speed_error
float throttle

Macro Definition Documentation

◆ BoundDelta

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


Definition at line 128 of file rover_guidance_steering.h.

◆ BoundSpeed

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

Definition at line 133 of file rover_guidance_steering.h.

◆ BoundThrottle

#define BoundThrottle (   throttle)    TRIM_PPRZ((int)throttle)

Definition at line 138 of file rover_guidance_steering.h.



Definition at line 87 of file rover_guidance_steering.h.

◆ GetCmdFromDelta

#define GetCmdFromDelta (   delta)
(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 141 of file rover_guidance_steering.h.

◆ GetCmdFromThrottle

#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.

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

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.



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.

◆ SetAPThrottleFromCommands

#define SetAPThrottleFromCommands (   void)
{ \
autopilot.throttle = commands[COMMAND_THROTTLE]; \
pprz_t commands[COMMANDS_NB]
Definition: commands.c:30

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.

Function Documentation

◆ rover_guidance_steering_heading_ctrl()

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().

+ Here is the call graph for this function:

◆ rover_guidance_steering_init()

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.

+ Here is the call graph for this function:

◆ rover_guidance_steering_kill()

void rover_guidance_steering_kill ( void  )

◆ rover_guidance_steering_pid_reset()

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.

+ Here is the call graph for this function:

◆ rover_guidance_steering_speed_ctrl()

Variable Documentation

◆ guidance_control