Abstraction for the glider class
Diff: Glider.h
- Revision:
- 14:a226bedae730
- Parent:
- 13:d95070aa9140
- Child:
- 16:7e1a1cd9f9fb
--- a/Glider.h Sat Apr 29 21:27:57 2017 +0000 +++ b/Glider.h Tue May 02 00:38:48 2017 +0000 @@ -20,6 +20,7 @@ #define LAND 1 #define PITO_V_DIVIDER 0.6666 +#define SOLAR_V_DIVIDER 0.5 #define PITO_ADC_RATIO 3.3 / 0xffff #define AIR_DENSITY 1.225 //kg per m3 @@ -28,6 +29,8 @@ #define ALT_THRESH 100.0 //meters +#define EMERGENCY_TIMEOUT 60.0 + class Glider { public: Serial* dev; @@ -37,6 +40,7 @@ float temp; float alt; float speed; + float solarVoltage; bool cmdFlag; bool transmitFlag; time_t startTime; //saved data @@ -48,10 +52,12 @@ Glider(Serial* device, PinName sda, PinName scl, PinName tx, PinName rx); InterruptIn xbeeRxInt; AnalogIn pitot; + AnalogIn solVoltIn; Beep buzzer; void setHeading(); void setTempPressAlt(); void setAirSpeed(); + void setSolarVoltage(); void setMissionTime(); void setTransmitFlag(); void updateTelem();