Hummingbird Flight Software
Flight software for the Hummingbird FCU quadcopter flight controller. Designed to run on the Teensy 4.1. Developed with VSCode+PlatformIO.
Classes | Macros | Variables
baro_altimeter.h File Reference
#include <Wire.h>
#include <math.h>
#include "hummingbird_config.h"
#include "debugging.h"
#include "Adafruit_BMP3XX.h"
#include "filters/median_filter.h"
#include "filters/low_pass_filter.h"

Go to the source code of this file.

Classes

class  BaroAltimeter
 

Macros

#define BARO_ALTIMETER_DEBUG
 This class encompasses all functions to create a barometric altimeter for the drone, based on Adafruit's BMP388 sensor library. More...
 

Variables

constexpr float BARO_ALTIMETER_PRES_MAX = 108300.0f
 
constexpr float BARO_ALTIMETER_PRES_MIN = 94800.0f
 
constexpr float BARO_ALTIMETER_TEMP_MAX = 50.0f
 
constexpr float BARO_ALTIMETER_TEMP_MIN = -23.0f
 

Macro Definition Documentation

◆ BARO_ALTIMETER_DEBUG

#define BARO_ALTIMETER_DEBUG

This class encompasses all functions to create a barometric altimeter for the drone, based on Adafruit's BMP388 sensor library.

This class is responsible for:

  • Initializing and configuring the sensor
  • Reading pressure and temperature
  • Filtering raw measurements
  • Computing change in altitude from T/O location
  • Computing vertical speed

The library applies a median filter to the data to smooth out measurements during 'hover' states, and based on thresholds, returns more responsive readings during altitude changes.

Computes vertical speed based on a backwards difference formula

Variable Documentation

◆ BARO_ALTIMETER_PRES_MAX

constexpr float BARO_ALTIMETER_PRES_MAX = 108300.0f
constexpr

◆ BARO_ALTIMETER_PRES_MIN

constexpr float BARO_ALTIMETER_PRES_MIN = 94800.0f
constexpr

◆ BARO_ALTIMETER_TEMP_MAX

constexpr float BARO_ALTIMETER_TEMP_MAX = 50.0f
constexpr

◆ BARO_ALTIMETER_TEMP_MIN

constexpr float BARO_ALTIMETER_TEMP_MIN = -23.0f
constexpr