Remove All Ads from XDA

[GPS/AGPS] REAL solution analysis thread (Jupiter Tweaks) - v006! - Froyo JI6

684 posts
Thanks Meter: 945
By CLShortFuse, Retired Recognized Developer on 22nd September 2010, 03:14 PM
Post Reply Email Thread
Here's that donate button you guys were looking for. >_>

Get My Tracks from Google Market and post your GPS trip.

My first Froyo 2.2 test:

Jupiter.XML is not a Samsung specific file.

Jupiter mods
I've been modifying some information from the Jupiter XML to get different results. After installing a new jupiter.XML, got to LBSTestMode and select Delete GPS Data.
They can be installed by:
adb push jupiter.xml /system/etc/jupiter.xml

or (if permission denied)

adb push jupiter.xml /sdcard/jupiter.xml
adb shell
busybox cp /sdcard/jupiter.xml /system/etc/jupiter.xml
rm /sdcard/jupiter.xml

I made some changes to Jupiter (hopefully) enabled low noise amplification and remove a lag while trying to regain a hot fix.

Here's a v002 without ANY AGPS data. Because of a theory that AGPS is causing inaccuracy problems, I've disabled it completely. The fix will take longer, but maybe it'll be more accurate. With AGPS off, you won't get signal indoors. Remember that please and this is for the sake of testing.
AGPS doesn't have anything to do with accuracy. Stick with v001
You should also disable AGPS within Android
You can disable AGPS this way

adb shell
cd /dbdata/databases/
sqlite3 settings.db
update secure set value="0" where name = "assisted_gps_enabled";
v003 has AGPS again. Make sure you enable AGPS in android provider settings (see above). I also switched the SUPL to instead of spirent. I changed the FrqPlan to match the Blackberry devices FrqPlan.

v004 is based on XWJP4 from a i9000 build.
I changed a lot. I made my changes to jupiter.xml (disabled the LNA for testing) and I'm using unstable 300ppb (even though I think ppb are meaningless since ppm are more important). It has LBS data enabled from this firmware. Also, I put the new drivers and forced SUPL to in both jupiter and gps.conf
pulled for more testing

v005 are tweaks from XWJP4. I couldn't get the new to work on our Captivates (crashes on boot). gps.conf goes in (/system)/etc

v006 is JI6 compatible. JI6 (the Froyo build) uses the same GPS driver structure as i9000 XWJP4, so we might be able to swap files. This also means it's compatible with i9000 devices. This is mostly playing with SUPL to point to Google and remove a possible fix lag.

Jupiter Research
It's a interface configuration file for GLGPS from Broadcom. If Samsung messed up, IT'S HERE

These are Samsung's settings (with OH7 OTA)


I'm done some research and these are values for FrqPlan:

The TCXO has to be accurate +/- 2.0 ppm.
The number after FRQ_PLAN_ describes the type of TCXO used, for example,
FRQ_PLAN_13MHZ_2PPM is a 13MHz reference clock.

RfType values:

I found this info here:

Captivate Settings from OTA OH7:

I stripped everything else because we don't need it. We're not debugging. In fact, that might be a reason for the lag (all that unnecessary debugging).

This is the HTC Legend's XML file

See a difference? NO debugging and different FRQPlan (different chip anyway)

Blackberry device that uses the same chip. Here are the settings for gl1

Blah blah blah! Re-education part

I think a lot of you are playing with options, not knowing what you're doing. I've written some GPS applications for WinMo (check my post history) and have taken a look at this issue. I'm currently working on a project that uses the GPS and Android phones. I negotiated a deal with AT&T to get 50 Samsung Captivates (@ $150 each) with 2GB/mo ($25/mo) for a client and I think I'm going to cancel that.

I don't think many of you understand what's going on with the phone or what AGPS does. AGPS is basically GPS support with cell towers. There are different levels of cell tower support.

MS-Based usually just uses the cell tower's location (not yours) to figure out where you are. This will allow you to go online, and get the cell tower number and find out it's GPS location. From there, the GPS using satellite charting data to find and keep a fix. GPS almanac data (says where the satellites are in the sky) can be supplied by the cell tower (the point of MS-Based), downloaded over the internet or downloaded from GPS signals (the last of the 3 being the slowest). Getting a fix without having any satellite data or positioning is known as a cold fix.

MS-Assisted does what you guys would already figure is happening. It uses the cell tower positioning and cell tower signal central to triangulate your position. In WinMo this would disable your data connection but it seems that's not the case in Android. Regardless it might slow down your internet. Obviously the accuracy here is poor.

SUPL just tells you the lat/long position of the cell towers so changing servers does nearly nothing. Google may have faster SUPL servers than spirent but the data should be the same. Once you have that data, it should be cached locally (but who knows, this is Samsung we're talking about.)

The problem is, technically speaking, the GPS should work even without AGPS. I have a couple of GPS devices with SIRFIII and it works beautifully, no AGPS needed. It should be able to download the almanac, ephemeris and time from the GPS satellites without any cell towers. That's how you know the issue isn't your settings.

Disable AGPS and you'll realize you have no options to play with. You're all playing with AGPS settings which aren't really hardware based GPS (and thus inaccurate). AGPS is not accurate. It was never meant to replace hardware GPS (which is why they put hardware GPS in phones). Hardware GPS has much more accuracy but the fact is, hardware GPS is NOT working on the Samsung Captivate. That's the baseline problem. Forget your AGPS settings. AGPS should only help you with almanac data and getting faster fixes but after that it should be running on standalone hardware and only fall back to the inaccurate AGPS when you lose a clear view of the sky (like when you're in a tunnel).

I notice little issue when I'm standing still. It's when I'm moving that the accuracy dies. With further investigation, it seems the GPS literally stops updating the location after a couple of seconds. You don't notice if you're standing still since you're in the same spot, but when you're driving you'll see it. The GPS freezes for about 20 to 30 seconds.

The question is: Why is it not working?
Here are my hypotheses.

1) There's a function running that borks the GPS and makes the GPS driver crash or lag. The GPS driver quietly reboots and then it gets a fix. This could be the reason why, after disabling and enabling GPS, it grabs a hot-started fix of a location it was struggling to get before. You manually reset the GPS driver. I've tested it with Google Maps/Navigation. The GPS doesn't move for 30 seconds. It freezes, but when I close (disable GPS) and open the app (enable GPS) it gets a hot started fix in 5 seconds. Had I not disabled and enabled the GPS, it would have lagged there. This could be a software issue.

2) The GPS isn't using the almanac data. The almanac data says where the GPS satellites are now and where they will be. The GPS uses this to track. If this isn't used, it needs to get a fix again every so often.

3) Cell towers are actually messing you up because their times are desynchronized or almanac data is outdated. (and we all would love to blame AT&T)

As for my project, I'm ready to change my order from 50 Captivates to 50 Xperia X10 phone. The X10 actually has a WORKING GPS (meaning my app works fine and isn't the cause). I have both phones that AT&T gave me to develop my application. I wis
22nd September 2010, 03:23 PM |#2  
malfuncion's Avatar
Senior Member
Flag Norman, OK
Thanks Meter: 63
Thank you for the info. I am eagerly awaiting a true fix
22nd September 2010, 03:25 PM |#3  
Flag Texas
Thanks Meter: 14
makes sense, let us know of your future findings
22nd September 2010, 03:34 PM |#4  
Junior Member
Thanks Meter: 0
I just want to say this is an excellent post and very informative. Thanks for writing it. Unfortunately, I'm seriously debating returning my Captivate over this whole fiasco. The OTA hotfix that's pushing out today does nothing to fix this issue and I some how doubt this will be resolved any time soon.
22nd September 2010, 03:51 PM |#5  
Senior Member
Thanks Meter: 14
There are two test ROMS that were leaked, JH2 and JH3, that already have GPS logging enabled by default. We've been turning it off since the data isn't useful to us and it fills up the phone's storage quickly. Would those logs be useful to you?
22nd September 2010, 03:57 PM |#6  
OP Retired Recognized Developer
Thanks Meter: 945
Donate to Me
I have a Captivate, so I don't need the logs really. What are your experiences with Dynamic Accuracy off? I feel like that could be the issue. I know the GPS disables after 120 seconds with Dynamic Accuracy off, but when it does work, how well does it work for you guys?

Also, is the GPS issue for ALL Galaxy S devices? (Vibrant/Captivate/i9000)
22nd September 2010, 04:19 PM |#7  
Flag Texas
Thanks Meter: 14
I just got my captivate so i havent been around long, but i know for sure it affects all the US versions of the Galaxy S series (Fascinate, epic 4g, captivate, vibrant), im not sure about the European i9000
22nd September 2010, 04:27 PM |#8  
Senior Member
Thanks Meter: 258
It affects all Galaxy S phones regardless where you bought them. And the issue is with BroadCom (the GPS chip maker). There is a faulty driver and/or faulty chip firmware. From what I gather, BroadCOM gave Samsung the updated driver at the end of the August which our latest JH7 probably doesn't have.
22nd September 2010, 04:28 PM |#9  
compuguy1088's Avatar
Senior Member
Flag NoVA
Thanks Meter: 100
Originally Posted by faspalma

I just want to say this is an excellent post and very informative. Thanks for writing it. Unfortunately, I'm seriously debating returning my Captivate over this whole fiasco. The OTA hotfix that's pushing out today does nothing to fix this issue and I some how doubt this will be resolved any time soon.

According to Engadget, the latest update being pushed by AT&T "fixes" the gps issues:
22nd September 2010, 04:40 PM |#10  
Senior Member
Thanks Meter: 258
Originally Posted by compuguy1088

According to Engadget, the latest update being pushed by AT&T "fixes" the gps issues:

Engadget is full of it.
22nd September 2010, 04:42 PM |#11  
compuguy1088's Avatar
Senior Member
Flag NoVA
Thanks Meter: 100
Originally Posted by foxbat121

Engadget is full of it.

I think it is more that samsung "is full of it", because they are stating the gps is fixed. Engadget is just relaying what Samsung is saying....
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes