|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"#include "sys_id_doublet.h"#include "pprz_doublet.h"#include "modules/datalink/telemetry.h"#include "generated/airframe.h"#include "mcu_periph/sys_time.h"
Include dependency graph for sys_id_doublet.c:Go to the source code of this file.
Functions | |
| static void | set_current_doublet_values (void) |
| static void | send_doublet (struct transport_tx *trans, struct link_device *dev) |
| static void | start_doublet (void) |
| static void | stop_doublet (void) |
| uint8_t | sys_id_doublet_running (void) |
| void | sys_id_doublet_activate_handler (uint8_t activate) |
| void | sys_id_doublet_axis_handler (uint8_t axis) |
| void | sys_id_doublet_mod_handler (uint8_t mode) |
| void | sys_id_doublet_init (void) |
| void | sys_id_doublet_run (void) |
| void | sys_id_doublet_add_values (bool UNUSED motors_on, bool UNUSED override_on, pprz_t UNUSED in_cmd[]) |
Variables | |
| static struct doublet_t | doublet |
| uint8_t | doublet_active = false |
| uint8_t | doublet_mode = 0 |
| uint8_t | doublet_axis = 0 |
| pprz_t | doublet_amplitude = 0 |
| float | doublet_length_s = 0.5f |
| float | doublet_extra_waiting_time_s = 0.0f |
| static const int8_t | SYS_ID_ACTIVE_DOUBLET_AXES [] = SYS_ID_DOUBLET_AXES |
| static pprz_t | current_doublet_values [SYS_ID_DOUBLET_NB_AXES] |
This is the module implementation for the doublet maneuver. Use sys_id_chirp by adding the module to your airframe file and adding the following line to the top of the <command_laws> section of your airframe file:
<call fun="sys_id_doublet_add_values(autopilot_get_motors_on(),FALSE,values)">
In the GCS you can then start and stop the doublet, change type of doublet maneuvre. Documentation of the specific options can be found in the module xml file.
Definition in file sys_id_doublet.c.
| #define SYS_ID_DOUBLET_AXES {COMMAND_ROLL,COMMAND_PITCH,COMMAND_YAW,COMMAND_THRUST} |
Definition at line 44 of file sys_id_doublet.c.
Definition at line 48 of file sys_id_doublet.c.
| #define SYS_ID_DOUBLET_NB_AXES sizeof SYS_ID_ACTIVE_DOUBLET_AXES / sizeof SYS_ID_ACTIVE_DOUBLET_AXES[0] |
Definition at line 71 of file sys_id_doublet.c.
| #define SYS_ID_MAX_AXIS SYS_ID_DOUBLET_NB_AXES |
Definition at line 87 of file sys_id_doublet.c.
Definition at line 74 of file sys_id_doublet.c.
|
static |
Definition at line 113 of file sys_id_doublet.c.
References current_doublet_values, dev, doublet_active, doublet_amplitude, doublet_axis, doublet_mode, and foo.
Referenced by sys_id_doublet_init().
Here is the caller graph for this function:Definition at line 92 of file sys_id_doublet.c.
References current_doublet_values, doublet_t::current_value, doublet, doublet_active, doublet_amplitude, doublet_axis, foo, and SYS_ID_DOUBLET_NB_AXES.
Referenced by start_doublet(), stop_doublet(), sys_id_doublet_init(), and sys_id_doublet_run().
Here is the caller graph for this function:Definition at line 119 of file sys_id_doublet.c.
References doublet, doublet_active, doublet_reset(), get_sys_time_float(), and set_current_doublet_values().
Referenced by sys_id_doublet_activate_handler().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 126 of file sys_id_doublet.c.
References doublet, doublet_active, doublet_reset(), get_sys_time_float(), and set_current_doublet_values().
Referenced by sys_id_doublet_activate_handler(), and sys_id_doublet_run().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 137 of file sys_id_doublet.c.
References doublet, doublet_active, doublet_extra_waiting_time_s, doublet_init(), doublet_length_s, doublet_mode, foo, get_sys_time_float(), radio_control, start_doublet(), stop_doublet(), and RadioControl::values.
Referenced by perform_sys_id_auto_doublets(), sys_id_auto_doublets_on_deactivation(), and sys_id_doublet_run().
Here is the call graph for this function:
Here is the caller graph for this function:| void sys_id_doublet_add_values | ( | bool UNUSED | motors_on, |
| bool UNUSED | override_on, | ||
| pprz_t UNUSED | in_cmd[] | ||
| ) |
Definition at line 213 of file sys_id_doublet.c.
References current_doublet_values, foo, MAX_PPRZ, SYS_ID_ACTIVE_DOUBLET_AXES, and SYS_ID_DOUBLET_NB_AXES.
Definition at line 155 of file sys_id_doublet.c.
References doublet_axis, foo, and SYS_ID_MAX_AXIS.
Referenced by perform_sys_id_auto_doublets().
Here is the caller graph for this function:Definition at line 166 of file sys_id_doublet.c.
References current_doublet_values, DefaultPeriodic, doublet, doublet_extra_waiting_time_s, doublet_init(), doublet_length_s, doublet_mode, foo, get_sys_time_float(), register_periodic_telemetry(), send_doublet(), set_current_doublet_values(), and SYS_ID_DOUBLET_NB_AXES.
Here is the call graph for this function:Definition at line 162 of file sys_id_doublet.c.
References doublet_mode, and mode.
Referenced by perform_sys_id_auto_doublets().
Here is the caller graph for this function:Definition at line 178 of file sys_id_doublet.c.
References doublet, doublet_active, doublet_is_running(), doublet_update(), foo, get_sys_time_float(), radio_control, set_current_doublet_values(), stop_doublet(), sys_id_doublet_activate_handler(), and RadioControl::values.
Here is the call graph for this function:Definition at line 133 of file sys_id_doublet.c.
References doublet_active.
Referenced by oneloop_andi_run().
Here is the caller graph for this function:
|
static |
Definition at line 90 of file sys_id_doublet.c.
Referenced by send_doublet(), set_current_doublet_values(), sys_id_doublet_add_values(), and sys_id_doublet_init().
|
static |
Definition at line 57 of file sys_id_doublet.c.
Referenced by doublet_init(), doublet_is_running(), doublet_reset(), doublet_update(), set_current_doublet_values(), start_doublet(), stop_doublet(), sys_id_doublet_activate_handler(), sys_id_doublet_init(), and sys_id_doublet_run().
Definition at line 59 of file sys_id_doublet.c.
Referenced by send_doublet(), set_current_doublet_values(), start_doublet(), stop_doublet(), sys_id_doublet_activate_handler(), sys_id_doublet_run(), and sys_id_doublet_running().
| pprz_t doublet_amplitude = 0 |
Definition at line 64 of file sys_id_doublet.c.
Referenced by perform_sys_id_auto_doublets(), send_doublet(), set_current_doublet_values(), and sys_id_auto_doublets_on_deactivation().
| uint8_t doublet_axis = 0 |
Definition at line 62 of file sys_id_doublet.c.
Referenced by send_doublet(), set_current_doublet_values(), and sys_id_doublet_axis_handler().
| float doublet_extra_waiting_time_s = 0.0f |
Definition at line 66 of file sys_id_doublet.c.
Referenced by sys_id_doublet_activate_handler(), and sys_id_doublet_init().
Definition at line 65 of file sys_id_doublet.c.
Referenced by perform_sys_id_auto_doublets(), sys_id_doublet_activate_handler(), and sys_id_doublet_init().
| uint8_t doublet_mode = 0 |
Definition at line 60 of file sys_id_doublet.c.
Referenced by send_doublet(), sys_id_doublet_activate_handler(), sys_id_doublet_init(), and sys_id_doublet_mod_handler().
|
static |
Definition at line 70 of file sys_id_doublet.c.
Referenced by sys_id_doublet_add_values().