This repository has been archived on 2025-09-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Gareth Kitchen 0a4075d4d5 sanders: gps: Localise NTP to improve GPS TTFF
Testing response times to time.android.com from around the globe reveals
in ms:-

Europe			 <30
Middle East		 <68
North America		<150
Johannesburg		 183
Buenos Aires		 220
Tokyo			 226
Sydney			 276
Hong Kong		 285
Brisbane		 295
Mumbai			 349
Beijing			4691
Shanghai		4906
Russia			 n/a

Whilst time.android.com is NOT used for GPS NTP, North American time servers
are, by specifying north-america.pool.ntp.org as default in the framework,
to align with pixel devices.  I am assuming similar response times to these
servers from around the world.

Great for North America and it appears Europe but it does not address the
global issue. Also, the pool.ntp.org project forbids both hardware and
software vendors from using these default zone names.
http://www.pool.ntp.org/en/vendors.html

It makes sense, therefore, to leverage the ntp.org's existing 'android' vendor
name to make the default ntp server for GPS purposes:
1.android.pool.ntp.org this will return a random but accurate NTP server in
close geopraphic proximity to the device.

Testing on my own build in the UK seems to improve hot and cold TTFF
considerably.

Change-Id: I144af45757efa35b32daf034eece6e046d2bde79
Signed-off-by: ronaxdevil <pratabidya.007@gmail.com>
2020-03-25 03:48:56 +05:30

159 lines
4.1 KiB
Plaintext

#gps_conf_from_sim.conf
#XTRA_SERVER_1=https://xtrapath2.izatcloud.net/xtra2.bin
#XTRA_SERVER_2=https://xtrapath2.izatcloud.net/xtra2.bin
#XTRA_SERVER_3=https://xtrapath3.izatcloud.net/xtra2.bin
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0
#NTP server
NTP_SERVER=1.android.pool.ntp.org
#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 = 2
# Intermediate position report, 1=enable, 0=disable
#INTERMEDIATE_POS=0
# supl version 1.0
#SUPL_VER=0x20000
# Emergency SUPL, 1=enable, 0=disable
#SUPL_ES=0
#Choose PDN for Emergency SUPL
#1 - Use emergency PDN
#0 - Use regular SUPL PDN for Emergency SUPL
#USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=0
# SUPL Mode (0=Standalone, 1=MSB, 2=MSA)
#SUPL_MODE=1
# GPS Capabilities bit mask
# SCHEDULING = 0x01
# MSB = 0x02
# MSA = 0x04
# ON_DEMAND_TIME = 0x10
# GEOFENCE = 0x20
# MEASUREMENTS = 0x40
# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE | MEASUREMENTS
CAPABILITIES=0x77
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
# ACCURACY_THRES=5000
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
# SUPL_HOST=supl.host.com or IP
# SUPL_PORT=1234
# FOR C2K PDE SUPPORT, set the following
# C2K_HOST=c2k.pde.com or IP
# C2K_PORT=1234
####################################
# LTE Positioning Profile Settings
####################################
# 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 = 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
##################################################
# 0x1: DBH for LPPe CP
# 0x2: WLAN AP Measurements for LPPe CP
#LPPE_CP_TECHNOLOGY = 0
##################################################
# Select technology for LPPe User Plane
##################################################
# 0x1: DBH for LPPe UP
# 0x2: WLAN AP Measurements for 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
# AP Coarse Timestamp Uncertainty
##################################################
# default : 10
# or as per clock uncertainty of product
#AP_TIMESTAMP_UNCERTAINTY = 10
#####################################
# GNSS PPS settings
#####################################
#AP DR engine availability status
# 0 : NO AP DR (default)
# 1 : AP DR enabled
#EXTERNAL_DR_ENABLED = 0
#####################################
#DR_SYNC Pulse Availability
#####################################
# 0 : DR_SYNC pulse not available (default)
# 1 : DR_SYNC pulse available
#DR_SYNC_ENABLED = 0
#####################################
#PPS Device name
#####################################
#PPS_DEVICENAME = /dev/pps0
#####################################
#AP Clock Accuracy
#####################################
#AP_CLOCK_PPM = 100
#####################################
#MAX ms difference to detect missing pulse
#####################################
#MISSING_PULSE_TIME_DELTA = 900
#####################################
#Propagation time uncertainty
#####################################
#PROPAGATION_TIME_UNCERTAINTY = 1