Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

PhysicalTiltSensor.h

Go to the documentation of this file.
00001 /************************************************************************************************/
00002 /*! \file PhysicalTiltSensor.h
00003 *  \brief Physical interface to a Two-Axis Tilt Sensor.
00004 *  \author $Author: cakinli $
00005 *  \version $Revision: 1.2 $
00006 *  \date    $Date: 2005/03/16 18:08:17 $
00007 ************************************************************************************************/
00008 /*! 
00009 *
00010 ************************************************************************************************/
00011 
00012 #ifndef __SSSL_PHYSICALTILTSENSOR_H__
00013 #define __SSSL_PHYSICALTILTSENSOR_H__
00014 
00015 #include <Sensors/AttitudeSensor.h>
00016 #include <Utils/Measurement.h>
00017 #include <matrix/Matrix.h>
00018 #include <string.h>
00019 extern "C"
00020 {
00021 #include <Hardware/satctl.h>
00022 }
00023 extern "C"
00024 {
00025 #include <Hardware/common.h>
00026 }
00027 
00028 
00029 using namespace std;
00030 using namespace O_SESSAME;
00031 
00032 class PhysicalTiltSensor : public AttitudeSensor
00033 {
00034 public :
00035         /*! Default Constructor */
00036         PhysicalTiltSensor();
00037 
00038         /*! Deconstructor */
00039         virtual ~PhysicalTiltSensor();
00040         
00041         /*! Initialize */
00042         int Initialize();
00043 
00044         /*! Get rotation of sensor (pure virtual from Sensor.h) */
00045         Vector GetSensorToBodyQuaternion();
00046 
00047         /*! Get measured pitch angle (rad) */
00048         void GetAngles(double& pitch, double& roll, double& t);
00049 
00050         /*! Get comm port file descriptor */
00051         int GetFD();
00052 
00053         /*! Set comm port */
00054         void SetPort(string Port);
00055 
00056         Measurement GetMeasurement();
00057 
00058 protected :
00059         
00060 private :
00061         /*! Current Pitch Angle (rad) */
00062         double m_PitchAngle;
00063 
00064         /*! Time Stamp of pitch measurement */
00065         double m_PitchTime;
00066 
00067         /*! Current Roll Angle (rad) */
00068         double m_RollAngle;
00069 
00070         /*! Time Stamp of Roll measurement */
00071         double m_RollTime;
00072 
00073         /*! Serial comm file descriptor*/
00074         int m_fd;
00075 
00076         /*! Serial comm port*/
00077         string m_Port;
00078 };
00079 #endif

Generated on Wed Sep 5 12:54:24 2007 for DSACSS Operational Code by  doxygen 1.3.9.1