ESE350 project, Spring 2016, University of Pennsylvania

Dependencies:   Adafruit9-DOf Receiver mbed-rtos mbed

Revision:
29:ae765492fa8b
Parent:
27:11116aa69f32
Child:
31:d473eacfc271
--- a/quadcopter.h	Fri Apr 15 19:08:56 2016 +0000
+++ b/quadcopter.h	Fri Apr 15 19:33:14 2016 +0000
@@ -6,7 +6,6 @@
 #include "Serial_base.h"
 #include "MRF24J40.h"
 
-
 // a few struct declarations. Can possibly eliminated using the vector class in STL
 struct state {
     double phi; // roll
@@ -15,7 +14,6 @@
     double p; // omega x
     double q; // omega y
     double r; // omega z
-
 };
 
 struct controlInput {
@@ -55,10 +53,9 @@
 
     state state_;
     state desiredState_;
+    double F_des_; // desired thrust force (excluding weight compensation)
     controlInput controlInput_;
-    //pwmOut * _pwmOut; // give address to constructor, than change this value
     motors motorPwm_;
-    PwmOut *motor1_;
 
     // declarations for IMU use
     Adafruit_9DOF dof_;
@@ -71,9 +68,6 @@
     sensors_vec_t   orientation_;
     offset* initial_offsets_;
 
-    Serial *pcPntr_; // used to access serial communication
-
-
     double g_;  // gravity [m/s^2]
     double m_; // mass [kg]
     double l_; // arm lenght [m]
@@ -89,23 +83,15 @@
     double kd_phi_;
     double kd_theta_;
     double kd_psi_;
-
-    // desired force (will come from joystick)
-    double F_des_; // desired thrust force (excluding weight compensation)
-    
     
     double zeroVelPwm;
     double maxPwm;
 
-
-
 public:
     Quadcopter(Serial *pcPntr, MRF24J40 *mrfPntr);  // constructor
 
-    void setState(state *source, state *goal); // not sure if needed
     void controller();
     void readSensorValues();
-
     void readRc();
 
     motors getPwm();
@@ -116,12 +102,6 @@
     Adafruit_9DOF getIMU();
     offset* getOffset();
     double getForce();
-
-
-    // not implemented yet
-    //void setGains();
-    //void setPwm();
-    //void initializePwm();
 };
 
 #endif
\ No newline at end of file