nmea.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef _NMEA_H_
  2. #define _NMEA_H_
  3. typedef enum{
  4. GPS_INVALID,
  5. GPS_ACTIVE
  6. }GPS_LOCATION_ENUM;
  7. typedef struct{
  8. unsigned char isGpsValid:1;//GPS定位标志
  9. unsigned char isBDWork:1;//北斗使能标志
  10. unsigned char South:1;//南北半球
  11. unsigned char West:1;//东西半球
  12. //时间 BCD UTC格式
  13. unsigned char year;
  14. unsigned char month;
  15. unsigned char day;
  16. unsigned char hour;
  17. unsigned char minu;
  18. unsigned char sec;
  19. //北京时间
  20. unsigned short Years;
  21. char Months;
  22. char Days;
  23. char Hours;
  24. char Minute;
  25. char Seconds;
  26. long Latitude;
  27. long Longitude;
  28. unsigned short Speed;//速度 节 放大10倍
  29. unsigned short Aspect;//方位 度
  30. unsigned short Altitude;//海拔 米
  31. unsigned char GPSNum;//GPS卫星使用个数
  32. unsigned char BDNum;//BD卫星使用个数
  33. unsigned char PDOP;//精度因子,放大十倍取整,范围0~63,大于63按63处理
  34. }NMEA_DEF;
  35. char * preNmea(char *nmea, char *target);
  36. void nmeaRmc(char *rcm);
  37. void nmeaGsa(char *gsa,int len);
  38. extern NMEA_DEF nmeaInfo;
  39. #endif