Library containing Crazyflie 2.0 controller classes: - Attitude estimator - Horizontal estimator - Vertical estimator - Attitude controller - Horizontal controller - Vertical controller - Mixer
VerticalEstimator/VerticalEstimator.h@18:60516a4cba27, 2018-10-10 (annotated)
- Committer:
- fbob
- Date:
- Wed Oct 10 10:48:52 2018 +0000
- Revision:
- 18:60516a4cba27
- Parent:
- 17:f682b4a5686d
- Child:
- 19:83b357d6806e
Update -> Correct
Who changed what in which revision?
User | Revision | Line number | New 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 | 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 |