[Captivate Android Development] CLShortFuse:
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:

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 407513

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

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 409795

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 410010

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 411923

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:

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)

I FOUND SOMETHING WORTHWHILE!!!

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