资源简介
openpilot开源项目的飞控代码
对于做四轴的童鞋有帮助地
代码片段和文件信息
/**
******************************************************************************
* @addtogroup AHRS AHRS
* @brief The AHRS Modules perform
*
* @{
* @addtogroup AHRS_Main
* @brief Main function which does the hardware dependent stuff
* @{
*
*
* @file ahrs.c
* @author The OpenPilot Team http://www.openpilot.org Copyright (C) 2010.
* @brief INSGPS Test Program
* @see The GNU Public License (GPL) Version 3
*
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not write to the Free Software Foundation Inc.
* 59 Temple Place Suite 330 Boston MA 02111-1307 USA
*/
/* OpenPilot Includes */
#include “ahrs.h“
#include
#include “pios.h“
#include “ahrs_timer.h“
#include “ahrs_spi_comm.h“
#include “insgps.h“
#include “CoordinateConversions.h“
#include
#include “fifo_buffer.h“
#define DEG_TO_RAD (M_PI / 180.0)
#define RAD_TO_DEG (180.0 / M_PI)
#define INSGPS_GPS_TIMEOUT 2 /* 2 seconds triggers reinit of position */
#define INSGPS_GPS_MINSAT 6 /* 2 seconds triggers reinit of position */
#define INSGPS_GPS_MINPDOP 3.5 /* minimum PDOP for postition updates */
#define INSGPS_MAGLEN 1000
#define INSGPS_MAGTOL 0.5 /* error in magnetic vector length to use */
#define GYRO_OOB(x) ((x > (1000 * DEG_TO_RAD)) || (x < (-1000 * DEG_TO_RAD)))
#define ACCEL_OOB(x) (((x > 12*9.81) || (x < -12*9.81)))
#define ISNAN(x) (x != x)
// down-sampled data index
#define ACCEL_RAW_X_IDX 2
#define ACCEL_RAW_Y_IDX 0
#define ACCEL_RAW_Z_IDX 4
#define GYRO_RAW_X_IDX 1
#define GYRO_RAW_Y_IDX 3
#define GYRO_RAW_Z_IDX 5
#define GYRO_TEMP_RAW_XY_IDX 6
#define GYRO_TEMP_RAW_Z_IDX 7
#define MAG_RAW_X_IDX 1
#define MAG_RAW_Y_IDX 0
#define MAG_RAW_Z_IDX 2
// For debugging the raw sensors
//#define DUMP_RAW
//#define DUMP_EKF
//#define PIP_DUMP_RAW
volatile int8_t ahrs_algorithm;
/* INS functions */
void ins_outdoor_update();
void ins_indoor_update();
void simple_update();
/* Data accessors */
void adc_callback(float *);
bool get_accel_gyro_data();
void process_mag_data();
void reset_values();
void calibrate_sensors(void);
/* Communication functions */
void send_calibration(void);
void send_attitude(void);
void send_velocity(void);
void send_positi
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-04-05 19:30 flight\
目录 0 2011-12-27 15:44 flight\AHRS\
文件 42418 2011-12-27 14:57 flight\AHRS\ahrs.c
文件 1865 2011-12-27 14:57 flight\AHRS\ahrs_timer.c
目录 0 2011-12-27 15:44 flight\AHRS\inc\
文件 2510 2011-12-27 14:57 flight\AHRS\inc\ahrs.h
文件 2977 2011-12-27 14:57 flight\AHRS\inc\ahrs_fsm.h
文件 1489 2011-12-27 14:57 flight\AHRS\inc\ahrs_timer.h
文件 3071 2011-12-27 14:57 flight\AHRS\inc\insgps.h
文件 1666 2011-12-27 14:57 flight\AHRS\inc\pios_config.h
文件 62531 2011-12-27 14:57 flight\AHRS\insgps13state.c
文件 69599 2011-12-27 14:57 flight\AHRS\insgps16state.c
文件 13440 2011-12-27 14:57 flight\AHRS\Makefile
文件 11588 2011-12-27 14:57 flight\AHRS\pios_board.c
文件 839 2011-12-27 14:57 flight\AHRS\test.c
目录 0 2011-12-27 15:44 flight\Bootloaders\
目录 0 2011-12-27 15:44 flight\Bootloaders\AHRS\
文件 948 2011-12-27 14:57 flight\Bootloaders\AHRS\ahrs_slave_test.c
文件 3731 2011-12-27 14:57 flight\Bootloaders\AHRS\ahrs_spi_program.c
文件 4243 2011-12-27 14:57 flight\Bootloaders\AHRS\ahrs_spi_program_master.c
文件 3782 2011-12-27 14:57 flight\Bootloaders\AHRS\ahrs_spi_program_slave.c
文件 17754 2011-12-27 14:57 flight\Bootloaders\AHRS\bl_fsm.c
目录 0 2011-12-27 15:44 flight\Bootloaders\AHRS\inc\
文件 1693 2011-12-27 14:57 flight\Bootloaders\AHRS\inc\ahrs_bl.h
文件 2133 2011-12-27 14:57 flight\Bootloaders\AHRS\inc\ahrs_spi_program.h
文件 2076 2011-12-27 14:57 flight\Bootloaders\AHRS\inc\ahrs_spi_program_master.h
文件 1432 2011-12-27 14:57 flight\Bootloaders\AHRS\inc\ahrs_spi_program_slave.h
文件 3014 2011-12-27 14:57 flight\Bootloaders\AHRS\inc\bl_fsm.h
文件 1549 2011-12-27 14:57 flight\Bootloaders\AHRS\inc\pios_config.h
文件 8578 2011-12-27 14:57 flight\Bootloaders\AHRS\main.c
文件 13413 2011-12-27 14:57 flight\Bootloaders\AHRS\Makefile
............此处省略809个文件信息
- 上一篇:Sed & Awk 2nd edition
- 下一篇:使用LAME实现wav转mp3
相关资源
- stm32f103上移植fatfs文件系统
- STM32,MPU6050(硬件IIC)
- STM32双通道DMA数据
- STM32温湿度光照采集程序IIC
- STM32固件库使用手册中文版
- 基于stm32的示波器程序
- 基于tmc2660的步进电机S加减速曲线设计
- 思岚激光雷达数据读取
- 智能宠物喂食器 程序
- stm32f103c8t6最小系统版PWM程序
- stm32带引脚图.pdf
- stm32基本例程 PWM输出实验
- STM32控制舵机任意角度转动0--180度 M
- stm32f407+dm9161驱动程序
- STM32最简单的蜂鸣器程序
- stm32f103串口接收数据后发送数组的数
- STM32 数控电源原理图和程序
- 扭扭车平衡车原理图免费stm32 rct6
- hx711串口stm32例程
- stm32 f429 disco 示波器程序
- 基于STM32的ISD1700控制
- 正点原子stm32f407探索者LD3320语音识别
- stm32控制nfcPN532模块进行P2P点对点通信
- stm32f103c8t6的四轮小车驱动,内部含有
- 这是用stm32F103C8T6操作oled的程序
- 六机器人STM32F103控制程序源码
- 蜘蛛机器人STM32F103控制程序源码
- stm32小车控制程序
- stm32 iic 控制0.96寸oled
- STM32 PWM 步进电机 脉冲输出带占空比修
评论
共有 条评论