Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_rate_indi.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Freek van Tienen <freek.v.tienen@gmail.com>
3 * 2020 Rohan Chotalal
4 *
5 * This file is part of paparazzi.
6 *
7 * paparazzi is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * paparazzi is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with paparazzi; see the file COPYING. If not, write to
19 * the Free Software Foundation, 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
29
30#ifdef STABILIZATION_ATTITUDE_INDI_SIMPLE
32#else
34#endif
35
37
38/* -- define variables */
40
42#ifndef STABILIZATION_INDI_MAX_RATE
43#define STABILIZATION_INDI_MAX_RATE 6.0
44#endif
45
46#if PERIODIC_TELEMETRY
48
66#endif
67
72{
74 // indi init is already done through module init
75
76#if PERIODIC_TELEMETRY
78#endif
79}
80
88
92void stabilization_rate_run(bool in_flight, struct StabilizationSetpoint *rate_sp, struct ThrustSetpoint *thrust, int32_t *cmd)
93{
95
96 /* compute the INDI rate command */
97 stabilization_indi_rate_run(in_flight, rate_sp, thrust, cmd);
98}
99
115
float q
in rad/s
float p
in rad/s
float r
in rad/s
#define FLOAT_RATES_ZERO(_r)
angular rates
uint16_t foo
Definition main_demo5.c:58
#define MAX_PPRZ
Definition paparazzi.h:8
Some helper functions to check RC sticks.
#define THROTTLE_STICK_DOWN_FROM_RC(_rc)
struct Stabilization stabilization
struct FloatRates stab_sp_to_rates_f(struct StabilizationSetpoint *sp)
struct StabilizationSetpoint stab_sp_from_rates_f(struct FloatRates *rates)
General stabilization interface for rotorcrafts.
int32_t cmd[COMMANDS_NB]
output command vector, range from [-MAX_PPRZ:MAX_PPRZ] (store for messages)
void stabilization_indi_enter(void)
Function that resets important values upon engaging INDI.
void stabilization_indi_rate_run(bool in_flight, struct StabilizationSetpoint *sp, struct ThrustSetpoint *thrust, int32_t *cmd)
#define RC_RATE_R
#define RC_RATE_Q
#define YAW_RATE_DEADBAND_EXCEEDED(_rc)
#define RC_RATE_P
#define ROLL_RATE_DEADBAND_EXCEEDED(_rc)
#define PITCH_RATE_DEADBAND_EXCEEDED(_rc)
void stabilization_rate_enter(void)
Reset rate controller.
struct StabilizationSetpoint stabilization_rate_read_rc(struct RadioControl *rc)
void stabilization_rate_run(bool in_flight, struct StabilizationSetpoint *rate_sp, struct ThrustSetpoint *thrust, int32_t *cmd)
Run indi rate interface from the "stabilization_rate_run" function.
#define STABILIZATION_INDI_MAX_RATE
Maximum rate you can request in RC rate mode (rad/s)
static void send_rate(struct transport_tx *trans, struct link_device *dev)
struct FloatRates stabilization_rate_sp
void stabilization_rate_init(void)
Initialize rate controller.
Rate stabilization for rotorcrafts based on INDI.
static const struct usb_device_descriptor dev
Definition usb_ser_hw.c:74
Stabilization setpoint.
Thrust setpoint // TODO to a setpoint header Structure to store the desired thrust vector with differ...
struct tag_tracking_public dummy
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Definition telemetry.c:51
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
Definition telemetry.h:66
int int32_t
Typedef defining 32 bit int type.