Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
rot_wing_automation.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Dennis van Wijngaarden <D.C.vanWijngaarden@tudelft.nl>
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 
26 #ifndef ROT_WING_AUTOMATION_H
27 #define ROT_WING_AUTOMATION_H
28 
29 #include "std.h"
32 
33 extern void init_rot_wing_automation(void);
34 extern void periodic_rot_wing_automation(void);
35 extern void rot_wing_vis_transition(uint8_t wp_transition_id, uint8_t wp_decel_id, uint8_t wp_end_id);
36 
38  // Constants
39  float trans_accel; // Acceleration during transition
40  float trans_decel; // Deceleration during transition
41  float trans_length; // Transition length
42  float trans_airspeed; // Transition airspeed
43 
44  // Variables
45  bool transitioned; // Boolean that indicates if drone flies faster than transion airspeed
46  struct FloatVect2 windvect; // Wind vector
47  struct FloatVect2 windvect_f; // Filtered wind vector
48 };
49 
50 extern struct rot_wing_automation rot_wing_a;
51 
52 #define RotWingAutomationReadyForForward() (rot_wing_a.transitioned && (rotwing_state_skewing.wing_angle_deg > 75.0))
53 
54 
55 #endif // ROT_WING_AUTOMATION_H
Paparazzi floating point algebra.
struct rot_wing_automation rot_wing_a
struct FloatVect2 windvect
void init_rot_wing_automation(void)
void rot_wing_vis_transition(uint8_t wp_transition_id, uint8_t wp_decel_id, uint8_t wp_end_id)
struct FloatVect2 windvect_f
void periodic_rot_wing_automation(void)
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98