Library containing Crazyflie 2.0 controller classes: - Attitude estimator - Horizontal estimator - Vertical estimator - Attitude controller - Horizontal controller - Vertical controller - Mixer

VerticalEstimator/VerticalEstimator.h

Committer:
fbob
Date:
2018-12-06
Revision:
24:7b9e3beb61d5
Parent:
19:83b357d6806e

File content as of revision 24:7b9e3beb61d5:

#ifndef VerticalEstimator_h
#define VerticalEstimator_h

#include "mbed.h"
#include "Parameters.h"
#include "VL53L0X.h"

// Vertical estimator class
class VerticalEstimator
{
  public:
    // Class constructor
    VerticalEstimator();
    // Initialize class
    void init();
    // Predict vertical position and velocity from model
    void predict();
    // Correct vertical position and velocity with measurement
    void correct(float phi, float theta);
    // Vertical position (m) and velocity (m/s) estimations
    float z, w;
  private:
    // Range sensor object
    VL53L0X range;
    // Last vertical position (m) measurement
    float z_m_last;
};

#endif