Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
ins_skeleton.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Felix Ruess <felix.ruess@gmail.com>
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 
28 #ifndef INS_SKELETON_H
29 #define INS_SKELETON_H
30 
31 #include "std.h"
32 #include "math/pprz_geodetic_int.h"
33 #include "math/pprz_algebra_int.h"
35 
36 #include "modules/ins/ins.h"
37 #include "modules/gps/gps.h"
38 
40 struct InsModuleInt {
41  struct LtpDef_i ltp_def;
43 
44  /* output LTP NED */
45  struct NedCoor_i ltp_pos;
46  struct NedCoor_i ltp_speed;
47  struct NedCoor_i ltp_accel;
48 
50  struct GpsState gps;
51 };
52 
54 extern struct InsModuleInt ins_module;
55 
56 extern void ins_module_wrapper_init(void);
57 
58 /* these functions can/should be implemented in your module */
59 extern void ins_module_init(void);
60 extern void ins_module_propagate(struct Int32Vect3 *accel, float dt);
61 extern void ins_module_update_gps(struct GpsState *gps_s, float dt);
62 extern void ins_module_update_baro(float pressure);
64 
65 #endif /* INS_SKELETON_H */
Device independent GPS code (interface)
data structure for GPS information
Definition: gps.h:86
definition of the local (flat earth) coordinate system
vector in North East Down coordinates
Integrated Navigation System interface.
void ins_module_update_gps(struct GpsState *gps_s, float dt)
Definition: ins_skeleton.c:151
void ins_module_wrapper_init(void)
Definition: ins_skeleton.c:214
struct NedCoor_i ltp_speed
velocity in m/s in BFP with INT32_SPEED_FRAC
Definition: ins_skeleton.h:46
struct NedCoor_i ltp_pos
position in m in BFP with INT32_POS_FRAC
Definition: ins_skeleton.h:45
struct LtpDef_i ltp_def
Definition: ins_skeleton.h:41
void ins_module_reset_local_origin(void)
Definition: ins_skeleton.c:189
void ins_module_update_baro(float pressure)
Definition: ins_skeleton.c:147
void ins_module_init(void)
Definition: ins_skeleton.c:143
struct GpsState gps
internal copy of last GPS message
Definition: ins_skeleton.h:50
struct NedCoor_i ltp_accel
Definition: ins_skeleton.h:47
struct InsModuleInt ins_module
global INS state
Definition: ins_skeleton.c:70
bool ltp_initialized
Definition: ins_skeleton.h:42
void ins_module_propagate(struct Int32Vect3 *accel, float dt)
Definition: ins_skeleton.c:179
Ins implementation state (fixed point)
Definition: ins_skeleton.h:40
Paparazzi fixed point algebra.
Paparazzi fixed point math for geodetic calculations.
Generic orientation representation and conversions.