立即注册
查看: 3728|回复: 7

[FAQ13282][GPS]GPS问题调试--如何在PHONE上将EPO支持起来

已绑定手机
已实名认证
一牛网现金打赏上线了!解问题 赚现金,知识收益,等你来!具体详情请点击:一牛网现金打赏说明
发表于 2018-12-8 16:30:00 | 显示全部楼层 |阅读模式 来自 广东省深圳市
如何在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,例如
QQ截图20181208111533.png
如果看不到,请将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.
QQ截图20181208111711.png

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
QQ截图20181208111750.png

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.

QQ截图20181208111824.png
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:
QQ截图20181208111905.png
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;
QQ截图20181208111952.png

[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;
QQ截图20181208112051.png

[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;
QQ截图20181208112143.png

[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
………
游客,如果您要查看本帖隐藏内容请回复

已绑定手机
发表于 2018-12-8 17:54:28 | 显示全部楼层 来自 广东省深圳市
好东西!!!!!!!
已绑定手机
已实名认证
发表于 2018-12-27 12:57:38 | 显示全部楼层 来自 广东省深圳市罗湖区
谢谢分享,学习下!
已绑定手机
发表于 2019-7-6 21:34:39 | 显示全部楼层 来自 广东省广州市
感谢楼主!
已绑定手机
发表于 2019-7-6 21:40:27 | 显示全部楼层 来自 广东省广州市
感谢楼主分享!
已绑定手机
发表于 2020-10-22 01:04:20 | 显示全部楼层 来自 广东省深圳市罗湖区
已绑定手机
发表于 2021-5-18 11:01:33 | 显示全部楼层 来自 北京市
42元42要区烟灰缸如果让国人如干扰给
已绑定手机
发表于 2022-6-17 09:53:47 | 显示全部楼层 来自 广东省深圳市
epo是啥东东
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

合作/建议

TEL: 19168984579

工作时间:
周一到周五 9:00-11:30 13:30-19:30
  • 扫一扫关注公众号
  • 扫一扫打开小程序
Copyright © 2013-2024 一牛网 版权所有 All Rights Reserved. 帮助中心|隐私声明|联系我们|手机版|粤ICP备13053961号|营业执照|EDI证
在本版发帖搜索
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表