|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
33 #ifndef LOGGER_CONTROL_EFFECTIVENESS_COMMANDS
34 #define LOGGER_CONTROL_EFFECTIVENESS_COMMANDS TRUE
37 #ifndef LOGGER_CONTROL_EFFECTIVENESS_ACTUATORS
38 #define LOGGER_CONTROL_EFFECTIVENESS_ACTUATORS FALSE
41 #ifndef LOGGER_CONTROL_EFFECTIVENESS_POS
42 #define LOGGER_CONTROL_EFFECTIVENESS_POS FALSE
45 #ifndef LOGGER_CONTROL_EFFECTIVENESS_SPEED
46 #define LOGGER_CONTROL_EFFECTIVENESS_SPEED FALSE
49 #ifndef LOGGER_CONTROL_EFFECTIVENESS_AIRSPEED
50 #define LOGGER_CONTROL_EFFECTIVENESS_AIRSPEED FALSE
55 #if LOGGER_CONTROL_EFFECTIVENESS_COMMANDS
56 #ifdef ROTORCRAFT_FIRMWARE
59 #ifdef FIXEDWING_FIRMWARE
64 #if LOGGER_CONTROL_EFFECTIVENESS_ACTUATORS
72 sdLogWriteLog(
pprzLogFile,
"time,gyro_p,gyro_q,gyro_r,ax,ay,az");
73 #if LOGGER_CONTROL_EFFECTIVENESS_COMMANDS
74 for (
unsigned int i = 0; i < COMMANDS_NB; i++) {
78 #if LOGGER_CONTROL_EFFECTIVENESS_ACTUATORS
79 for (
unsigned int i = 0; i < ACTUATORS_NB; i++) {
83 #if LOGGER_CONTROL_EFFECTIVENESS_POS
86 #if LOGGER_CONTROL_EFFECTIVENESS_SPEED
87 sdLogWriteLog(
pprzLogFile,
",speed_x,speed_y,speed_z");
89 #if LOGGER_CONTROL_EFFECTIVENESS_AIRSPEED
108 sdLogWriteLog(
pprzLogFile,
"%.5f,%ld,%ld,%ld,%ld,%ld,%ld",
118 #if LOGGER_CONTROL_EFFECTIVENESS_COMMANDS
119 for (
unsigned int i = 0; i < COMMANDS_NB; i++) {
120 #ifdef ROTORCRAFT_FIRMWARE
123 #ifdef FIXEDWING_FIRMWARE
130 #if LOGGER_CONTROL_EFFECTIVENESS_ACTUATORS
131 for (
unsigned int i = 0; i < ACTUATORS_NB; i++) {
137 #if LOGGER_CONTROL_EFFECTIVENESS_POS
139 sdLogWriteLog(
pprzLogFile,
",%ld,%ld,%ld", pos->
x, pos->
y, pos->
z);
143 #if LOGGER_CONTROL_EFFECTIVENESS_SPEED
145 sdLogWriteLog(
pprzLogFile,
",%ld,%ld,%ld", speed->
x, speed->
y, speed->
z);
149 #if LOGGER_CONTROL_EFFECTIVENESS_AIRSPEED
void logger_control_effectiveness_start(void)
Write the log header line according to the enabled parts.
static float get_sys_time_float(void)
Get the time in seconds since startup.
int32_t q
in rad/s with INT32_RATE_FRAC
static struct EnuCoor_i * stateGetPositionEnu_i(void)
Get position in local ENU coordinates (int).
static struct Int32Rates * stateGetBodyRates_i(void)
Get vehicle body angular rate (int).
int32_t p
in rad/s with INT32_RATE_FRAC
static struct EnuCoor_i * stateGetSpeedEnu_i(void)
Get ground speed in local ENU coordinates (int).
static float stateGetAirspeed_f(void)
Get airspeed (float).
Architecture independent timing functions.
static const ShellCommand commands[]
void logger_control_effectiveness_periodic(void)
Log the values to file.
static struct Int32Vect3 * stateGetAccelBody_i(void)
Get acceleration in Body coordinates (int).
int32_t stabilization_cmd[COMMANDS_NB]
Stabilization commands.
Hardware independent code for commands handling.
int32_t r
in rad/s with INT32_RATE_FRAC
vector in East North Up coordinates
Log data required to compute control effectiveness.