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.
GPS.h@0:8c134f1c71f2, 2017-07-14 (annotated)
- Committer:
- mikawataru
- Date:
- Fri Jul 14 18:09:46 2017 +0000
- Revision:
- 0:8c134f1c71f2
- Child:
- 1:8425c3fba1c3
transfer to library
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mikawataru | 0:8c134f1c71f2 | 1 | #ifndef GPS_H |
| mikawataru | 0:8c134f1c71f2 | 2 | #define GPS_H |
| mikawataru | 0:8c134f1c71f2 | 3 | |
| mikawataru | 0:8c134f1c71f2 | 4 | #include "mbed.h" |
| mikawataru | 0:8c134f1c71f2 | 5 | |
| mikawataru | 0:8c134f1c71f2 | 6 | class GPS{ |
| mikawataru | 0:8c134f1c71f2 | 7 | private: |
| mikawataru | 0:8c134f1c71f2 | 8 | Serial gps; |
| mikawataru | 0:8c134f1c71f2 | 9 | char gps_data[256]; |
| mikawataru | 0:8c134f1c71f2 | 10 | int cnt_gps; |
| mikawataru | 0:8c134f1c71f2 | 11 | public: |
| mikawataru | 0:8c134f1c71f2 | 12 | Serial *debug; |
| mikawataru | 0:8c134f1c71f2 | 13 | GPS(PinName tx, PinName rx) : gps(tx,rx){ |
| mikawataru | 0:8c134f1c71f2 | 14 | gps.baud(9600); |
| mikawataru | 0:8c134f1c71f2 | 15 | }; |
| mikawataru | 0:8c134f1c71f2 | 16 | void getGPS(); |
| mikawataru | 0:8c134f1c71f2 | 17 | void LogStart(PinName tx, PinName rx); |
| mikawataru | 0:8c134f1c71f2 | 18 | float calcLatitude(float raw_data); |
| mikawataru | 0:8c134f1c71f2 | 19 | float calcLongitude(float raw_data); |
| mikawataru | 0:8c134f1c71f2 | 20 | }; |
| mikawataru | 0:8c134f1c71f2 | 21 | |
| mikawataru | 0:8c134f1c71f2 | 22 | #endif |