Deadalus
/home/usappz/DeadalusSim/source/sil/sil.hh
00001 /* -----------------------------------------------------------------------------
00002  *
00003  *
00004  *  ____                   _____     _
00005  * / ___|  __ _ _ __  _ __|__  /  __| | ___
00006  * \___ \ / _` | '_ \| '_ \ / /  / _` |/ _ \
00007  *  ___) | (_| | |_) | |_) / /_ | (_| |  __/
00008  * |____/ \__,_| .__/| .__/____(_)__,_|\___|
00009  *             |_|   |_|
00010  *
00011  *
00012  *
00013  * Author: Andreas Gschossmann
00014  * Email:  andreas.gschossmann@hs-regensburg.de
00015  *
00016  * quadrotor_dynamics.hh - Relationship between rotor-speed or alternatively
00017  * digital value for brushless drivers and resulting thrust of the motor.
00018  *
00019  * -----------------------------------------------------------------------------*/
00020 #ifndef _SIL_HH_ 
00021 #define _SIL_HH_
00022 
00023 #include "../dependencies/resources.hh"
00024 #include "../dependencies/constants.hh"
00025 #include "../joystick/joystick.hh"
00026 
00030 
00031 class SIL 
00032 { 
00035     public: SIL();
00036 
00038     public: virtual ~SIL();
00039   
00040     private: 
00041       AngularVel        _rotor_speed;                   
00042       ActuationVal      _actuation_value;               
00043 
00044     private:
00045       int               _test_sequence_iterator;        
00046 
00047     private:
00049       // variables for C-functions in main loop
00051       float     acc_x, acc_y, acc_z;     
00052       float     gyro_x, gyro_y, gyro_z;  // data gyro
00053       float     gx, gy, gz;
00054       float     roll, pitch, yaw;        // inertial angles
00055       float     y_roll, y_pitch, y_yaw;
00056       float     gas_ctrl, pitch_ctrl, roll_ctrl, yaw_ctrl; // desired values from controller 
00059 
00060     private:
00061        Joystick _ps3controller;                 
00062 
00063     private: void test_sequence();              
00064 
00065     private: void get_ps3controller();          
00066     private: void get_key();                    
00067     
00068     public: 
00069       AngularVel        get_rotor_speed();      
00070       ActuationVal      get_actuation_value();  
00071    
00072      
00073     public: void init();                                        
00074 
00075 
00076 
00077     public: void update(double dT, Sensors mySensorsVals);      
00078 
00079 
00080 
00081 
00082   };
00083 
00084 #endif
 All Classes Functions Variables