Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ahrs_madgwick.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Gautier Hattenberger <gautier.hattenberger@enac.fr>
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
29#ifndef AHRS_MADGWICK_H
30#define AHRS_MADGWICK_H
31
32#include "modules/ahrs/ahrs.h"
35
46
47extern struct AhrsMadgwick ahrs_madgwick;
48
49extern void ahrs_madgwick_init(void);
50extern void ahrs_madgwick_align(struct FloatRates *lp_gyro, struct FloatVect3 *lp_accel);
51extern void ahrs_madgwick_propagate(struct FloatRates* gyro, float dt);
53
54#endif /* AHRS_MADGWICK_H */
55
struct AhrsMadgwick ahrs_madgwick
void ahrs_madgwick_propagate(struct FloatRates *gyro, float dt)
bool is_aligned
aligned flag
bool reset
flag to request reset/reinit the filter
void ahrs_madgwick_update_accel(struct FloatVect3 *accel)
struct FloatRates rates
Measured gyro rates.
struct FloatVect3 accel
Measured accelerometers.
void ahrs_madgwick_align(struct FloatRates *lp_gyro, struct FloatVect3 *lp_accel)
struct FloatQuat quat
Estimated attitude (quaternion)
void ahrs_madgwick_init(void)
struct FloatRates bias
Gyro bias (from alignment)
Madgwick filter structure.
Roation quaternion.
angular rates
Paparazzi floating point algebra.
Generic orientation representation and conversions.