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.
Gyroscope.h
00001 #ifndef GYROSCOPE_H 00002 #define GYROSCOPE_H 00003 00004 #include "ITG3205.h" 00005 00006 #define PI 3.14159265 00007 00008 class Gyroscope 00009 { 00010 public: 00011 Gyroscope(ITG3205* gyroHardware, float sensitivity, float dataRate); 00012 ~Gyroscope(void); 00013 00014 void updateZeroRates(); 00015 00016 void update(); 00017 void update(int samplesSize, int sampleDataRate); 00018 00019 void resetAngles(); 00020 00021 float getRadiansX(); 00022 float getRadiansY(); 00023 float getRadiansZ(); 00024 00025 float getDegreesX(); 00026 float getDegreesY(); 00027 float getDegreesZ(); 00028 00029 float getAngleX(); 00030 float getAngleY(); 00031 float getAngleZ(); 00032 00033 private: 00034 ITG3205* gyroHardware; 00035 00036 float sensitivity; 00037 float dataRate; 00038 00039 float zeroRateX, zeroRateY, zeroRateZ; 00040 00041 float rawX; 00042 float rawY; 00043 float rawZ; 00044 00045 float angleX; 00046 float angleY; 00047 float angleZ; 00048 }; 00049 00050 #endif /* GYROSCOPE_H */
Generated on Sat Jul 23 2022 13:17:57 by
