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

Search This thread

CLShortFuse

Retired Recognized Developer
Feb 28, 2007
684
944
Here's that donate button you guys were looking for. >_>
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ELH2CPLUZLQY



ANECDOTAL EVIDENCE IS NOT REAL EVIDENCE!!!
Get My Tracks from Google Market and post your GPS trip.

My first Froyo 2.2 test:

http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=108472444080796738089.000491a2c10ac25693114

Jupiter.XML
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:
Code:
adb push jupiter.xml /system/etc/jupiter.xml

or (if permission denied)

adb push jupiter.xml /sdcard/jupiter.xml
adb shell
su
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.
View attachment Jupiter-v001.zip

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
Removed
You should also disable AGPS within Android
You can disable AGPS this way

Code:
adb shell
su
cd /dbdata/databases/com.android.providers.settings
sqlite3 settings.db
update secure set value="0" where name = "assisted_gps_enabled";
.quit
reboot

v003 has AGPS again. Make sure you enable AGPS in android provider settings (see above). I also switched the SUPL to supl.google.com:7576 instead of spirent. I changed the FrqPlan to match the Blackberry devices FrqPlan.
View attachment Jupiter-v003.zip

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 supl.google.com in both jupiter and gps.conf
pulled for more testing

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

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.
/system/etc/jupiter.xml
/system/etc/gps.conf
/data/gps/secgps.conf
View attachment Jupiter-v006.zip

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)
LogPriMask="LOG_DEBUG"
LogFacMask="LOG_GLLAPI | LOG_DEVIA | LOG_NMEA | LOG_RAWDATA | LOG_DEVMS | LOG_ASIC_IO | LOG_BBTEST | LOG_DEVET | LOG_MESM | LOG_DEVKF | LOG_DEVJG | LOG_DEVMR"
FrqPlan="FRQ_PLAN_26MHZ_2PPM_26MHZ_300PPB_UNSTABLE"
RfType="GL_RF_4751_DANUBE"
BrcmRFwildBase="0x1E2D6409"
BrcmRFclkDiv="21"
BrcmRFclkRefHz="26000000"
pps-enable="false"
pps-offset-ms="0"
pps-width-ns="100"

THIS IS WHAT WE SHOULD PLAY WITH!

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.
FRQ_PLAN_13MHZ_2PPM
FRQ_PLAN_16_8MHZ_2PPM
FRQ_PLAN_26MHZ_2PPM
FRQ_PLAN_10MHZ_2PPM_10MHZ_50PPB
FRQ_PLAN_20000_2PPM_13MHZ_50PPB
FRQ_PLAN_27456_2PPM_26MHZ_50PPB
FRQ_PLAN_33600_2PPM_26MHZ_50PPB
FRQ_PLAN_19200_2PPM_26MHZ_100PPB

RfType values:
GL_RF_PALS7
GL_RF_BARRACUDA
GL_RF_2075_LN22
GL_RF_2075_BRCM
GL_RF_PALS7_BRCM
GL_RF_BARRACUDA_BRCM
GL_RF_BARRACUDA_EXT_LNA

I found this info here:

http://openembed.com/files/pdk15_imx35__Linux_RM.pdf

Captivate Settings from OTA OH7:
Code:

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
Code:
See a difference? NO debugging and different FRQPlan (different chip anyway)

I FOUND SOMETHING WORTHWHILE!!!
Blackberry device that uses the same chip. Here are the settings for gl1
Code:

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
 
Last edited:

faspalma

Member
Jun 28, 2008
15
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.
 

no driver

Senior Member
Jun 21, 2010
138
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?
 

CLShortFuse

Retired Recognized Developer
Feb 28, 2007
684
944
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)
 
Last edited:

krushin

Senior Member
Sep 8, 2010
85
14
Texas
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
 

foxbat121

Senior Member
Apr 27, 2006
2,846
256
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.
 

compuguy1088

Senior Member
Jun 17, 2010
1,295
84
NoVA
www.compuguy1088.com
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: http://www.engadget.com/2010/09/22/samsung-captivate-gets-gps-fix-other-galaxy-s-versions-wait-pat/
 

CLShortFuse

Retired Recognized Developer
Feb 28, 2007
684
944
Wasn't the source released for the captivate kernel? I would love to see the GPS source code

Sent from my SAMSUNG-SGH-I897 using XDA App
 

Dani897

Senior Member
Aug 16, 2010
3,615
670
Ok I hear what you are saying, I never messed with the settings and claimed that it was fixed. I am under the impression that my gps is working and always was but with the new jh7 firmware (ota version) it definitely works better, I had the samsung-firmwares.com release and it made no difference but designgears rooted decided version of thee ota release made a difference. What settings need to be changed to disable all network assisted location to test if I'm actually getting a gps fix without agps?

Sent from my SAMSUNG-SGH-I897 using Tapatalk
 

foxbat121

Senior Member
Apr 27, 2006
2,846
256
Ok I hear what you are saying, I never messed with the settings and claimed that it was fixed. I am under the impression that my gps is working and always was but with the new jh7 firmware (ota version) it definitely works better, I had the samsung-firmwares.com release and it made no difference but designgears rooted decided version of thee ota release made a difference. What settings need to be changed to disable all network assisted location to test if I'm actually getting a gps fix without agps?

Sent from my SAMSUNG-SGH-I897 using Tapatalk

Network assist is not a problem. There is no need to disable it.

Just take a test drive using Google Navigation. Ignore the fact that it always seems to be dead on your position (because all navigation software snap you to the nearst road). Instead, pay close attention to:

1. Whether or not you see a blue circle surrounding your position. If you do see that, your GPS has failed at that time and the size of the circle is the estimated inaccuracy of the GPS. You need to be patient because blue circle comes and goes randomly.

2. Pay attetion to certain landmarks like bridges, overpasses and intersections. And compare that to your position on the map to see if you experience lags.

3. The navigation software snaps you to the wrong road nearby even though you didn't see the blue circle.

In my personally experience, all three showed up randomly. I have no problem getting a quick lock at all.
 

mindfrost82

Retired Senior Moderator
Network assist is not a problem. There is no need to disable it.

Just take a test drive using Google Navigation. Ignore the fact that it always seems to be dead on your position (because all navigation software snap you to the nearst road). Instead, pay close attention to:

1. Whether or not you see a blue circle surrounding your position. If you do see that, your GPS has failed at that time and the size of the circle is the estimated inaccuracy of the GPS. You need to be patient because blue circle comes and goes randomly.

2. Pay attetion to certain landmarks like bridges, overpasses and intersections. And compare that to your position on the map to see if you experience lags.

3. The navigation software snaps you to the wrong road nearby even though you didn't see the blue circle.

In my personally experience, all three showed up randomly. I have no problem getting a quick lock at all.
This has been my experience too...and while Cog 2.1 has made it better, I still experience these same problems.
 

phr00t

Senior Member
Apr 28, 2008
354
144
The problem seems to be position estimation. When you take a sharp turn, the GPS position will keep going "expecting" you to follow the same path. After a few seconds, the GPS position will slowly return back to your real position.

If we could just remove position estimation / interpolation, we might see improvement.

You can see what I am talking about in my post here:

http://xdaforums.com/showpost.php?p=8295858&postcount=2
 

imb951

Senior Member
Nov 8, 2009
258
35
Thank you ShortFuse.

This is the most truly helpful GPS thread in a while. I hope we can get to the bottom of this soon.

Everyone needs to contribute to this thread!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Funny, how you can work with people on these forums and not really know much about the person. I'm a dude lol. Just weird having to state that :)

    Sent from my SAMSUNG-SGH-I897 using XDA App

    Yeah, funny. Part of the anonymity of the Internet. Nice working with you, dude. :D

    BTW...if I'm not mistaken (haven been to first page of this thread for a while), I think the Jupiter files is what started this thread. Go to first page, and do some reading there.

    Also, at this point, I too don't really know what they do. I've just been willing to experiment with anything to improve the GPS.