Go to file
AJ Christensen 46291a8374 Dual-stage Gyro Filtering: PT1, Biquad, Butterworth, Denoise (FIR), FKF (fixed K), and Biquad RC+FIR2 (#5391)
* Dual-stage Gyro Filtering: PT1, FKF, and Biquad RC+FIR2

* Builds on the previous work of apocolipse.
* Fixes 'stage2'/'stage1' mis-naming to reflect where it is applied in the loop.
  That is, the older Biquad, PT1, Denoise (FIR) filters are 'stage2' - applied
  after dynamic and static notches (if enabled), and the controversial PT1,
  'fast Kalman' filter, and Biquad RC+FIR2 filters, are 'stage1'. e.g. before
  dynamic notch.
* FKF bruteforce Kalman gain removed. Calculate from half of PT1 RC constant,
  automatically taking loop-time into account.
* New union type definition for stage1 filtering.
* New gyro sensor members for stage1 filter application function and states for
  all three supported filter types
* New enum types for stage1 v. stage2. dterm lowpass type references 'stage2'.
* updates to CMS/MSP/FC to allow compilation (untested, probably breaks
  MSP, Lua, and ~comms with BFC~).
* Refactors FKF initialization, update and associated structures to be faster by
  not continuously calculating 'k'. Filter gain is calculated once during
  initialization from RC constant as per PT1 and Biquad RC+FIR2. It was
  discovered this converges to static value within 100 samples at 32kHz, so can
  be removed. Remove related interface (CLI) settings.
* update dterm_lowpass_type to use new 'TABLE_LOWPASS2_TYPE' (biquad/pt1/FIR)
* Stage 1 defaults to PT1, 763Hz (equivalent to Q400 / R88 from quasi-kalman
  filter) - suitable for 32kHz sampling modes. Can be switched to Biquad
  RC+FIR2, and FKF.
* Update `#if defined(USE_GYRO_SLEW_LIMITER) to `#ifdef`.
* Includes optional Lagged Moving Average 'smoothing' pipeline step, applied (in
  code) after the output of stage1.
* (diehertz): Removed redundant pointers from gyro filtering

* blackbox: fix indentation

* cms IMU menu: fix indentation

* filters: remove USE_GYRO_FIR_FILTER_DENOISE in filter type enum

* gyro sensors: go back to `if defined()` form. for slew limiter

* gyro sensors: increment parameter group version

* due to non-appending changes, the version must be bumped.
2018-03-21 15:52:59 +13:00
.github Updated README and pull request template after 3.3 release. 2018-03-03 11:11:52 +13:00
docs If RSSI Channel is set to Disabled when using S.Bus then generate RSS… (#5090) 2018-03-21 13:36:23 +13:00
lib CF/BF - Update DSP_Lib and STM32F7/Drivers/CMSIS to CMSIS 5.3.0. (#5431) 2018-03-12 09:34:43 +13:00
make Reimplement strtol/strtoul/atoi (#5400) 2018-03-13 09:24:15 +13:00
src Dual-stage Gyro Filtering: PT1, Biquad, Butterworth, Denoise (FIR), FKF (fixed K), and Biquad RC+FIR2 (#5391) 2018-03-21 15:52:59 +13:00
support extra files 2016-06-16 02:39:00 -07:00
.gitattributes Added .mk as files with LF line ending. Converted a few files in the make dir. 2017-11-05 20:41:17 +01:00
.gitignore Fix IMU mutex lock 2018-01-21 05:58:24 +02:00
.travis.sh remove not needed whitespaces 2017-08-24 11:33:39 +02:00
.travis.yml update to gcc 7 2017-12-23 13:05:11 +01:00
CONTRIBUTING.md remove not needed whitespaces 2017-08-24 11:33:39 +02:00
JLinkSettings.ini Fixed permissions on files. 2017-11-28 23:31:55 +13:00
LICENSE
Makefile Implement minimalistic strcasestr (#5411) 2018-03-15 02:17:23 +13:00
Notes.md
README.md Merge branch 'master' into update_readme 2018-03-04 00:29:41 +13:00
Vagrantfile Update Vagrant env with libblocksruntime-dev required by unittest. 2017-09-27 18:19:41 +02:00
build_docs.sh AlienFligth F3 V2 support 2016-02-02 23:31:55 +01:00
fake_travis_build.sh Initial BeeBrain Support 2016-10-12 12:29:59 +02:00

README.md

Important Notice: Support for STM32F1 based flight controllers has been dropped in Betaflight release 3.3. This includes NAZE, CC3D (original) and CJMCU like flight controllers

Betaflight

Betaflight is flight controller software (firmware) used to fly multi-rotor craft and fixed wing craft.

This fork differs from Baseflight and Cleanflight in that it focuses on flight performance, leading-edge feature additions, and wide target support.

Events

Date Event
01 July 2018 Planned release date for Betaflight 3.4

Features

Betaflight has the following features:

  • Multi-color RGB LED strip support (each LED can be a different color using variable length WS2811 Addressable RGB strips - use for Orientation Indicators, Low Battery Warning, Flight Mode Status, Initialization Troubleshooting, etc)
  • DShot (150, 300, 600 and 1200), Multishot, and Oneshot (125 and 42) motor protocol support
  • Blackbox flight recorder logging (to onboard flash or external microSD card where equipped)
  • Support for targets that use the STM32 F7, F4, F3 and F1 processors
  • PWM, PPM, and Serial (SBus, SumH, SumD, Spektrum 1024/2048, XBus, etc) RX connection with failsafe detection
  • Multiple telemetry protocols (CSRF, FrSky, HoTT smart-port, MSP, etc)
  • RSSI via ADC - Uses ADC to read PWM RSSI signals, tested with FrSky D4R-II, X8R, X4R-SB, & XSR
  • OSD support & configuration without needing third-party OSD software/firmware/comm devices
  • OLED Displays - Display information on: Battery voltage/current/mAh, profile, rate profile, mode, version, sensors, etc
  • In-flight manual PID tuning and rate adjustment
  • Rate profiles and in-flight selection of them
  • Configurable serial ports for Serial RX, Telemetry, ESC telemetry, MSP, GPS, OSD, Sonar, etc - Use most devices on any port, softserial included
  • VTX support for Unify Pro and IRC Tramp
  • and MUCH, MUCH more.

Installation & Documentation

See: https://github.com/betaflight/betaflight/wiki

IRC Support and Developers Channel

There's a dedicated Slack chat channel here:

http://www.betaflight.ch/

Etiquette: Don't ask to ask and please wait around long enough for a reply - sometimes people are out flying, asleep or at work and can't answer immediately.

Configuration Tool

To configure Betaflight you should use the Betaflight-configurator GUI tool (Windows/OSX/Linux) that can be found here:

https://chrome.google.com/webstore/detail/betaflight-configurator/kdaghagfopacdngbohiknlhcocjccjao

The source for it is here:

https://github.com/betaflight/betaflight-configurator

Contributing

Contributions are welcome and encouraged. You can contribute in many ways:

  • Documentation updates and corrections.
  • How-To guides - received help? Help others!
  • Bug reporting & fixes.
  • New feature ideas & suggestions.

The best place to start is the IRC channel on gitter (see above), drop in, say hi. Next place is the github issue tracker:

https://github.com/betaflight/betaflight/issues https://github.com/betaflight/betaflight-configurator/issues

Before creating new issues please check to see if there is an existing one, search first otherwise you waste peoples time when they could be coding instead!

Developers

Please refer to the development section in the docs/development folder.

TravisCI is used to run automatic builds

https://travis-ci.org/betaflight/betaflight

Build Status

Betaflight Releases

https://github.com/betaflight/betaflight/releases

Open Source / Contributors

Betaflight is software that is open source and is available free of charge without warranty to all users.

Betaflight is forked from Cleanflight, so thanks goes to all those whom have contributed to Cleanflight and its origins.

Origins for this fork (Thanks!):

  • Alexinparis (for MultiWii),
  • timecop (for Baseflight),
  • Dominic Clifton (for Cleanflight), and
  • Sambas (for the original STM32F4 port).

The Betaflight Configurator is forked from Cleanflight Configurator and its origins.

Origins for Betaflight Configurator:

  • Dominic Clifton (for Cleanflight configurator), and
  • ctn (for the original Configurator).

Big thanks to current and past contributors:

  • Budden, Martin (martinbudden)
  • Bardwell, Joshua (joshuabardwell)
  • Blackman, Jason (blckmn)
  • ctzsnooze
  • Höglund, Anders (andershoglund)
  • Ledvina, Petr (ledvinap) - IO code awesomeness!
  • kc10kevin
  • Keeble, Gary (MadmanK)
  • Keller, Michael (mikeller) - Configurator brilliance
  • Kravcov, Albert (skaman82) - Configurator brilliance
  • MJ666
  • Nathan (nathantsoi)
  • ravnav
  • sambas - bringing us the F4
  • savaga
  • Stålheim, Anton (KiteAnton)

And many many others who haven't been mentioned....