starting integration with XBee
Dependencies: SDFileSystem mbed
Diff: nmea.h
- Revision:
- 0:26713d1db198
diff -r 000000000000 -r 26713d1db198 nmea.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmea.h Thu Mar 10 17:27:10 2016 +0000 @@ -0,0 +1,37 @@ +#include "mbed.h" + +// latitude is N/S, has 2 digits +// longitude is E/W, has 3 digits +struct NMEA_data { + // time + int hours; + int minutes; + int seconds; + + // date + int day; + int month; + int year; + + // location + int longitude; + double longitude_minutes; + char longitude_direction; + int latitude; + double latitude_minutes; + char latitude_direction; + + // A = active (has lock), V = void (no lock) + char lock_flag; + + // bearing + double speed; + double tracking_angle; +}; + +void get_nmea(Serial *s, char *buffer, int buflen); +void get_line(Serial *s, char *buffer, int buflen); + +struct NMEA_data empty_nmea(); + +struct NMEA_data parse_line(char *str); \ No newline at end of file