Rodrigo Gikas / CrazyflieController

Dependents:   Drone_Controlador_Atitude

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers HorizontalEstimator.h Source File

HorizontalEstimator.h

00001 #ifndef HorizontalEstimator_h
00002 #define HorizontalEstimator_h
00003 
00004 #include "mbed.h"
00005 #include "Parameters.h"
00006 #include "PMW3901.h"
00007 
00008 // Horizontal estimator class
00009 class HorizontalEstimator
00010 {
00011     public:
00012         // Class constructor
00013         HorizontalEstimator();
00014         // Initialize class
00015         void init();
00016         // Predict horizontal position and velocity from model
00017         void predict();
00018         // Correct horizontal position and velocity with measurements
00019         void correct(float phi,float theta,float p,float q,float z);
00020         // Horizontal positions (m) and velocities (m/s) estimations
00021         float x, y, u, v;
00022     private:
00023         // Flow sensor object
00024         PMW3901 flow;
00025         // Last horizontal positions (m) measurements
00026         float x_m_last, y_m_last;
00027 };
00028 
00029 #endif