GPS.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /********************************************************************************
  2. * File Name: GPS.h
  3. * Function Describe: Header file for GPS.c
  4. * Explain:
  5. * Writer:
  6. * Date:
  7. *******************************************************************************/
  8. #ifndef __GPS_H
  9. #define __GPS_H
  10. /***********************************************************************************/
  11. #define GPS_TYPE_UBLOX 1 //ublox芯片方案
  12. #define GPS_TYPE_ZKW 2 //中科微芯片方案
  13. #define GPS_TYPE GPS_TYPE_ZKW //当前芯片方案类型
  14. #define GPS_PWR_PIN GPIO_Pin_0
  15. #define GPS_PWR_PORT GPIOB
  16. #define GPS_PWR_EN GPS_PWR_PORT->BSRR = GPS_PWR_PIN
  17. #define GPS_PWR_DIS GPS_PWR_PORT->BRR = GPS_PWR_PIN
  18. //#define GPS_MSG_DATA_BUF_LEN 660
  19. typedef struct SUT_GPS_INF
  20. {
  21. unsigned char isGpsWork:1;//GPS工作标志
  22. unsigned char isGpsValid:1;//GPS定位标志
  23. unsigned char isBDWork:1;//北斗使能标志
  24. unsigned char South:1;//南半球
  25. unsigned char West:1;//西半球
  26. unsigned char GpsCheckWorkCt;//GPS
  27. unsigned char BDCheckWorkCt;//GPS
  28. //时间 BCD UTC格式
  29. unsigned char year;
  30. unsigned char month;
  31. unsigned char day;
  32. unsigned char hour;
  33. unsigned char minu;
  34. unsigned char sec;
  35. //北京时间
  36. unsigned short Years;
  37. char Months;
  38. char Days;
  39. char Hours;
  40. char Minute;
  41. char Seconds;
  42. long Latitude;
  43. long Longitude;
  44. unsigned short Speed;//速度:节 放大10倍
  45. unsigned short Aspect;//方位 度
  46. unsigned short Altitude;//海拔 米
  47. unsigned char GPSNum;//GPS卫星使用个数
  48. unsigned char BDNum;//BD卫星使用个数
  49. }SUT_GPS_INF;
  50. extern SUT_GPS_INF sutGpsInfo;
  51. void GpsInit(void);
  52. void process_nema(char *nema);
  53. void GpsConversionTime(void);
  54. /***********************************************************************************/
  55. #endif