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
gvf_low_level_control.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Hector Garcia de Marina <hgarciad@ucm.es>
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
27#ifndef GVF_LOW_LEVEL_CONTROL_H
28#define GVF_LOW_LEVEL_CONTROL_H
29
30#ifdef FIXEDWING_FIRMWARE
34#define gvf_setNavMode(_navMode) (horizontal_mode = _navMode)
35#define GVF_MODE_ROUTE HORIZONTAL_MODE_ROUTE
36#define GVF_MODE_WAYPOINT HORIZONTAL_MODE_WAYPOINT
37#define GVF_MODE_CIRCLE HORIZONTAL_MODE_CIRCLE
38
39#elif defined(ROVER_FIRMWARE)
40#include "state.h"
42#define gvf_setNavMode(_navMode) (nav.mode = _navMode)
43#define GVF_MODE_ROUTE NAV_MODE_ROUTE
44#define GVF_MODE_WAYPOINT NAV_MODE_WAYPOINT
45#define GVF_MODE_CIRCLE NAV_MODE_CIRCLE
46
47#elif defined(ROTORCRAFT_FIRMWARE)
49#define gvf_setNavMode(_navMode) (nav.horizontal_mode = _navMode)
50#define GVF_MODE_ROUTE NAV_HORIZONTAL_MODE_ROUTE
51#define GVF_MODE_WAYPOINT NAV_HORIZONTAL_MODE_WAYPOINT
52#define GVF_MODE_CIRCLE NAV_HORIZONTAL_MODE_CIRCLE
53
54//NAV_SETPOINT_MODE_POS
55//NAV_SETPOINT_MODE_SPEED
56//NAV_SETPOINT_MODE_ACCEL
57
58#else
59#error "GVF does not support your firmware yet!"
60#endif
61
62// Low level control functions
63extern void gvf_low_level_getState(void);
64extern void gvf_low_level_control_2D(float);
65
66#endif // GVF_LOW_LEVEL_CONTROL_H
67
Fixed wing horizontal control.
void gvf_low_level_control_2D(float)
void gvf_low_level_getState(void)
Fixedwing Navigation library.
Rotorcraft navigation functions.
Rover navigation functions.
API to get/set the generic vehicle states.