Fabio Bobrow / CrazyflieController
Committer:
fbob
Date:
Fri Sep 28 18:52:33 2018 +0000
Revision:
11:fad579538b4c
Parent:
9:15058b4fa090
Child:
17:f682b4a5686d
Vertical estimator improvements

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 11:fad579538b4c 16 // Predict vertical position and velocity estimation
fbob 11:fad579538b4c 17 void predict();
fbob 11:fad579538b4c 18 // Update vertical position and velocity estimation by merging range sensor reading
fbob 11:fad579538b4c 19 void update(float phi, float theta);
fbob 9:15058b4fa090 20 // Vertical position (m) and velocity (m/s) estimation
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