mn_gps_signal_def.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. /******************************************************************************
  2. ** File Name: mn_gps_signal_def.h *
  3. ** Author: CUIFANG DENG *
  4. ** Date: 05/31/2017 *
  5. ** Copyright: Copyright 2001-2017 by Spreadtrum Communications,Inc. *
  6. ** All Rights Reserved. *
  7. ** This software is supplied under the terms of a license *
  8. ** agreement or non-disclosure agreement with Spreadtrum. *
  9. ** Passing on and copying of this document,and communication *
  10. ** of its contents is not permitted without prior written *
  11. ** authorization. *
  12. ** Description: *
  13. ******************************************************************************
  14. ******************************************************************************
  15. ** Edit History *
  16. ** --------------------------------------------------------------------------*
  17. ** Date Name Description *
  18. **---------------------------------------------------------------------------*
  19. ** 05/31/2017 cuifang.deng Create. *
  20. ******************************************************************************/
  21. //#ifdef _MNGPS_SUPPORT_
  22. #if !defined(_MN_GPS_SIGNAL_DEF_H)
  23. #define _MN_GPS_SIGNAL_DEF_H
  24. #include "sci_types.h"
  25. #include "os_api.h"
  26. #include "mn_type.h"
  27. #include "mn_gps_type.h"
  28. typedef enum
  29. {
  30. MN_GPS_NOT_RUN,
  31. MN_GPS_NOT_FIX,
  32. MN_GPS_2D_FIX,
  33. MN_GPS_3D_FIX
  34. } MN_GPS_STATUS_E;
  35. typedef enum
  36. {
  37. MN_GPS_HOT_MODE,
  38. MN_GPS_COLD_MODE,
  39. MN_GPS_WARM_MODE,
  40. MN_GPS_FACTORY_MODE
  41. } MN_GPS_RESET_MODE_E,
  42. MN_GPS_START_MODE_E;
  43. // following signal only have signal header
  44. typedef xSignalHeaderRec SIGNALS_NO_PARA_T;
  45. typedef struct
  46. {
  47. SIGNAL_VARS
  48. uint8 type; //bit0: START_GPS bit1: START_BDS bit2: START_GLONASS
  49. MN_GPS_START_MODE_E start_mode;
  50. } MN_GPS_START_REQ_T;
  51. typedef struct
  52. {
  53. SIGNAL_VARS
  54. MN_GPS_RESET_MODE_E reset_mode;
  55. } MN_GPS_RESET_REQ_T;
  56. typedef struct
  57. {
  58. SIGNAL_VARS
  59. MN_GPS_DATA_SOCKET_E dataSocket_type;
  60. } MN_GPS_DATA_SOCKET_IND_T;
  61. typedef struct
  62. {
  63. SIGNAL_VARS
  64. MN_GPS_GNSS_MODE_E gnss_mode;
  65. } MN_GPS_SET_GNSS_MODE_REQ_T;
  66. typedef struct
  67. {
  68. SIGNAL_VARS
  69. MN_GPS_STATUS_E status;
  70. } MN_GPS_STATUS_CNF_T;
  71. typedef struct
  72. {
  73. SIGNAL_VARS
  74. uint16 type; // value 0- disable ouput; BIT0=1--GGA, BIT1=1--GLL, BIT2=1--GSA, BIT3=1--GSV, BIT4=1--RMC, BIT5=1--VTG
  75. uint32 time_interval;
  76. } MN_GPS_OUTPUT_REQ_T;
  77. typedef struct
  78. {
  79. SIGNAL_VARS
  80. MN_SYS_SIM_E dual_sys;
  81. uint32 netid; //value 5~11. 0:invalid
  82. } MN_GPS_PDP_INFO_REQ_T;
  83. typedef struct
  84. {
  85. SIGNAL_VARS
  86. MN_SYS_SIM_E dual_sys;
  87. BOOLEAN is_report_location_info;
  88. BOOLEAN is_report_satellite_info;
  89. } MN_GPS_REPORT_REQ_T;
  90. typedef struct
  91. {
  92. SIGNAL_VARS
  93. MN_SYS_SIM_E dual_sys;
  94. uint8 type;
  95. } MN_GPS_ASSERT_REQ_T;
  96. typedef struct
  97. {
  98. SIGNAL_VARS
  99. BOOLEAN is_ok;
  100. } MN_GPS_DOWNLOAD_CNF_T,
  101. MN_GPS_INIT_CNF_T,
  102. MN_GPS_START_CNF_T,
  103. MN_GPS_STOP_CNF_T,
  104. MN_GPS_RESET_CNF_T,
  105. MN_GPS_OUTPUT_CNF_T,
  106. MN_GPS_POWEROFF_CNF_T,
  107. MN_GPS_SET_GNSS_MODE_CNF_T,
  108. MN_GPS_DEL_AID_DATA_CNF_T,
  109. MN_GPS_PDP_INFO_CNF_T,
  110. MN_GPS_RUN_CNF_T,
  111. MN_GPS_REPORT_CNF_T;
  112. typedef SIGNALS_NO_PARA_T MN_GPS_ERR_IND_T;
  113. typedef struct
  114. {
  115. SIGNAL_VARS
  116. MN_GPS_STATUS_E fix_status; //¶¨Î»×´Ì¬
  117. } MN_GPS_READ_STATUS_CNF_T;
  118. typedef struct
  119. {
  120. uint16 wYear;
  121. uint16 wMonth;
  122. uint16 wDay;
  123. uint16 wHour;
  124. uint16 wMinute;
  125. uint16 wSecond;
  126. } TimeStamp;
  127. typedef struct
  128. {
  129. float longitude; // ¾­¶È
  130. float latitude; // γ¶È
  131. float altitude; // ¸ß¶È
  132. TimeStamp utc_time; // ÊÀ½çʱ¼ä
  133. uint32 ttff_time; // µÚÒ»´Î¶¨Î»ËùÓÃʱ¼ä£¬µ¥Î»s
  134. uint8 satellite_num; // ÎÀÐÇÊýÄ¿
  135. float speed; // ¶ÔµØËÙ¶È
  136. float course; // ¶ÔµØ·½Ïò
  137. uint16 clockdrift;
  138. SCI_TICK_TIME_T m_nSystemTimeStamp; // RTC or any other system time
  139. uint32 m_nUTCTime; // second
  140. uint8 m_nUncertaintySemiMajor;
  141. uint8 m_nUncertaintySemiMinor;
  142. float m_nBearing; // increments of 1 measured clockwise from the North.
  143. uint16 m_nDirection; // UP=0, Down=1
  144. float m_nHorizontalVelocity; // m/s
  145. float m_nVerticalVelocity; // m/s
  146. uint32 fix_flag;
  147. float m_nHorizontalAccuracy;
  148. float m_nPDOP; // λÖþ«¶ÈÒò×Ó
  149. float m_nHDOP; // ˮƽ¾«¶ÈÒò×Ó
  150. float m_nVDOP; // ´¹Ö±¾«¶ÈÒò×Ó
  151. } MN_GPS_INFO_T;
  152. typedef struct
  153. {
  154. uint16 m_nSatelliteIdentifier; // SV PRN
  155. uint16 m_cn0; // 2CN0ÐÅÔë±È
  156. uint16 m_nElevation; // Ñö½Ç
  157. uint16 m_nAzimuth; // ·½Î»½Ç
  158. uint8 m_IsUsed;
  159. } MN_GPS_SATELLITE_INFO_T;
  160. typedef struct
  161. {
  162. uint8 satellite_num;
  163. MN_GPS_SATELLITE_INFO_T satellite_info[32];
  164. } MN_GPS_SATELLITE_INFO_LIST_T;
  165. typedef struct
  166. {
  167. SIGNAL_VARS
  168. MN_GPS_INFO_T gps_info;
  169. MN_GPS_SATELLITE_INFO_LIST_T satellite_list_info;
  170. } MN_GPS_READ_INFO_CNF_T;
  171. typedef struct
  172. {
  173. SIGNAL_VARS
  174. MN_GPS_INFO_T gps_info;
  175. } MN_GPS_LOCATION_INFO_IND_T;
  176. typedef struct
  177. {
  178. SIGNAL_VARS
  179. MN_GPS_SATELLITE_INFO_LIST_T satellite_list_info;
  180. } MN_GPS_SATELLITE_INFO_IND_T;
  181. typedef struct
  182. {
  183. SIGNAL_VARS
  184. uint16 length;
  185. uint16 type; // BIT0=1--GGA, BIT1=1--GLL, BIT2=1--GSA, BIT3=1--GSV, BIT4=1--RMC, BIT5=1--VTG
  186. uint8 nmea_data[NMEA_PACKET_DATA_LEN]; // NMEA packet buffer
  187. } MN_GPS_OUTPUT_INFO_IND_T;
  188. typedef struct
  189. {
  190. SIGNAL_VARS
  191. float longitude; //¾­¶È
  192. float latitude; //γ¶È
  193. TimeStamp utc_time; // ÊÀ½çʱ¼ä
  194. uint32 ttff_time; //µÚÒ»´Î¶¨Î»ËùÓÃʱ¼ä£¬µ¥Î»s
  195. uint16 cn0;
  196. } MN_GPS_FIX_IND_T;
  197. #endif /* end of _MN_GPS_SIGNAL_DEF_H */
  198. //#endif