已绑定手机 已实名认证 一牛网现金打赏上线了! 解问题 赚现金,知识收益,等你来!具体详情请点击: 一牛网现金打赏说明
|
如何在PHONE上将EPO支持起来?
首先特别注意,什么样的问题属于这一类问题?
check makefile中GPS_ADAPTOR_SUPPORT=FALSE,或者没有GPS_ADPTOR_SUPPORT。
对于GPS需要抓取catcher log
抓取catcher log,filter设置为MOD_GPSADAPTOR(all class on)、MOD_GPS(all class on)、MOD_MNL(all class on)。
从catcher 上看到的log里,要能够看到TRACE log,例如
如果看不到,请将makefile中的KAL_TRACE_OUTPUT=FULL
答:
EPO Introduction
EPO is MediaTek’s technology for aiding gps to fix fastly.Predicting work can be done on server.The predicting empherias data valid period is 30days.Device need to download from the server.After downloading , it can fix fastly. EPO file size is 270KB for 30days.EPO Server download link
如何处理EPO file data
在MTK_gps_task.c文件里的mtk_gps_sys_callback_func接口里,添加case MTK_GPS_MSG_ASSIST_READY,在该case的处理里,打开MTKEPO.bin文件,并根据参考时间读取文件里从该参考时间开始的32颗卫星的辅助资讯,调用mtk_gps_set_param(MTK_PARAM_CMD_CONFIG_EPO_DATA,DATA)接口将该数据送给MNL处理即可起到辅助定位的效果。
After MTK GPS receiver power on in normal mode, and after host completes MNL initialization, MNL will perform callback function with notification type MTK_GPS_MSG_ASSIST_READY to notify the host that it is capable of receiving assistance data from host. After the host receives MTK_GPS_MSG_ASSIST_READY notification,it can decide to send the assistance data in the sequence as the flow in the figure below.
After receiving the correct assistance data from host, MTK GPS receiver is able to accelerate TTFF by using the data. If any of the assistance data is not available (or invalid) at the host, such as time or position assistance, the host should not send corresponding command messages to MNL. No assistance data is always better than bad assistance data. The protocol is showed in the below figure.
MNL exported API function, which initializes MediaTek navigation Library.
mtk_gps_run:
MNL exported API function. The main routine for the MediaTek Navigation Library task.
MTK_GPS_MSG_ASSIST_READY:
MNL notification event in callback function, which notifies the host that MNL is ready
to receive assistance data.
Mtk_gps_set_param(MTK_PARAM_CMD_CONFIG_EPO_TIME):
Send reference time to MNL.
Mtk_gps_set_param (MTK_PARAM_CMD_CONFIG_EPO_POS):
Send reference location to MNL.
Mtk_gps_set_param (MTK_PARAM_CMD_CONFIG_EPO_DATA):
Send EPO data to MNL.
30-day EPO file format
GPS Assistance Data(Host to MNL)
MTK GPS receiver supports the following types of GPS assistance data. To facilitate faster TTFF, we suggest the user provide the GPS receiver with reference time,
ephemeris and reference location data.
To ensure that the MTK GPS chip will best utilize these assistance data, please always remember to provide the reference time before all the other assistance data. We
recommend the following sequences when providing assistance data to MTK GPS chip:
MTK_PARAM_CMD_CONFIG_EPO_TIME (Reference UTC Time)
MTK_PARAM_CMD_CONFIG_EPO_POS (Reference Location)
MTK_PARAM_CMD_CONFIG_EPO_DATA (EPO)
The table below is the influence that the various assistance data have on positioning:
However, some of the above assistance data will be skipped if it is not available or if the data might be wrong. No assistance data is always better than incorrect one.
MTK_PARAM_CMD_CONFIG_EPO_TIME
The command contains the current UTC time. Please do not use the local time, which has time-zone offset. To get a faster TTFF, the accuracy of reference UTC should be as
precise as within 3 seconds.
[Packet Format]
typedef struct
{
mtk_uint16 u2YEAR ; /* > 2000 */
mtk_uint8 u1MONTH; /* 1~12 */
mtk_uint8 u1DAY; /* 1~31*/
mtk_uint8 u1HOUR; /* 0~23*/
mtk_uint8 u1MIN; /* 0~59*/
mtk_uint8 u1SEC; /* 0~59*/
} mtk_param_epo_time_cfg;
[Sample Command]
The command indicates that the current UTC time is 2010/Jun/7 03:59:59.
mtk_param_epo_time_cfg epo_time_cfg;
epo_time_cfg.u2YEAR = 2010; //UTC time: year in 4 digits
epo_time_cfg.u1MONTH = 6; //UTC time: month
epo_time_cfg.u1DAY = 7; //UTC time: day
epo_time_cfg.u1HOUR = 3; //UTC time: hour
epo_time_cfg.u1MIN = 59; //UTC time: minute
epo_time_cfg.u1SEC = 59; //UTC time: second
mtk_gps_set_param (MTK_PARAM_CMD_CONFIG_EPO_TIME, &epo_time_cfg);
MTK_PARAM_CMD_CONFIG_EPO_POS
The command contains reference location for the GPS receiver. To have a faster TTFF,the accuracy of the location should be as precise as within 30 km.
[Packet Format]
typedef struct
{
mtk_r8 dfLAT; /* > -90 and <90 (degree)*/
mtk_r8 dfLON; /* > -180 and <180 (degree)*/
mtk_r8 dfALT; /* (m) */
mtk_uint16 u2YEAR; /* > 2000 */
mtk_uint8 u1MONTH; /* 1~12 */
mtk_uint8 u1DAY; /* 1~31*/
mtk_uint8 u1HOUR; /* 0~23*/
mtk_uint8 u1MIN; /* 0~59*/
mtk_uint8 u1SEC; /* 0~59*/
} mtk_param_epo_pos_cfg;
[Sample Command]
The packet indicates that the GPS receiver is at latitude 24.772816 degrees, longitude
121.022636 degrees, and altitude 160m.
mtk_param_epo_pos_cfg epo_pos_cfg;
epo_pos_cfg.dfLAT = 24.772816; //WGS84 geodetic latitude(Degree). Minus: south; Plus:
north
epo_pos_cfg.dfLON = 121.022636;//WGS84 geodetic longitude(Degree). Minus: west; Plus:
east
epo_pos_cfg.dfALT = 160; //WGS84 ellipsoidal altitude(m).
epo_pos_cfg.u2YEAR = 2010; // Reference UTC time: year in 4 digits
epo_pos_cfg.u1MONTH= 6; // Reference UTC time: month
epo_pos_cfg.u1DAY = 7; // Reference UTC time: day
epo_pos_cfg.u1HOUR = 3; // Reference UTC time: hour
epo_pos_cfg.u1MIN = 59; // Reference UTC time: minute
epo_pos_cfg.u1SEC = 59; // Reference UTC time: second
mtk_gps_set_param (MTK_PARAM_CMD_CONFIG_EPO_POS, &epo_pos_cfg);
MTK_PARAM_CMD_CONFIG_EPO_DATA
The command contains GPS EPO data for a single satellite.
[Packet Format]
typedef struct
{
mtk_uint32 u4EPOWORD[18]; /* 18 words [LSB first] of one EPO segment data (total 72 bytes) */
mtk_uint8 u1SatID; /* 1~32 */
} mtk_param_epo_data_cfg;
[Sample Command]
The command contains the EPO data of satellite PRN 2.
mtk_param_epo_data_cfg epo_data_cfg;
epo_data_cfg.u1SatID = 2; // Satellite PRN number
epo_data_cfg.u4EPOWORD[0] = 0x15c800bf; // EPO data word 1
epo_data_cfg.u4EPOWORD[1] = 0x49d40015; // EPO data word 2
………
|
|