Paparazzi UAS  v5.18.0_stable
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 {
48 
49  struct FloatVect3 mag_h;
50 
52 
54  float P[6][6];
55  float lp_accel;
56 
59 
61  bool is_aligned;
62 };
63 
64 extern struct AhrsMlkf ahrs_mlkf;
65 
66 extern void ahrs_mlkf_init(void);
68 extern void ahrs_mlkf_set_body_to_imu_quat(struct FloatQuat *q_b2i);
69 extern bool ahrs_mlkf_align(struct FloatRates *lp_gyro, struct FloatVect3 *lp_accel,
70  struct FloatVect3 *lp_mag);
71 extern void ahrs_mlkf_propagate(struct FloatRates *gyro, float dt);
72 extern void ahrs_mlkf_update_accel(struct FloatVect3 *accel);
73 extern void ahrs_mlkf_update_mag(struct FloatVect3 *mag);
74 extern void ahrs_mlkf_update_mag_2d(struct FloatVect3 *mag);
75 extern void ahrs_mlkf_update_mag_full(struct FloatVect3 *mag);
76 
77 #endif /* AHRS_FLOAT_MLKF_H */
OrientationReps
Definition: pprz_orientation_conversion.h:79
AhrsMlkf::is_aligned
bool is_aligned
Definition: ahrs_float_mlkf.h:61
AhrsMlkf::mag_h
struct FloatVect3 mag_h
Definition: ahrs_float_mlkf.h:49
AhrsMlkfStatus
AhrsMlkfStatus
Definition: ahrs_float_mlkf.h:38
AHRS_MLKF_UNINIT
@ AHRS_MLKF_UNINIT
Definition: ahrs_float_mlkf.h:39
ahrs_mlkf_update_mag_full
void ahrs_mlkf_update_mag_full(struct FloatVect3 *mag)
Definition: ahrs_float_mlkf.c:156
AhrsMlkf::mag_noise
struct FloatVect3 mag_noise
Definition: ahrs_float_mlkf.h:51
AhrsMlkf::gyro_bias
struct FloatRates gyro_bias
Definition: ahrs_float_mlkf.h:47
AhrsMlkf::status
enum AhrsMlkfStatus status
Definition: ahrs_float_mlkf.h:60
pprz_algebra_float.h
Paparazzi floating point algebra.
AhrsMlkf::body_to_imu
struct OrientationReps body_to_imu
body_to_imu rotation
Definition: ahrs_float_mlkf.h:58
ahrs_mlkf_propagate
void ahrs_mlkf_propagate(struct FloatRates *gyro, float dt)
Definition: ahrs_float_mlkf.c:122
AhrsMlkf::imu_rate
struct FloatRates imu_rate
Rotational velocity in IMU frame.
Definition: ahrs_float_mlkf.h:46
FloatVect3
Definition: pprz_algebra_float.h:54
FloatQuat
Roation quaternion.
Definition: pprz_algebra_float.h:63
std.h
ahrs_mlkf
struct AhrsMlkf ahrs_mlkf
Definition: ahrs_float_mlkf.c:59
ahrs_mlkf_init
void ahrs_mlkf_init(void)
Definition: ahrs_float_mlkf.c:62
AhrsMlkf::lp_accel
float lp_accel
Definition: ahrs_float_mlkf.h:55
AhrsMlkf::ltp_to_body_quat
struct FloatQuat ltp_to_body_quat
Rotation from LocalTangentPlane to body frame as unit quaternion.
Definition: ahrs_float_mlkf.h:45
ahrs_mlkf_update_mag
void ahrs_mlkf_update_mag(struct FloatVect3 *mag)
Definition: ahrs_float_mlkf.c:141
ahrs_mlkf_set_body_to_imu_quat
void ahrs_mlkf_set_body_to_imu_quat(struct FloatQuat *q_b2i)
Definition: ahrs_float_mlkf.c:96
ahrs_mlkf_set_body_to_imu
void ahrs_mlkf_set_body_to_imu(struct OrientationReps *body_to_imu)
Definition: ahrs_float_mlkf.c:91
pprz_orientation_conversion.h
AhrsMlkf::gibbs_cor
struct FloatQuat gibbs_cor
Definition: ahrs_float_mlkf.h:53
ahrs_mlkf_align
bool ahrs_mlkf_align(struct FloatRates *lp_gyro, struct FloatVect3 *lp_accel, struct FloatVect3 *lp_mag)
Definition: ahrs_float_mlkf.c:107
body_to_imu
static struct OrientationReps body_to_imu
Definition: ins_alt_float.c:93
AhrsMlkf::ltp_to_imu_quat
struct FloatQuat ltp_to_imu_quat
Rotation from LocalTangentPlane to IMU frame as unit quaternion.
Definition: ahrs_float_mlkf.h:44
AhrsMlkf
Definition: ahrs_float_mlkf.h:43
ahrs_mlkf_update_accel
void ahrs_mlkf_update_accel(struct FloatVect3 *accel)
Definition: ahrs_float_mlkf.c:128
AhrsMlkf::P
float P[6][6]
Definition: ahrs_float_mlkf.h:54
ahrs_mlkf_update_mag_2d
void ahrs_mlkf_update_mag_2d(struct FloatVect3 *mag)
Definition: ahrs_float_mlkf.c:150
FloatRates
angular rates
Definition: pprz_algebra_float.h:93
AHRS_MLKF_RUNNING
@ AHRS_MLKF_RUNNING
Definition: ahrs_float_mlkf.h:40