Merged in f5soh/librepilot/update_credits (pull request #529)
[librepilot.git] / matlab / ins / insgps.h
blobd4b5b6232ce4c2fa21a796e6580a12e74fee8766
1 /**
2 ******************************************************************************
3 * @addtogroup AHRS
4 * @{
5 * @addtogroup INSGPS
6 * @{
7 * @brief INSGPS is a joint attitude and position estimation EKF
9 * @file insgps.h
10 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
11 * @brief Include file of the INSGPS exposed functionality.
13 * @see The GNU Public License (GPL) Version 3
15 *****************************************************************************/
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 3 of the License, or
20 * (at your option) any later version.
22 * This program is distributed in the hope that it will be useful, but
23 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
24 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25 * for more details.
27 * You should have received a copy of the GNU General Public License along
28 * with this program; if not, write to the Free Software Foundation, Inc.,
29 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 #ifndef INSGPS_H_
33 #define INSGPS_H_
35 /**
36 * @addtogroup Constants
37 * @{
39 #define POS_SENSORS 0x007
40 #define HORIZ_SENSORS 0x018
41 #define VERT_SENSORS 0x020
42 #define MAG_SENSORS 0x1C0
43 #define BARO_SENSOR 0x200
45 #define FULL_SENSORS 0x3FF
47 /**
48 * @}
51 // Exposed Function Prototypes
52 void INSGPSInit();
53 void INSStatePrediction(float gyro_data[3], float accel_data[3], float dT);
54 void INSCovariancePrediction(float dT);
56 void INSSetPosVelVar(float PosVar);
57 void INSSetGyroBias(float gyro_bias[3]);
58 void INSSetAccelVar(float accel_var[3]);
59 void INSSetGyroVar(float gyro_var[3]);
60 void INSSetMagNorth(float B[3]);
61 void INSSetMagVar(float scaled_mag_var[3]);
62 void INSPosVelReset(float pos[3], float vel[3]);
64 void MagCorrection(float mag_data[3]);
65 void BaroCorrection(float baro);
66 void GpsCorrection(float Pos[3], float Vel[3]);
67 void MagVelBaroCorrection(float mag_data[3], float Vel[3], float BaroAlt);
68 void FullCorrection(float mag_data[3], float Pos[3], float Vel[3],
69 float BaroAlt);
70 void GpsBaroCorrection(float Pos[3], float Vel[3], float BaroAlt);
71 void GpsMagCorrection(float mag_data[3], float Pos[3], float Vel[2]);
72 void VelBaroCorrection(float Vel[3], float BaroAlt);
74 /**
75 * @}
76 * @}
79 #endif /* EKF_H_ */