test
GliderFuncTest.h@0:cf00868b46a7, 2017-06-07 (annotated)
- Committer:
- chasefarmer2808
- Date:
- Wed Jun 07 03:42:57 2017 +0000
- Revision:
- 0:cf00868b46a7
test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chasefarmer2808 | 0:cf00868b46a7 | 1 | #ifndef GliderFuncTest_H |
chasefarmer2808 | 0:cf00868b46a7 | 2 | #define GliderFuncTest_H |
chasefarmer2808 | 0:cf00868b46a7 | 3 | |
chasefarmer2808 | 0:cf00868b46a7 | 4 | #include "mbed.h" |
chasefarmer2808 | 0:cf00868b46a7 | 5 | #include "HMC5883L.h" |
chasefarmer2808 | 0:cf00868b46a7 | 6 | #include "BMP180.h" |
chasefarmer2808 | 0:cf00868b46a7 | 7 | #include "beep.h" |
chasefarmer2808 | 0:cf00868b46a7 | 8 | #include <string> |
chasefarmer2808 | 0:cf00868b46a7 | 9 | |
chasefarmer2808 | 0:cf00868b46a7 | 10 | #define PITO_V_DIVIDER 0.6666 |
chasefarmer2808 | 0:cf00868b46a7 | 11 | #define SOLAR_V_DIVIDER 0.5 |
chasefarmer2808 | 0:cf00868b46a7 | 12 | #define PITO_ADC_RATIO 3.3 / 0xffff |
chasefarmer2808 | 0:cf00868b46a7 | 13 | |
chasefarmer2808 | 0:cf00868b46a7 | 14 | #define AIR_DENSITY 1.225 //kg per m3 |
chasefarmer2808 | 0:cf00868b46a7 | 15 | |
chasefarmer2808 | 0:cf00868b46a7 | 16 | |
chasefarmer2808 | 0:cf00868b46a7 | 17 | class GliderFuncTest { |
chasefarmer2808 | 0:cf00868b46a7 | 18 | public: |
chasefarmer2808 | 0:cf00868b46a7 | 19 | GliderFuncTest(PinName sda, PinName scl, PinName tx, PinName rx, PinName solarVolt, PinName pitot, PinName buzzer); |
chasefarmer2808 | 0:cf00868b46a7 | 20 | |
chasefarmer2808 | 0:cf00868b46a7 | 21 | double heading; //degrees from north |
chasefarmer2808 | 0:cf00868b46a7 | 22 | float pressure; //hpa |
chasefarmer2808 | 0:cf00868b46a7 | 23 | float temp; //C |
chasefarmer2808 | 0:cf00868b46a7 | 24 | float alt; //m |
chasefarmer2808 | 0:cf00868b46a7 | 25 | float speed; //m per s |
chasefarmer2808 | 0:cf00868b46a7 | 26 | float solarVoltage; //volts |
chasefarmer2808 | 0:cf00868b46a7 | 27 | HMC5883L* hmc; //magnetometer object |
chasefarmer2808 | 0:cf00868b46a7 | 28 | BMP180* bmp; //pressor sensor object |
chasefarmer2808 | 0:cf00868b46a7 | 29 | Serial* xbee; |
chasefarmer2808 | 0:cf00868b46a7 | 30 | |
chasefarmer2808 | 0:cf00868b46a7 | 31 | AnalogIn pitotInput; |
chasefarmer2808 | 0:cf00868b46a7 | 32 | AnalogIn solarInput; |
chasefarmer2808 | 0:cf00868b46a7 | 33 | Beep buzzerOutput; |
chasefarmer2808 | 0:cf00868b46a7 | 34 | |
chasefarmer2808 | 0:cf00868b46a7 | 35 | bool testCompass(); |
chasefarmer2808 | 0:cf00868b46a7 | 36 | bool testBMP180(); |
chasefarmer2808 | 0:cf00868b46a7 | 37 | bool testSolarVoltage(); |
chasefarmer2808 | 0:cf00868b46a7 | 38 | bool testPitotTube(); |
chasefarmer2808 | 0:cf00868b46a7 | 39 | bool testBuzzer(); |
chasefarmer2808 | 0:cf00868b46a7 | 40 | }; |
chasefarmer2808 | 0:cf00868b46a7 | 41 | |
chasefarmer2808 | 0:cf00868b46a7 | 42 | #endif |