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
ins_int.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2012 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 INS_INT_H
30 #define INS_INT_H
31 
32 #include "subsystems/ins.h"
33 #include "std.h"
34 #include "math/pprz_geodetic_int.h"
36 
37 // TODO integrate all internal state to the structure
39 //struct InsInt {
40 //};
41 //
43 //extern struct InsInt ins_impl;
44 
45 /* gps transformed to LTP-NED */
46 extern struct LtpDef_i ins_ltp_def;
47 extern bool_t ins_ltp_initialised;
48 extern struct NedCoor_i ins_gps_pos_cm_ned;
49 extern struct NedCoor_i ins_gps_speed_cm_s_ned;
50 
51 /* barometer */
52 #if USE_VFF || USE_VFF_EXTENDED
53 extern int32_t ins_baro_alt;
54 extern int32_t ins_qfe;
55 extern bool_t ins_baro_initialised;
56 #if USE_SONAR
57 extern bool_t ins_update_on_agl; /* use sonar to update agl if available */
59 #endif
60 #endif
61 
62 /* output LTP NED */
63 extern struct NedCoor_i ins_ltp_pos;
64 extern struct NedCoor_i ins_ltp_speed;
65 extern struct NedCoor_i ins_ltp_accel;
66 #if USE_HFF
67 /* horizontal gps transformed to NED in meters as float */
68 extern struct FloatVect2 ins_gps_pos_m_ned;
69 extern struct FloatVect2 ins_gps_speed_m_s_ned;
70 #endif
71 
72 /* copy position and speed to state interface */
73 #define INS_NED_TO_STATE() { \
74  stateSetPositionNed_i(&ins_ltp_pos); \
75  stateSetSpeedNed_i(&ins_ltp_speed); \
76  stateSetAccelNed_i(&ins_ltp_accel); \
77 }
78 
79 #endif /* INS_INT_H */
struct NedCoor_i ins_ltp_pos
Definition: ins_ardrone2.c:50
int32_t ins_qfe
Definition: ins_alt_float.c:50
int32_t ins_sonar_offset
struct NedCoor_i ins_ltp_speed
Definition: ins_ardrone2.c:55
Integrated Navigation System interface.
vector in North East Down coordinates
definition of the local (flat earth) coordinate system
struct NedCoor_i ins_gps_pos_cm_ned
Definition: ins_int.c:63
bool_t ins_baro_initialised
Definition: ins_alt_float.c:51
Paparazzi floating point algebra.
struct LtpDef_i ins_ltp_def
Ins implementation state (fixed point)
Definition: ins_ardrone2.c:51
float ins_baro_alt
Definition: ins_alt_float.c:52
Paparazzi fixed point math for geodetic calculations.
signed long int32_t
Definition: types.h:19
bool_t ins_update_on_agl
bool_t ins_ltp_initialised
Definition: ins_ardrone2.c:57
struct NedCoor_i ins_gps_speed_cm_s_ned
Definition: ins_int.c:64
struct NedCoor_i ins_ltp_accel
Definition: ins_ardrone2.c:54