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
ctrl_module_innerloop_demo.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015
3 *
4 * This file is part of Paparazzi.
5 *
6 * Paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * Paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Paparazzi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 */
20
28#include "state.h"
30#include "generated/radio.h"
32
40
41float ctrl_module_demo_pr_ff_gain = 0.2f; // Pitch/Roll
43float ctrl_module_demo_y_ff_gain = 0.4f; // Yaw
45
53
54// simple rate control without reference model nor attitude
73
74
76// Call our controller
78{
80}
81
82void guidance_module_run(bool in_flight)
83{
84 // -MAX_PPRZ to MAX_PPRZ
89 // Call full inner-/outerloop / horizontal-/vertical controller:
90 ctrl_module_run(in_flight);
91}
92
void ctrl_module_init(void)
float ctrl_module_demo_y_d_gain
static void ctrl_module_run(bool in_flight)
struct ctrl_module_demo_struct ctrl_module_demo
void guidance_module_enter(void)
void guidance_module_run(bool in_flight)
float ctrl_module_demo_y_ff_gain
float ctrl_module_demo_pr_d_gain
float ctrl_module_demo_pr_ff_gain
example empty controller
int32_t p
in rad/s with INT32_RATE_FRAC
int32_t r
in rad/s with INT32_RATE_FRAC
int32_t q
in rad/s with INT32_RATE_FRAC
static struct Int32Rates * stateGetBodyRates_i(void)
Get vehicle body angular rate (int).
Definition state.h:1358
uint16_t foo
Definition main_demo5.c:58
struct RadioControl radio_control
Generic interface for radio control modules.
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
struct Stabilization stabilization
General stabilization interface for rotorcrafts.
int32_t cmd[COMMANDS_NB]
output command vector, range from [-MAX_PPRZ:MAX_PPRZ] (store for messages)
API to get/set the generic vehicle states.