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-10
- Revision:
- 18:60516a4cba27
- Parent:
- 17:f682b4a5686d
- Child:
- 19:83b357d6806e
File content as of revision 18:60516a4cba27:
#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) estimation float x, y, u, v; private: // Flow sensor object PMW3901 flow; // Last horizontal position (m) measurement float x_m_last, y_m_last; }; #endif