Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
ahrs_float_mlkf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011-2012 Antoine Drouin <poinix@gmail.com>
3  * Copyright (C) 2013 Felix Ruess <felix.ruess@gmail.com>
4  *
5  * This file is part of paparazzi.
6  *
7  * paparazzi is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * paparazzi is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with paparazzi; see the file COPYING. If not, write to
19  * the Free Software Foundation, 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22 
31 #ifndef AHRS_FLOAT_MLKF_H
32 #define AHRS_FLOAT_MLKF_H
33 
34 #include "std.h"
37 
41 };
42 
43 struct AhrsMlkf {
45  struct FloatRates body_rate;
46  struct FloatRates gyro_bias;
47 
48  struct FloatVect3 mag_h;
49 
50  struct FloatVect3 mag_noise;
51 
52  struct FloatQuat gibbs_cor;
53  float P[6][6];
54  float lp_accel;
55 
57  bool is_aligned;
58 };
59 
60 extern struct AhrsMlkf ahrs_mlkf;
61 
62 extern void ahrs_mlkf_init(void);
63 extern bool ahrs_mlkf_align(struct FloatRates *lp_gyro, struct FloatVect3 *lp_accel,
64  struct FloatVect3 *lp_mag);
65 extern void ahrs_mlkf_propagate(struct FloatRates *gyro, float dt);
66 extern void ahrs_mlkf_update_accel(struct FloatVect3 *accel);
67 extern void ahrs_mlkf_update_mag(struct FloatVect3 *mag);
68 extern void ahrs_mlkf_update_mag_2d(struct FloatVect3 *mag);
69 extern void ahrs_mlkf_update_mag_full(struct FloatVect3 *mag);
70 
71 #endif /* AHRS_FLOAT_MLKF_H */
float P[6][6]
void ahrs_mlkf_update_mag(struct FloatVect3 *mag)
bool is_aligned
void ahrs_mlkf_update_accel(struct FloatVect3 *accel)
struct FloatVect3 mag_h
void ahrs_mlkf_init(void)
bool ahrs_mlkf_align(struct FloatRates *lp_gyro, struct FloatVect3 *lp_accel, struct FloatVect3 *lp_mag)
void ahrs_mlkf_update_mag_full(struct FloatVect3 *mag)
struct FloatQuat gibbs_cor
enum AhrsMlkfStatus status
struct FloatRates gyro_bias
struct FloatVect3 mag_noise
struct AhrsMlkf ahrs_mlkf
void ahrs_mlkf_propagate(struct FloatRates *gyro, float dt)
void ahrs_mlkf_update_mag_2d(struct FloatVect3 *mag)
AhrsMlkfStatus
@ AHRS_MLKF_RUNNING
@ AHRS_MLKF_UNINIT
struct FloatQuat ltp_to_body_quat
Rotation from LocalTangentPlane to body frame as unit quaternion.
float lp_accel
struct FloatRates body_rate
Rotational velocity in body frame.
Roation quaternion.
angular rates
Paparazzi floating point algebra.
Generic orientation representation and conversions.