Library containing Crazyflie 2.0 controller classes: - Attitude estimator - Horizontal estimator - Vertical estimator - Attitude controller - Horizontal controller - Vertical controller - Mixer

VerticalController/VerticalController.h

Committer:
fbob
Date:
2018-12-06
Revision:
24:7b9e3beb61d5
Parent:
21:169cc2b1d2ff

File content as of revision 24:7b9e3beb61d5:

#ifndef VerticalController_h
#define VerticalController_h

#include "mbed.h"
#include "Parameters.h"

// Vertical controller class
class VerticalController
{
  public:
    // Class constructor
    VerticalController();
    // Control total thrust force (N) given reference vertical position (m) and current vertical position (m) and velocity (m/s)
    void control(float z_r, float z, float w);
    // Total thrust force (N)
    float f_t;
  private:
    // Control aceleration given reference position (m) and current position (m) and velocity (m/s) with given controller gains
    float control_state_regulator(float position_r, float position, float velocity, float kp, float kd);  
};

#endif