zoukankan      html  css  js  c++  java
  • 【GPS】gps.conf文件解读

    手机adb shell修改gps.conf文件后,导入记得更改权限。

    adb shell里面要有

      /system/framework里面的com.google.android.maps.jar 
      /system/etc/permissions里面的com.google.android.maps.xml


    gps.conf文件

      android源码路径::

        hardware/qcom/gps/etc/gps.conf

      手机adb shell:

        vendor/etc/gps.conf


    下面就开始解读gps.conf文件。

    #Uncommenting these urls would only enable
    #the power up auto injection and force injection(test case).

    服务器速度相对最快的,可以在修改的时候把它放到XTRA_SERVER_1里面。

    XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin    XTRA_SERVER这个服务器是用来下载卫星通讯文件(如星历等)的,加快定位全靠它
    XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin    
    XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin

    XTRA_DOWNLOAD_INTERVAL_CONFIG = 172800000      移动网络环境下XTRA下载间隔配置
    XTRA_DOWNLOAD_INTERVAL_CONFIG_WIFI = 86400000    WIFI环境下XTRA下载间隔配置
    #Version check for XTRA
    #DISABLE = 0
    #AUTO = 1
    #XTRA2 = 2
    #XTRA3 = 3
    XTRA_VERSION_CHECK=0

    # Error Estimate
    # _SET = 1
    # _CLEAR = 0
    ERR_ESTIMATE=0

    #NTP server    NTP_SERVER是时间服务器

    NTP_SERVER提供GPS基准时间服务器,这些服务器中有些服务器从地理位置上说离我们最近,它们所提供给我们的时间与标准时间之间的差别也最小,定位也就更精确。

    #Asia      
    NTP_SERVER=cn.pool.ntp.org       原子钟服务器在世界各地还有很多,可以参考www.pool.ntp.org
    NTP_SERVER=0.cn.pool.ntp.org
    NTP_SERVER=1.cn.pool.ntp.org
    NTP_SERVER=3.cn.pool.ntp.org
    NTP_SERVER=2.cn.pool.ntp.org
    NTP_SERVER=asia.pool.ntp.org
    NTP_SERVER=1.asia.pool.ntp.org
    NTP_SERVER=3.asia.pool.ntp.org
    NTP_SERVER=2.asia.pool.ntp.org
    NTP_SERVER=0.asia.pool.ntp.org
    # NTP_SERVER=asia.pool.ntp.org      
    #Europe
    # NTP_SERVER=europe.pool.ntp.org        欧洲
    #North America
    # NTP_SERVER=north-america.pool.ntp.org     北美,服务器在美国,由于比较远,玩过网络游戏的都知道这个数值比较慢
    #qualcomm
    NTP_SERVER=time.izatcloud.net

    #XTRA CA path
    XTRA_CA_PATH=/system/etc/security/cacerts

    # DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info, 4 - Debug, 5 - Verbose
    # If DEBUG_LEVEL is commented, Android's logging levels will be used
    DEBUG_LEVEL = 3      gps HAL层logcat的开关,设置为5就可以打印所有hal层的log信息了

    # Intermediate position report, 1=enable, 0=disable      中间定位状态是否上报粗略位置信息

    修改INTERMEDIATE_POSACCURACY_THRES后,相当于降低了android系统的定位精度门槛,这样的好处是可以一定程度上提高定位速度,但前提是用户可以接受定位完成初始时间里定位精度下降的情况。
    只要达到定位精度的门槛,android系统就会向app报告定位数据(如,经纬度,海拔,定位误差等),此时系统就是默认完成了定位(正常情况下,状态栏里的GPS图标会从闪烁状态变为已经定位的状态);但是显示定位精度是由app完成的
    #INTERMEDIATE_POS=0      
    INTERMEDIATE_POS=1      表明接受中间定位状态时上报的粗略位置信息

    # Below bit mask configures how GPS functionalities should be locked when user turns off GPS on Settings
    # Set bit 0x1 if MO GPS functionalities are to be locked
    # Set bit 0x2 if NI GPS functionalities are to be locked
    # default - non is locked for backward compatibility
    #GPS_LOCK = 0

    # supl version 1.0
    #SUPL_VER=0x10000
    # supl version 2.0
    SUPL_VER=0x20000

    # Emergency SUPL, 1=enable, 0=disable
    #SUPL_ES=0
    SUPL_ES=1

    #Choose PDN for Emergency SUPL
    #1 - Use emergency PDN
    #0 - Use regular SUPL PDN for Emergency SUPL

    这个参数是增加的,使用紧急定位服务器,用来替换下面的SUPL_HOST(假如SUPL_HOST被屏蔽掉时),这应该是本次关键,当手机失去卫星信号后,不会使用基站位置信息,保持无卫星状态,所以不会飘。
    USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1

    #SUPL_MODE is a bit mask set in config.xml per carrier by default.If it is uncommented here, this value will overwrite the value from config.xml.
    #MSA=0X2
    #MSB=0X1
    #SUPL_MODE=

    # GPS Capabilities bit mask
    # SCHEDULING = 0x01
    # MSB = 0x02
    # MSA = 0x04
    # ON_DEMAND_TIME = 0x10
    # GEOFENCE = 0x20
    # default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
    CAPABILITIES=0x31    设置支持的一些定位模式

    # Accuracy threshold for intermediate positions less accurate positions are ignored, 0 for passing all positions
    # ACCURACY_THRES=5000
    ACCURACY_THRES=800      中间定位状态上报的精度阈值;  设置您能够接受的粗略定位精度的门限值,一般的200对应5~10m,3000对应200m

    ################################
    ##### AGPS server settings #####
    ################################

    # FOR SUPL SUPPORT, set the following
    # SUPL_HOST=supl.host.com or IP
    # SUPL_PORT=1234
    # SUPL_HOST=supl.nokia.com        诺基亚在欧美的服务器
    # SUPL_PORT=7275
    # SUPL_HOST=suplcn.sirf.com        传说中的A-GPS辅助定位服务器
    # SUPL_PORT=7276
    # SUPL_HOST=221.176.0.55
    # SUPL_PORT=7276

    # SUPL_HOST=supl.asia.com
    # SUPL_HOST=suplcn.sirf.com
    # SUPL_HOST=supl.google.com
    # SUPL_HOST=supl.cn.com

    这是基站定位服务器,可与前面的USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL配合使用。
    SUPL_HOST=supl.qxwz.com    SUPL_HOST 是A-GPS服务器地址,据说谷歌的是最快的。
    SUPL_PORT=7276         SUPL_PORT 是A-GPS服务器端口。

    # FOR C2K PDE SUPPORT, set the following
    # C2K_HOST=c2k.pde.com or IP
    # C2K_PORT=1234

    # Bitmask of slots that are available for write/install to, where 1s indicate writable, and the default value is 0 where no slots are writable. For example, AGPS_CERT_WRITABLE_MASK of b1000001010 makes 3 slots available and the remaining 7 slots unwritable.
    #AGPS_CERT_WRITABLE_MASK=0

    ####################################
    # LTE Positioning Profile Settings    LTE定位配置文件设置
    ####################################
    # 0: Enable RRLP on LTE(Default)
    # 1: Enable LPP_User_Plane on LTE
    # 2: Enable LPP_Control_Plane
    # 3: Enable both LPP_User_Plane and LPP_Control_Plane
    #LPP_PROFILE = 2
    LPP_PROFILE = 0

    ################################
    # EXTRA SETTINGS
    ################################
    # NMEA provider (1=Modem Processor, 0=Application Processor)
    NMEA_PROVIDER=0
    # Mark if it is a SGLTE target (1=SGLTE, 0=nonSGLTE)
    SGLTE_TARGET=0

    ##################################################
    # Select Positioning Protocol on A-GLONASS system    
    ##################################################
    # 0x1: RRC CPlane
    # 0x2: RRLP UPlane
    # 0x4: LLP Uplane
    A_GLONASS_POS_PROTOCOL_SELECT = 0    可能会影响定位时间

    ##################################################
    # Select technology for LPPe Control Plane          LPPE控制平面的选择技术
    ##################################################
    # 0x1: DBH for LPPe CP
    # 0x2: WLAN AP Measurements for LPPe CP
    # 0x4: SRN AP measurement for CP
    # 0x8: Sensor Barometer Measurement LPPe CP
    LPPE_CP_TECHNOLOGY = 0

    ##################################################
    # Select technology for LPPe User PlaneLPPE        用户面选择技术
    ##################################################
    # 0x1: DBH for LPPe UP
    # 0x2: WLAN AP Measurements for LPPe UP
    # 0x4: SRN AP measurement for UP
    # 0x8: Sensor Barometer Measurement LPPe UP
    LPPE_UP_TECHNOLOGY = 0

    ##################################################
    # AGPS_CONFIG_INJECT
    ##################################################
    # enable/disable injection of AGPS configurations:
    # SUPL_VER
    # SUPL_HOST
    # SUPL_PORT
    # C2K_HOST
    # C2K_PORT
    # LPP_PROFILE
    # A_GLONASS_POS_PROTOCOL_SELECT
    # 0: disable
    # 1: enable
    AGPS_CONFIG_INJECT = 1


     以下不做说明

    ##################################################
    # GNSS settings for automotive use cases
    # Configurations in following section are
    # specific to automotive use cases, others
    # please do not change, keep the default values
    ##################################################


     实际应用

      电信2G或3G使用版配置:
        NTP_SERVER=cn.pool.ntp.org
        XTRA_SERVER_1=http://xtra2.gpsonextra.net/xtra.bin
        XTRA_SERVER_2=http://xtra1.gpsonextra.net/xtra.bin
        XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
        SUPL_HOST=suplcn.sirf.com
        SUPL_PORT=7275
        PPP1_ID=ctwap@mycdma.cn
        PPP1_PW=vnet.mobi

      移动和联通使用版配置:
        NTP_SERVER=cn.pool.ntp.org
        XTRA_SERVER_1=http://xtra2.gpsonextra.net/xtra.bin
        XTRA_SERVER_2=http://xtra1.gpsonextra.net/xtra.bin
        XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
        SUPL_HOST=suplcn.sirf.com
        SUPL_PORT=7275

  • 相关阅读:
    bilibili 高并发实时弹幕系统的实现
    主流深度学习框架对比
    完整的视频直播系统
    一个简单的直播demo for java
    流媒体知识 wiki
    Entity Framework 6 暂停重试执行策略
    泛型的资源释放
    Entity Framework异步查询和保存
    Entity Framework中的连接管理
    了解Entity Framework中事务处理
  • 原文地址:https://www.cnblogs.com/zhuwei0901-yanwu/p/9485607.html
Copyright © 2011-2022 走看看