implementação do sgam_mdw baseado na placa NUCLEO FZ429ZI para ser testada
Dependencies: MPU6050 Grove_temperature
sensor/gps/GPS.h@17:8789ab4067a6, 2019-07-20 (annotated)
- Committer:
- AndersonIctus
- Date:
- Sat Jul 20 14:02:50 2019 -0300
- Revision:
- 17:8789ab4067a6
- Inclusao do GPS FAKE
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AndersonIctus | 17:8789ab4067a6 | 1 | #ifndef SGAM_MDW_SENSOR_GPS_H |
AndersonIctus | 17:8789ab4067a6 | 2 | #define SGAM_MDW_SENSOR_GPS_H |
AndersonIctus | 17:8789ab4067a6 | 3 | |
AndersonIctus | 17:8789ab4067a6 | 4 | #include "sgam_mdw.h" |
AndersonIctus | 17:8789ab4067a6 | 5 | #include "mbed.h" |
AndersonIctus | 17:8789ab4067a6 | 6 | |
AndersonIctus | 17:8789ab4067a6 | 7 | class GPSData { |
AndersonIctus | 17:8789ab4067a6 | 8 | public: |
AndersonIctus | 17:8789ab4067a6 | 9 | float longitude; |
AndersonIctus | 17:8789ab4067a6 | 10 | float latitude; |
AndersonIctus | 17:8789ab4067a6 | 11 | float meters; |
AndersonIctus | 17:8789ab4067a6 | 12 | |
AndersonIctus | 17:8789ab4067a6 | 13 | GPSData(){ } |
AndersonIctus | 17:8789ab4067a6 | 14 | ~GPSData(){ } |
AndersonIctus | 17:8789ab4067a6 | 15 | }; |
AndersonIctus | 17:8789ab4067a6 | 16 | |
AndersonIctus | 17:8789ab4067a6 | 17 | // FAKE Gps to send fake values ! |
AndersonIctus | 17:8789ab4067a6 | 18 | class GPS: Sensor<GPSData> { |
AndersonIctus | 17:8789ab4067a6 | 19 | public: |
AndersonIctus | 17:8789ab4067a6 | 20 | GPS(); |
AndersonIctus | 17:8789ab4067a6 | 21 | virtual ~GPS(); |
AndersonIctus | 17:8789ab4067a6 | 22 | |
AndersonIctus | 17:8789ab4067a6 | 23 | virtual int initialize(); |
AndersonIctus | 17:8789ab4067a6 | 24 | virtual int finalize(); |
AndersonIctus | 17:8789ab4067a6 | 25 | |
AndersonIctus | 17:8789ab4067a6 | 26 | virtual GPSData* getValue(); |
AndersonIctus | 17:8789ab4067a6 | 27 | virtual const char* getName(); |
AndersonIctus | 17:8789ab4067a6 | 28 | |
AndersonIctus | 17:8789ab4067a6 | 29 | private: |
AndersonIctus | 17:8789ab4067a6 | 30 | void getLocation(GPSData* data); |
AndersonIctus | 17:8789ab4067a6 | 31 | }; |
AndersonIctus | 17:8789ab4067a6 | 32 | #endif |