Subversion Repositories libNMEA

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * nmea.h
  3.  *
  4.  *  Created on: 6 Sep 2020
  5.  *      Author: mike
  6.  */
  7.  
  8. #ifndef INC_NMEA_H_
  9. #define INC_NMEA_H_
  10. #include <ctype.h>
  11. #include <time.h>
  12.  
  13. #include "libSerial/serial.h"
  14.  
  15. #if !defined (__cplusplus)
  16. #if !defined true
  17. #define true 1
  18. #define false !(true)
  19. #endif
  20.  
  21. typedef unsigned char bool;
  22. #endif
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26.  
  27.  
  28. typedef struct
  29. {
  30.   char valid;
  31.   char time[6];
  32.   char date[8];
  33.   bool good;
  34.   char ew;
  35.   char ns;
  36.   float lat;
  37.   float lon;
  38.   float heading;
  39.   float speed;
  40.   struct tm tv;
  41.   time_t utc;
  42. } Location;
  43.  
  44. extern bool
  45. updateLocation (Location *loc ,  usart_ctl * uc);
  46.  
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50.  
  51. #endif /* INC_NMEA_H_ */
  52.