blob: 6e2827aed0afd668fe3b509165f3376285dcbfcf [file] [log] [blame]
b.liu4e243dc2023-11-27 11:20:00 +08001/*
2* qser_gnss.h
3*
4* QSER GNSS header file.
5*
6* Author : lb
7* Date : 2023/11/23 11:13:18
8*/
9#ifndef _QSER_GNSS_H
10#define _QSER_GNSS_H
11#include "mbtk_type.h"
12
13typedef unsigned int Uint_t;
liubin281ac462023-07-19 14:22:54 +080014
15typedef enum
16{
b.liu4e243dc2023-11-27 11:20:00 +080017 E_MT_LOC_MSG_ID_LOCATION_INFO, /**< pv_data = & mopen_location_info_t */
18 E_MT_LOC_MSG_ID_NMEA_INFO, /**< pv_data = & mopen_gnss_nmea_info_t */
19} e_msg_id_t;
liubin281ac462023-07-19 14:22:54 +080020
b.liu4e243dc2023-11-27 11:20:00 +080021typedef void (*gnss_handler_func_t)
22(
23 Uint_t *h_loc,
24 e_msg_id_t e_msg_id, //消息 ID
25 void *pv_data, //消息内容,取决于 ID,如下说明
26 void *context_ptr //用于区分哪个返回的消息
27)/* lynq_AddRxIndMsgHandler_t*/;
28
liubin281ac462023-07-19 14:22:54 +080029typedef struct
30{
b.liu4e243dc2023-11-27 11:20:00 +080031 uint32_t year; // 大于 1980
32 uint32_t month; // 1-12
33 uint32_t day; // 1-31
34 uint32_t hour; // 0-23
35 uint32_t minute; // 0-59
36 uint32_t second; // 0-59
37 uint32_t millisecond; // 0-999
38} LYNQ_INJECT_TIME_INTO_T; /* Message */
liubin281ac462023-07-19 14:22:54 +080039
b.liu4e243dc2023-11-27 11:20:00 +080040typedef enum {
41 DELETE_NOTHING = 0, /*不删除数据*/
42 DELETE_EPHEMERIS = 1, /*删除星历*/
43 DELETE_ALMANAC = 2, /*删除历书*/
44 DELETE_POSITION_TIME = 3, /*删除时间和位置信息. */
45 DELETE_UTC = 4, /*删除 UTC 时间*/
46 DELETE_ALL = 5 /*删除所有*/
47} DELETE_AIDING_DATA_TYPE_T;
liubin281ac462023-07-19 14:22:54 +080048
b.liu4e243dc2023-11-27 11:20:00 +080049int qser_Gnss_Init (uint32_t *h_gnss);
liubin281ac462023-07-19 14:22:54 +080050
b.liu4e243dc2023-11-27 11:20:00 +080051int qser_Gnss_Deinit (uint32_t h_gnss);
liubin281ac462023-07-19 14:22:54 +080052
b.liu4e243dc2023-11-27 11:20:00 +080053int qser_AddRxIndMsgHandler (gnss_handler_func_t handler_ptr,uint32_t h_gnss);
liubin281ac462023-07-19 14:22:54 +080054
b.liu4e243dc2023-11-27 11:20:00 +080055int qser_Set_Indications (uint32_t h_gnss,e_msg_id_t type);
liubin281ac462023-07-19 14:22:54 +080056
b.liu4e243dc2023-11-27 11:20:00 +080057int qser_Gnss_Start (uint32_t h_gnss);
liubin281ac462023-07-19 14:22:54 +080058
b.liu4e243dc2023-11-27 11:20:00 +080059int qser_Gnss_Stop (uint32_t h_gnss);
60
61int qser_Gnss_InjectTime (uint32_t h_gnss,LYNQ_INJECT_TIME_INTO_T *time_info);
62
63int qser_Gnss_Delete_Aiding_Data (uint32_t h_gnss,DELETE_AIDING_DATA_TYPE_T flags);
64
65int qser_Gnss_download_tle();
66
67int qser_Gnss_injectEphemeris(uint32_t h_gnss);
68
69#endif /* _QSER_GNSS_H */