Jump to content

[MOD] [ALL ROMS] GPS Fix


Guest wbaw

Recommended Posts

Slow GPS?

Flash this updated gps.conf with clockworkmod to speed up your GPS.

If you're adventurous then you can edit /system/etc/gps.conf to use a local ntp time server.

Changelog

04/02/2011 - RLS2

Added more comments

04/02/2011 - First Release

If you prefer to edit it manually here is my /system/etc/gps.conf

## GPS FIX - Modified by wbaw - r0.2 ##

## NTP Time server, use a local one ##

NTP_SERVER=0.europe.pool.ntp.org
# NTP_SERVER=0.uk.pool.ntp.org
# NTP_SERVER=0.asia.pool.ntp.org
# NTP_SERVER=0.oceania.pool.ntp.org
# NTP_SERVER=0.north-america.pool.ntp.org
# NTP_SERVER=0.south-america.pool.ntp.org
# NTP_SERVER=0.africa.pool.ntp.org

XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
DEBUG_LEVEL = 3

## Intermediate positioning, reduces accuracy, increases speed
INTERMEDIATE_POS=1

## Accuracy threshold for intermediate positioning
## 0 for no threshold causes 'Skipton bug'
ACCURACY_THRES=5000

## Enables network positioning before you get a gps fix
ENABLE_WIPER=1

### AGPS SETTINGS ###

## Use Google AGPS server
SUPL_HOST=supl.google.com
SUPL_PORT=7276

## Comment the above 2 lines & uncomment the lines below
## to use Orange UK AGPS server

#SUPL_HOST=agpss.orange.co.uk
#SUPL_PORT=7275

## More AGPS settings
CURRENT_CARRIER=common
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_SSL_ENABLE=FALSE
DEFAULT_USER_PLANE=TRUE
[/codebox]

gpsfix2.zip

Edited by wbaw
Link to comment
Share on other sites

Guest oh!dougal
Slow GPS?

Flash this updated gps.conf with clockworkmod to speed up your GPS.

If you're adventurous then you can edit /system/etc/gps.conf to use a local ntp time server.

Just so everyone doesn't HAVE to compare with their old file, would you care to document what you've altered (and why ;) ) ?

Link to comment
Share on other sites

Guest Simon O

I'll post it here for people to view ;)

### GPS FIX - Modified by wbaw - http://wbaw.net ###

### NTP Time server, use a local one for best response time ###

NTP_SERVER=0.europe.pool.ntp.org
# NTP_SERVER=0.uk.pool.ntp.org
# NTP_SERVER=0.asia.pool.ntp.org
# NTP_SERVER=0.oceania.pool.ntp.org
# NTP_SERVER=0.north-america.pool.ntp.org
# NTP_SERVER=0.south-america.pool.ntp.org
# NTP_SERVER=0.africa.pool.ntp.org

XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
DEBUG_LEVEL = 3
INTERMEDIATE_POS=1
ACCURACY_THRES=5000
ENABLE_WIPER=1
SUPL_HOST=supl.google.com
SUPL_PORT=7276
CURRENT_CARRIER=common
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_SSL_ENABLE=FALSE
DEFAULT_USER_PLANE=TRUE[/code]

Link to comment
Share on other sites

Guest oh!dougal

And here's the gps.conf from Seb's DX1 (presumably ZTE's chinese production 2.2)

NTP_SERVER=xtra1.gpsonextra.net

XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin

XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin

XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin


# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info

#			   4 - Debug, 5 - Verbose

DEBUG_LEVEL = 3


# Intermediate position report, 1=enable, 0=disable

INTERMEDIATE_POS=0


# 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.google.com

SUPL_PORT=7276


# FOR C2K PDE SUPPORT, set the following

# C2K_HOST=c2k.pde.com or IP

# C2K_PORT=1234


################################

# EXTRA SETTINGS

################################

So wbaw's version has

-- potentially MUCH closer time servers (shorter trip time, less time lag, more accurate calculations, so faster fix I'd expect)

-- AGPS being explicitly enabled

-- ZTE's "wiper" (wifi or network location services?) being specifically enabled

-- intermediate positioning being enabled with a threshold of 5000 (seems like this might loosen up what is acceptable as a reportable 'fix')

-- plus USER_PLANE (who he?) being defaulted to true, while SSL_ENABLE (secure sockets??) is defaulted to false

-- and then there's CURRENT_CARRIER ... ?

-- and less comments!

Certainly it all sounds like sensible stuff, but I'd like to be learning a little rather than just being given (thank you for your generosity!) tasty goodies.

Edited by oh!dougal
Link to comment
Share on other sites

Guest Sebastian404
-- potentially MUCH closer time servers (shorter trip time, less time lag, more accurate calculations, so faster fix I'd expect)

I had to sit through a selection of the most boring meetings over the last few weeks and the only thing I picked up was that telcos HATE nntp because they want the phones to be in sync with their own network's time... even if its wrong, its all about billing and fraud and etc etc etc

And while I'm not an expert I thought GPS devices got the time from the sat... I know with my old windows mobile phone, the clock is way out of speed, it runs much slower than 'real time' but when I use it as a GPS (only reason I keep it around) as soon as the location pops up, it also corrects the time.

-- AGPS being explicitly enabled

Some firmware has that an option that the user can toggle, I assume this would override that

-- plus USER_PLANE (who he?) being defaulted to true, while SSL_ENABLE (secure sockets??) is defaulted to false

SUPL stands for 'Secure User Plane Location', I'm not sure about how those setting would affect the way it communicates with google's servers

If you ever do want to feel like killing yourself, find someone who knows about Radio Access Networks and ask them about it..... Its the real reason why all those France Telecom guys 'exited the company' last year

Edited by Sebastian404
Link to comment
Share on other sites

Guest Dan Diplo

I presume this would only effect the time it takes to get a GPS fix initially?

Can anyone actually confirm whether it makes any difference for UK peeps?

Also, why is uk.pool.ntp.org commented out in favour of europe.pool.ntp.org NTP server if closer is better?

Edited by Dan Diplo
Link to comment
Share on other sites

Guest Simon O
Now my gps is showing 60 miles wrong but it's fast tho..

Yes, this fix brings back the old problem where the first location is many miles away. UK people know this as the 'Skipton bug' since it places everyone in Skipton, Yorkshire.

I'm not entirely sure which option is causing this.

Link to comment
Share on other sites

Guest oh!dougal
Now my gps is showing 60 miles wrong but it's fast tho..

Yes, this fix brings back the old problem where the first location is many miles away. UK people know this as the 'Skipton bug' since it places everyone in Skipton, Yorkshire.

I'm not entirely sure which option is causing this.

My green sat dish indicator stopped flashing almost as soon as I enabled gps.

But starting out with a known (from wifi) location - evidenced by the app Antennas - Google navigation was happy with its GPS fix, even when I walked out of wifi range and (walking in the opposite direction to that instructed) it happily re-routed me the other way round the local block.

But it didn't think I was in Yorkshire. (Seb's DX2 rom)

And Navigation DID tell me that it had lost GPS signal when I came back indoors.

Maybe it would put me in Yorkshire if I was away from other people's wifi?

BTW, the 'Yorkshire Black Hole' is replicated in other countries as some similar geographic central point for whatever country.

Centre of the universe is Skipton, happen!

I think he's been spending so much time over here, he's gone native!

Link to comment
Share on other sites

Guest Simon O
My green sat dish indicator stopped flashing almost as soon as I enabled gps.

But starting out with a known (from wifi) location - evidenced by the app Antennas - Google navigation was happy with its GPS fix, even when I walked out of wifi range and (walking in the opposite direction to that instructed) it happily re-routed me the other way round the local block.

But it didn't think I was in Yorkshire. (Seb's DX2 rom)

And Navigation DID tell me that it had lost GPS signal when I came back indoors.

Maybe it would put me in Yorkshire if I was away from other people's wifi?

BTW, the 'Yorkshire Black Hole' is replicated in other countries as some similar geographic central point for whatever country.

Yes, I think thats what it's doing. I have network location turned off.

Link to comment
Share on other sites

Guest Sebastian404

The location from wifi can be fun at time, I have a Apple Airport Express I carry around with me, for when I'm in a wifi-less hotel, and for the first month I was here, I was magically transported to Santa Cruz everytime I was in my hotel room..

I can only assume the reverse will be true when I get back home..

Just out of interest are you guys using the 'latest' version of maps? Also if you use something like com.eclipsim.gpsstatus2, is it still the same?

Edited by Sebastian404
Link to comment
Share on other sites

I had to sit through a selection of the most boring meetings over the last few weeks and the only thing I picked up was that telcos HATE nntp because they want the phones to be in sync with their own network's time... even if its wrong, its all about billing and fraud and etc etc etc

And while I'm not an expert I thought GPS devices got the time from the sat... I know with my old windows mobile phone, the clock is way out of speed, it runs much slower than 'real time' but when I use it as a GPS (only reason I keep it around) as soon as the location pops up, it also corrects the time.

Some firmware has that an option that the user can toggle, I assume this would override that

SUPL stands for 'Secure User Plane Location', I'm not sure about how those setting would affect the way it communicates with google's servers

If you ever do want to feel like killing yourself, find someone who knows about Radio Access Networks and ask them about it..... Its the real reason why all those France Telecom guys 'exited the company' last year

As far as I can tell, it gets the time from the ntp server in order to know where the gps satellites are in the sky, so it can find them faster. It doesn't override any time settings on the phone. gps.conf contained an ntp server before I edited it to use pool.ntp.org default is NTP_SERVER=xtra1.gpsonextra.net (which I think is US based).

I used the European ntp server as I guess that most users are in europe. I added others, but commented them out, in case you want to edit it to a closer one, but it probably wont make much difference. The default ntp server has < 0.2sec round trip time for ping, so you might save 0.1 seconds from your gps fix by using a closer server.

SUPL is for Assisted GPS. Wiper is network location.

I think it's the INTERMEDIATE_POS=1 that causes the Skipton bug. I think it just shows that when your phone has no idea where it is. For me it quickly changes to find my real location & I can't remember it happening since I set ACCURACY_THRES=5000 I thought that had fixed it.

Not sure what the 'CURRENT_CARRIER' option does, I copied the last few lines from an HTC rom's gps.conf. DEFAULT_SSL_ENABLE & DEFAULT_USER_PLANE are both AGPS settings, disabling ssl means it doesn't use encryption to connect to the AGPS server. More about AGPS here: http://www.wirelessdevnet.com/news/2005/may/13/news2.html

Anyway, my phone seems to find it's location in about 2 seconds indoors with these settings, it could sometimes take much longer with the defaults.

Edited by wbaw
Link to comment
Share on other sites

Guest oh!dougal

Repeated my experiment with wifi turned off.

The GPS dish stopped flashing before I got to the front door ...

... and though it had my starting point right, it didn't take much walking before it changed its mind and located me EXACTLY at my local cell-transmission-tower! (Which I know from running Antennas).

So, looks like AGPS for 2.2 is still unusable (preferring the 'assistance' over the fix), and ZTE's debugging has consisted of switching the bugger off! ;) ;) :D

Link to comment
Share on other sites

Repeated my experiment with wifi turned off.

The GPS dish stopped flashing before I got to the front door ...

... and though it had my starting point right, it didn't take much walking before it changed its mind and located me EXACTLY at my local cell-transmission-tower! (Which I know from running Antennas).

So, looks like AGPS for 2.2 is still unusable (preferring the 'assistance' over the fix), and ZTE's debugging has consisted of switching the bugger off! ;) ;) :D

I think that's more likely to be intermediate_pos. AGPS should mean more accurate GPS location (changes it from accurate to 50m to accurate to 30m for me, inside my house). Wiper is the thing that does network location, as far as I can tell. It does sometimes get a little confused if it can't see gps satellites.

Try setting INTERMEDIATE_POS=0 it should mean slower response times but a more accurate location. I set it because there are a few widgets that want to know your location for the weather forecast, local news, etc, so as long as it gets roughly the right area they're ok & they start up faster. You could also try setting ACCURACY_THRES= to a lower number, I assume it's in metres.

Edited by wbaw
Link to comment
Share on other sites

By the way, I noticed something strange with "xtra1.gpsonextra.net".

I use Droidwall to block internet traffic and checked if it really works with Shark and OSMonitor. Noticed that even though there wasn't any app related to GPS, android, google, maps or system allowed to use internet, there were connections to xtra1.gpsonextra.net (i.e., A-GPS).

How is that possible?

Link to comment
Share on other sites

It'll usually get close to your real location in a few seconds anyway.

Wiper should make it faster, but that relies on wifi networks to get your location, so if you turn wifi off then it might go a bit insane (or possibly just disable it), or if you're near an access point which has moved it'll confuse it too.

My mum's unmodded htc desire often reports the nearest cell tower as the location at first too.

Link to comment
Share on other sites

I tried it on my device, I'm in the center-ish of London, and it has me in the North Sea.... maybe thats why its raining...

Very strange. Since I set ACCURACY_THRES=5000 it at least puts me in the right city straight away, with ACCURACY_THRES=0 it'd often put me in Skipton at first. Maybe you're in too built up an area & it cant see gps.

If you leave google maps open does it get your real location after a few seconds?

Link to comment
Share on other sites

Guest Sebastian404
Very strange. Since I set ACCURACY_THRES=5000 it at least puts me in the right city straight away, with ACCURACY_THRES=0 it'd often put me in Skipton at first. Maybe you're in too built up an area & it cant see gps.

If you leave google maps open does it get your real location after a few seconds?

I left alone since my last post, its still got me in the sea...

I just used GPS status and its got a different location, but still in the sea

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.