Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
autopilot_guided.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 The Paparazzi Team
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, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
29 #ifndef AUTOPILOT_GUIDED_H
30 #define AUTOPILOT_GUIDED_H
31 
32 #include "std.h"
33 
41 extern bool autopilot_guided_goto_ned(float x, float y, float z, float heading);
42 
50 extern bool autopilot_guided_goto_ned_relative(float dx, float dy, float dz, float dyaw);
51 
59 extern bool autopilot_guided_goto_body_relative(float dx, float dy, float dz, float dyaw);
60 
68 extern bool autopilot_guided_move_ned(float vx, float vy, float vz, float heading);
69 
89 extern void autopilot_guided_update(uint8_t flags, float x, float y, float z, float yaw);
90 
93 extern void autopilot_guided_parse_GUIDED(uint8_t *buf);
94 
98 #define GUIDED_FLAG_XY_OFFSET (1<<0)
99 #define GUIDED_FLAG_XY_BODY (1<<1)
100 #define GUIDED_FLAG_Z_OFFSET (1<<2)
101 #define GUIDED_FLAG_YAW_OFFSET (1<<3)
102 #define GUIDED_FLAG_XY_VEL (1<<5)
103 #define GUIDED_FLAG_Z_VEL (1<<6)
104 #define GUIDED_FLAG_YAW_RATE (1<<7)
105 
108 #define NavGuided(_flags, _x, _y, _z, _yaw) { \
109  nav.horizontal_mode = NAV_HORIZONTAL_MODE_GUIDED; \
110  nav.vertical_mode = NAV_VERTICAL_MODE_GUIDED; \
111  autopilot_guided_update(_flags, _x, _y, _z, _yaw); \
112 }
113 
114 #endif /* AUTOPILOT_GUIDED_H */
115 
void autopilot_guided_update(uint8_t flags, float x, float y, float z, float yaw)
Set guided setpoints using flag mask in GUIDED mode.
bool autopilot_guided_move_ned(float vx, float vy, float vz, float heading)
Set velocity and heading setpoints in GUIDED mode.
void autopilot_guided_parse_GUIDED(uint8_t *buf)
Parse GUIDED_SETPOINT_NED messages from datalink.
bool autopilot_guided_goto_ned_relative(float dx, float dy, float dz, float dyaw)
Set position and heading setpoints wrt.
bool autopilot_guided_goto_body_relative(float dx, float dy, float dz, float dyaw)
Set position and heading setpoints wrt.
bool autopilot_guided_goto_ned(float x, float y, float z, float heading)
Set position and heading setpoints in GUIDED mode.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98
float heading
Definition: wedgebug.c:258