gnss: add T108 gnss api
Change-Id: I28a07e17a07d388c2d1e1134f7bb9f7265697b2c
diff --git a/mbtk/include/lynq/lynq_gnss.h b/mbtk/include/lynq/lynq_gnss.h
index 6e2827a..6704b1e 100755
--- a/mbtk/include/lynq/lynq_gnss.h
+++ b/mbtk/include/lynq/lynq_gnss.h
@@ -11,11 +11,12 @@
#include "mbtk_type.h"
typedef unsigned int Uint_t;
+#define MOPEN_GNSS_NMEA_MAX_LENGTH 255 /* NMEA string maximum length. */
typedef enum
{
- E_MT_LOC_MSG_ID_LOCATION_INFO, /**< pv_data = & mopen_location_info_t */
- E_MT_LOC_MSG_ID_NMEA_INFO, /**< pv_data = & mopen_gnss_nmea_info_t */
+ E_MT_LOC_MSG_ID_LOCATION_INFO = 1, /**< pv_data = & mopen_location_info_t */
+ E_MT_LOC_MSG_ID_NMEA_INFO = 3, /**< pv_data = & mopen_gnss_nmea_info_t */
} e_msg_id_t;
typedef void (*gnss_handler_func_t)
@@ -28,6 +29,29 @@
typedef struct
{
+ int64_t timestamp; /**< System Timestamp, marked for when got the nmea data */
+ int length; /**< NMEA string length. */
+ char nmea[MOPEN_GNSS_NMEA_MAX_LENGTH + 1]; /**< NMEA string.*/
+}mopen_gnss_nmea_info_t; /* Message */
+
+typedef struct
+{
+ uint32_t size; /**< Set to the size of mcm_gps_location_t. */
+ int flags; /**< Contains GPS location flags bits. */
+ int position_source; /**< Provider indicator for HYBRID or GPS. */ //功能暂未实现,可不用添加进结构体
+ double latitude; /**< Latitude in degrees. */
+ double longitude; /**< Longitude in degrees. */
+ double altitude; /**< Altitude in meters above the WGS 84 reference ellipsoid. */
+ float speed; /**< Speed in meters per second. */
+ float bearing; /**< Heading in degrees. */ //功能暂未实现,可不用添加进结构体
+ float accuracy; /**< Expected accuracy in meters. */ //功能暂未实现,可不用添加进结构体
+ int64_t timestamp; /**< Timestamp for the location fix in UTC million-second base. */
+ int32_t is_indoor; /**< Location is indoors. */ //功能暂未实现,可不用添加进结构体
+ float floor_number; /**< Indicates the floor number. */
+}mopen_location_info_t;//功能暂未实现,可不用添加进结构体
+
+typedef struct
+{
uint32_t year; // 大于 1980
uint32_t month; // 1-12
uint32_t day; // 1-31
@@ -58,12 +82,17 @@
int qser_Gnss_Stop (uint32_t h_gnss);
+int qser_Gnss_Set_Frequency(uint32_t h_gnss, int frequency);
+
int qser_Gnss_InjectTime (uint32_t h_gnss,LYNQ_INJECT_TIME_INTO_T *time_info);
int qser_Gnss_Delete_Aiding_Data (uint32_t h_gnss,DELETE_AIDING_DATA_TYPE_T flags);
+int qser_Gnss_Server_Configuration(char *host, char *id, char *password);
+
int qser_Gnss_download_tle();
int qser_Gnss_injectEphemeris(uint32_t h_gnss);
+
#endif /* _QSER_GNSS_H */