Simple example to show how to get an estimation of the attitude with a 9DOF IMU and the Kalman filter
Dependencies: L3GD20 LSM303DLHC mbed-dsp mbed
Fork of minimu-9v2 by
sensfusion9.h
00001 /** 00002 * || ____ _ __ ______ 00003 * +------+ / __ )(_) /_/ ____/_________ _____ ___ 00004 * | 0xBC | / __ / / __/ / / ___/ __ `/_ / / _ \ 00005 * +------+ / /_/ / / /_/ /___ / / / /_/ / / /_/ __/ 00006 * || || /_____/_/\__/\____//_/ \__,_/ /___/\___/ 00007 * 00008 * Crazyflie control firmware 00009 * 00010 * Copyright (C) 2011-2012 Bitcraze AB 00011 * 00012 * This program is free software: you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation, in version 3. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00023 * 00024 */ 00025 00026 #ifndef SENSORFUSION9_H_ 00027 #define SENSORFUSION9_H_ 00028 #include <stdbool.h> 00029 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 void sensfusion9Init(void); 00036 bool sensfusion9Test(void); 00037 00038 void sensfusion9UpdateQ(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz, float dt); 00039 void sensfusion9GetEulerRPY(float* roll, float* pitch, float* yaw); 00040 void sensfusion9GetQuaternion(float* Q0, float* Q1, float* Q2, float* Q3); 00041 float sensfusion9GetAccZWithoutGravity(const float ax, const float ay, const float az); 00042 float sensfusion9GetInvThrustCompensationForTilt(); 00043 00044 #ifdef __cplusplus 00045 } 00046 #endif 00047 00048 #endif /* SENSORFUSION9_H_ */
Generated on Tue Jul 12 2022 23:01:10 by 1.7.2