Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MODSERIAL filter mbed-rtos ConfigFile PID PPM FreeIMU_external_magnetometer TinyGPS
Diff: FlightController/StabController/StabController.h
- Revision:
- 2:969dfa4f2436
- Parent:
- 0:c6a85bb2a827
--- a/FlightController/StabController/StabController.h Wed Mar 04 18:53:43 2015 +0000
+++ b/FlightController/StabController/StabController.h Wed Apr 01 11:19:21 2015 +0000
@@ -0,0 +1,44 @@
+#include "mbed.h"
+#include "Global.h"
+#include "PidWrapper.h"
+#include "ConfigFileWrapper.h"
+#include "NavigationController.h"
+
+#ifndef StabController_H
+#define StabController_H
+
+class StabController
+{
+ public:
+ StabController(Sensors& sensors, NavigationController& navigationController, ConfigFileWrapper& configFileWrapper);
+ ~StabController();
+
+ PidWrapper::PidOutput compute();
+ PidWrapper::FlightControllerPidParameters getPidParameters();
+ void reset();
+ void setYawStabPidParameters(PidWrapper::PidParameter pidParameters);
+ void setPitchStabPidParameters(PidWrapper::PidParameter pidParameters);
+ void setRollStabPidParameters(PidWrapper::PidParameter pidParameters);
+ void setYawRatePidParameters(PidWrapper::PidParameter pidParameters);
+ void setPitchRatePidParameters(PidWrapper::PidParameter pidParameters);
+ void setRollRatePidParameters(PidWrapper::PidParameter pidParameters);
+ PidWrapper::StabPidState getStabPidState();
+
+ private:
+ Sensors& _sensors;
+ NavigationController& _navigationController;
+ ConfigFileWrapper& _configFileWrapper;
+ PidWrapper _yawRatePidController;
+ PidWrapper _pitchRatePidController;
+ PidWrapper _rollRatePidController;
+ PidWrapper _yawStabPidController;
+ PidWrapper _pitchStabPidController;
+ PidWrapper _rollStabPidController;
+ NavigationController::SetPoint _setPoints;
+ Imu::Rate _rate;
+ Imu::Angle _angle;
+ PidWrapper::PidOutput _stabPidOutputs;
+ PidWrapper::PidOutput _ratePidOutputs;
+};
+
+#endif
\ No newline at end of file