GpsData.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef __GPS_DATA_H_
  2. #define __GPS_DATA_H_
  3. typedef enum{
  4. GPS_NULL,
  5. GNRMC=1,
  6. GPVTG,
  7. GNGGA,
  8. GPGSV,
  9. GBGSV,
  10. }GPS_DATA_TYPE;
  11. extern GPS_DATA_TYPE GPS_Data_Type;
  12. typedef struct SUT_GPS_INF
  13. {
  14. unsigned char isGpsWork:1;//GPS模块工作标志
  15. unsigned char isGpsValid:1;//GPS定位标志 0 GPS未定位 1 GPS已定位
  16. unsigned char year;
  17. unsigned char month;
  18. unsigned char day;
  19. unsigned char hour;
  20. unsigned char minu;
  21. unsigned char sec;
  22. unsigned char GPSVisible_num;
  23. unsigned char BDVisible_num;
  24. unsigned char startnum;//
  25. unsigned short hight;
  26. uint32_t longitue;//经度
  27. uint32_t latitue; //纬度
  28. float App_longitue;//app 上传经度
  29. float App_latitue; //app 上传纬度
  30. /*
  31. unsigned int heading;//航向
  32. unsigned int headerSpeed;//航速
  33. unsigned short elevation;//海拔
  34. */
  35. uint32_t speed;//速度
  36. uint32_t aspect;//方位
  37. uint32_t AvgSpeed;//平均速度
  38. uint32_t speedbuf[5];
  39. uint32_t StatisticsMile ;//历程统计
  40. unsigned char Status;
  41. unsigned char Location[16];
  42. unsigned char Speed[8];
  43. unsigned char Time[8];
  44. uint32_t testJD;
  45. uint32_t testWD;
  46. char NSFlag;//N 北纬 S 南纬
  47. char EWFlag;//E 东经 W 西经
  48. char g_GpsEnable; // enable;
  49. char recnt;//由于龙尚模块缺陷,不能过早开启GPS
  50. // unsigned char reAthCnt;//resend ath time max 5
  51. }SUT_GPS_INF;
  52. extern SUT_GPS_INF sutGpsInfo;
  53. void GPSRestart(void);
  54. void GPSStop(void);
  55. void GPSInit(void);
  56. void process_gps_data(char *buf,uint32_t size);
  57. void GpsInternalChange(unsigned int interval);
  58. #endif