New version of quadcopter software written to OO principles
Dependencies: mbed MODSERIAL filter mbed-rtos ConfigFile PID PPM FreeIMU_external_magnetometer TinyGPS
Diff: NavigationController/AltitudeController/AltitudeController.h
- Revision:
- 2:969dfa4f2436
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NavigationController/AltitudeController/AltitudeController.h Wed Apr 01 11:19:21 2015 +0000 @@ -0,0 +1,32 @@ +#ifndef AltitudeController_H +#define AltitudeController_H + +#include "mbed.h" +#include "Global.h" +#include "PidWrapper.h" +#include "Sensors.h" +#include "ConfigFileWrapper.h" +#include "Status.h" + +class AltitudeController +{ + public: + AltitudeController(Sensors& sensors, ConfigFileWrapper& configFileWrapper, Status& status); + ~AltitudeController(); + + double compute(double targetAltitude, double climbRate); + void reset(); + void setAltitudeRatePidParameters(PidWrapper::PidParameter pidParameters); + void setAltitudeStabPidParameters(PidWrapper::PidParameter pidParameters); + PidWrapper::NavigationControllerPidParameters getPidParameters(); + + private: + Sensors& _sensors; + ConfigFileWrapper& _configFileWrapper; + Status& _status; + Sensors::Altitude _altitude; + PidWrapper _altitudeRatePidController; + PidWrapper _altitudeStabPidController; +}; + +#endif \ No newline at end of file