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

Committer:
fbob
Date:
Thu Dec 06 16:44:40 2018 +0000
Revision:
24:7b9e3beb61d5
Parent:
19:83b357d6806e
Adjust

Who changed what in which revision?

UserRevisionLine numberNew contents of line
fbob 7:220ce3839be8 1 #ifndef VerticalEstimator_h
fbob 7:220ce3839be8 2 #define VerticalEstimator_h
fbob 7:220ce3839be8 3
fbob 7:220ce3839be8 4 #include "mbed.h"
fbob 7:220ce3839be8 5 #include "Parameters.h"
fbob 7:220ce3839be8 6 #include "VL53L0X.h"
fbob 7:220ce3839be8 7
fbob 7:220ce3839be8 8 // Vertical estimator class
fbob 7:220ce3839be8 9 class VerticalEstimator
fbob 7:220ce3839be8 10 {
fbob 7:220ce3839be8 11 public:
fbob 7:220ce3839be8 12 // Class constructor
fbob 7:220ce3839be8 13 VerticalEstimator();
fbob 7:220ce3839be8 14 // Initialize class
fbob 7:220ce3839be8 15 void init();
fbob 17:f682b4a5686d 16 // Predict vertical position and velocity from model
fbob 11:fad579538b4c 17 void predict();
fbob 18:60516a4cba27 18 // Correct vertical position and velocity with measurement
fbob 18:60516a4cba27 19 void correct(float phi, float theta);
fbob 19:83b357d6806e 20 // Vertical position (m) and velocity (m/s) estimations
fbob 9:15058b4fa090 21 float z, w;
fbob 7:220ce3839be8 22 private:
fbob 7:220ce3839be8 23 // Range sensor object
fbob 7:220ce3839be8 24 VL53L0X range;
fbob 11:fad579538b4c 25 // Last vertical position (m) measurement
fbob 11:fad579538b4c 26 float z_m_last;
fbob 7:220ce3839be8 27 };
fbob 7:220ce3839be8 28
fbob 7:220ce3839be8 29 #endif