Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bomb.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007-2009 ENAC, Pascal Brisset, Antoine Drouin
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 
27 #ifndef BOMB_H
28 #define BOMB_H
29 
30 #define MY_BOMB_RADIUS DEFAULT_CIRCLE_RADIUS
31 
32 extern unit_t bomb_compute_approach( uint8_t wp_target, uint8_t wp_start, float radius );
33 extern unit_t bomb_update_release( uint8_t wp_target );
34 extern unit_t bomb_shoot( void );
36 extern bool_t compute_alignment(uint8_t w1, uint8_t w2, uint8_t start, uint8_t end, float d_before, float d_after);
37 
38 
39 #define BombComputeApproach(_target, _start, _radius) bomb_compute_approach(_target, _start, _radius)
40 #define BombUpdateRelease(_wp) bomb_update_release(_wp)
41 #define BombReadyToShoot() bomb_ready_to_shoot()
42 #define BombShoot() bomb_shoot()
43 #define BombCloseHatch() ({ ap_state->commands[COMMAND_HATCH] = MIN_PPRZ; })
44 #define BombAligned() Qdr(DegOfRad(bomb_qdr_aligned))
45 
46 
47 extern bool_t compute_tod( void );
48 extern unit_t compute_baseleg( void );
49 extern float baseleg_alt, downwind_altitude;
50 extern const float baseleg_alt_tolerance;
51 
52 #endif // BOMB_H
const float baseleg_alt_tolerance
bool_t compute_alignment(uint8_t w1, uint8_t w2, uint8_t start, uint8_t end, float d_before, float d_after)
static float radius
Definition: chemotaxis.c:15
float baseleg_alt
unit_t bomb_update_release(uint8_t wp_target)
float bomb_start_qdr
float downwind_altitude
unit_t bomb_shoot(void)
bool_t compute_tod(void)
unsigned char uint8_t
Definition: types.h:14
float bomb_trigger_delay
unit_t compute_baseleg(void)
unit_t bomb_compute_approach(uint8_t wp_target, uint8_t wp_start, float radius)