Library containing Crazyflie 2.0 controller classes: - Attitude estimator - Horizontal estimator - Vertical estimator - Attitude controller - Horizontal controller - Vertical controller - Mixer
HorizontaEstimator/HorizontalEstimator.h
- Committer:
- fbob
- Date:
- 2018-10-18
- Revision:
- 19:83b357d6806e
- Parent:
- 18:60516a4cba27
File content as of revision 19:83b357d6806e:
#ifndef HorizontalEstimator_h #define HorizontalEstimator_h #include "mbed.h" #include "Parameters.h" #include "PMW3901.h" // Vertical estimator class class HorizontalEstimator { public: // Class constructor HorizontalEstimator(); // Initialize class void init(); // Predict horizontal velocity from model void predict(); // Correct horizontal velocity with measurement void correct(float phi, float theta, float p, float q, float z); // Horizontal positions (m) and velocities (m/s) estimations float x, y, u, v; private: // Flow sensor object PMW3901 flow; // Last horizontal position (m) measurements float x_m_last, y_m_last; }; #endif