yashsingh1/xdaforums huggingface dataset:
[Captivate Android Development] bamonkey:
Been watching the progress on this lately and have to say big props on all the research. Will try it out and see how it goes
[Captivate Android Development] Mac11700:
I'll try it and see how well it does when I get home from work..

Mac
[Captivate Android Development] ggonzalez7777:
So just install it through CWM?
[Captivate Android Development] Da_G:
Yes, the attached zip is a CWM zip. Note that these settings are only what I found optimum, and as this is the development forum, I encourage you to tinker with the possible values (commented inside the jupiter.xml) to figure out what works best for you :)
[Captivate Android Development] bamonkey:
Just walked from inside heavy building to outside...after 10 Seconds I had a full lock while walking showing 5m distance...holy f@$#& s&$#$ that is already amazing. I'll use it driving home after work....mad props
[Captivate Android Development] 1randomtask:
So can I change this before flashing the rom? if so, how? is it possible you can push a "AT&T" version and a "Google" version?
[Captivate Android Development] Da_G:
Sure, you can edit the file /system/etc/jupiter.xml in the zip before flashing it to the device. I'll make one with settings for google and control plane and post them in a sec.
[Captivate Android Development] 1randomtask:
given i'm in Australia, is there any value at all to changing my ntp servers to local ones (0.au.pool.ntp.org) as opposed to US ones?
[Captivate Android Development] bamonkey:
Edit I'm posting to slow lol
[Captivate Android Development] koreancanuck:
:( I would soooo try this out right now if I was not overseas atm. It'll be 3 weeks before I can try this out but to Da_G thank you for doing something that Samsung should be working on the most! :)
[Captivate Android Development] Da_G:
Ok, updated first post with AT&T, Google, and Control Plane versions. Control Plane should work on any cellular provider (if they have implemented it, which all should have)

Regarding changing the NTP server that can't hurt, but should only affect the TTFF (Time To First Fix) as it should sync up to the GPS satellites after that.
[Captivate Android Development] 1randomtask:
Is there any value of Control Plane vs Google SUPL? should one be "better" than the other?

Cool. Didn't quite understand how it was used in relation to GPS.

Is there a rough laymans terms of why having WIFI on (and connected to an AP) leads to far more accurate results faster, when its a new AP that i've not connected to before? I was thinking it might have something to do with Time Servers and Latency (as latency to an NTP would be *dramatically* lower over Wifi VS any form of cellular comms) - given your explanation re NTP, I don't think thats the case now.

It certainly can't be "google knows where the AP's are", given that I work in IT Services and create/delete/move AP's all the time.
[Captivate Android Development] Da_G:
In the case of AGPS, your current CellID, along with MNC and MCC are sent to the database (your cell providers control plane server, google, or any other SUPL server provided in jupiter.xml) in order to obtain approximate Latitude/Longitude for an initial fix. (due to the nature of GPS, having an initial "guess" as to your current location helps to seed a faster initial fix, which is the main function of AGPS) The reason your Cellular Provider's database could be better is that it is more likely to be up to date than googles. But of course this varies! Some providers don't even maintain a CP server for AGPS.

The reason WiFi helps the time to first fix is similar. Google actually does have your phone report its visible APs (by MAC address) and current best-guess location to its servers. Everyone else's does this too (assuming they have the wireless tick box on) - This allows them to build a large database with which to seed AGPS from. You may have noticed the first time you turn on "Use wireless networks" in Settings - Location and Security, you get a boilerplate disclaimer about allowing google to collect anonymous connection data. That's what this is for :)

Adding some info to the first post about "Use sensor aiding" and "Use wireless networks" now.
[Captivate Android Development] Mac11700:
Pardon my ignorance...but does this mean after the initial boot with google it is no longer needed to have wi-fi on to get good locks ?

Mac
[Captivate Android Development] Da_G:
With stock settings (JF6/JH7), all the aiding data was not saved, but with the proper settings in jupiter.xml, aiding data should be saved into /data/gps and NVRAM so that the GPS chip can use it on the next fixes. This data is only good for a short period of time (hours to days) so unless you are using the GPS that frequently, WiFi on is still beneficial. You only need to have it on at the time you get the first fix, after that you can shut it off.
[Captivate Android Development] Mac11700:
Cool...thanks for that detailed explaination

Mac
[Captivate Android Development] azranger:
Rred

The whole point of my post is about the need for the timing to be correct, without that there is no way the GPS can be accurate. The errors that these devices generate are far far far outside of the geocoding, map errors etc.... When you can take 5 different phones and stand in your driveway and 4 of them show you within 3 meters of where you are standing and the cappy shows you 4 houses away, that's not a map error.

Krynn

Yes, I agree with you. I did see where Da_G tried that on the processes. That was a quick surface test to see if that might help - I think it lies much deeper, it's more than just a priority issue. Maybe one of the kernal guys could do experiments.

As far as your My Tracks, that was my result as well - That's why I think it is a timing problem and even then it will slowly start to drift then snap back. I think the snapping back is do to the time sync that the sats do. The more the CPU is working on other processes and services the worse the GPS is.

EM, yes that's another issue and better shielding would help as well as a better antenna.

Now what can this group of brilliant developers do.

1) Work on changes to the setup files, deamons, etc - done (Thanks to all and has helped alot)

2) Radio - Plays a part but won't fix it completly and really depends on the area you are in.

3) Look into the drivers, kernel, timing

4) Testing out if adding more EM/RFI shielding around each chip would help. Sure can't hurt.

5) Improving the atenna, won't fix but hey stronger signal is always better.

Unfortunatly their is no one fix wonder for this phone. I still think that if the timing, protocol stack etc. is the one area that we can get the most bang for the buck. Maybe take a kernel and strip everything out of it then add in only whats needed for the GPS to work. Even have the touch screen turned off just boot directly into a GPS test program. For example there is no official release of 2.2 yet and the GPS does work better on 2.1 not great but better. What's different in the 2.1 that makes it work better?
[Captivate Android Development] azranger:
Rred

That might be a good episode for Mythbuster or Top Gear. My thought was to use the M1A1 as the atenna!

Not too worried about the "Foreign Aspect", we still have the ability to interduce the error factor back into the system but that is mute now since the Ruskies have turned on their own GPS system last month. It has a hole in the coverage; in the western hemi I think, when that last lunch of the last sat blew up. Hum, wonder why that happened.
[Captivate Android Development] Rred:
Sorry, az, I misunderstand you. You've got a solid point there about the different GPSes and the one that isn't singing in the choir.<G>

The foreign stuff...just a mind wandering, but wouldn't it be nice to compel these folks to all reveal what's going on inside their chips, instead of hearing "Ignore the man behind the curtain" year after year?<G>

The Russian and EU GPS systems should just give us good redundancy, if they ever go fully operational. The Russians are an interesting case historically. Bear in mind that during the 1800s just about every major power tried to invade and conquer Russia somewhere, sometime, so their paranoia wasn't entirely irrational. Even the US invaded Russia during the Cold War. Russian air space, that is. Gary Power's U2 flight was only one of many (50+?) incursions, and if the Russians had overflown DC or NY that many times, we'd have gone to war. These days...I don't think the Russians want to knock down any of our satellites, more likely the North Koreans, Chinese, or Iranians would be looking to tweak our tails. I fully expect that the DoD has been quietly preparing for that eventuality, that's their job.

But back on point:

Any proper radio lab with quiet room, any "class one" cell phone repair facility for example, would be able to listen to the emissions from the phones and tell within minutes if the phones were creating interference on the GPS frequencies. Or, possibly just wrap the whole phone (except for the GPS antenna patch) in copper foil and then see how it logs GPS data for a while. Ain't rocket science, just stonewalling.

There's enough of that nonsense in this world, I hope Samsung takes a real hard hit in the wallet, AND to their prestige. (AT&T of course, hasn't had any pride or prestige in years, and they probably already know their profits from captive [sic] customers will exceed their share of any lawsuits. They've played that game often enough before, they pay out in "airtime" and other meaningless currency.)
[Captivate Android Development] nissy86:
LOL they should hire you in Samsung.
[Captivate Android Development] azranger:
Rred

I think we are all on the same page :)

I have been researching some bluetooth and gps ic's for a product that I am designing and it would be really nice to have the manufacturers tell you what's going on. It's like dealing with top sercet mil stuff, they will only give you some of the basics but not enough to do anything with. You have to ask their premission to even get the datasheet, which they want a nondisclosure for. Please don't brother the man behind the curtain, he's busy eating twinkies!

I'm sure Samsung did EMI/RF testing, but I can't even think of how many times an engineer/tech has told me "Well, it didn't do it when I tested it".

I agree about N. Korea, China and Iran are threats but Russia's bear is coming out of hibernation and is getting hungry again.

Anyway, I'm sure that there is a way fix this problem. Just thinking it could even be interference or crosstalk on the inner layers of the PCB, which of course means throw it away and start over :(
[Captivate Android Development] askpcguy:
While driving, I deleted GPS data in lbstestmode. 17 seconds later I had a gps position lock in lbstestmode.

The ultimate test would be to compare two My Tracks, where one is done using the GPS in the Captivate and the other is recorded using a bluetooth GPS receiver.

I still get the ultra annoying gps position cursor snapping to adjacent streets causing the navigation to re-calc and consume battery power..etc. But for the most part, I finally have a Phone, Web Browser, GPS and Mapping device all in one.

I want to see measurements using gps signal testers to verify the accuracy of the GPS antenna. Then more precise measurements to gauge how the GPS driver performs compared to standalone units and bluetooth gps receivers.
[Captivate Android Development] Rred:
"which of course means throw it away and start over"

As in, recall the phones, replace them with new/remanufactured phones, and get on with life. Nah, they'll never do that. The class action suit buys them five years (typically) before they have to pay anything, ten if they're good, and then they give out "chits" that most users throw away. Much better profits. For the short-minded.

"it didn't do that when" Yeah, I know corporations that got rid of qc departments and procedues as a waste of money. They said, literally, everyone will just check their own work more carefully from now on. One of those was a huge mistake and the corp in question restarted a dedicated qc department right after it. Some folks just don't understand, you can have the brightest engineer in the business but if he isn't focused on qc and familiar with qc issues alone...he's going to be blind to what has to be done. Or, too busy to do it.

Then there are other issues caused after the engineering, by the "fiscal engineers". Corps actually hire engineers to examine the "finished final approved product" and find ways to cut costs, often removing things like filters "it doesn't need". One can only imagine why Samsung is stonewalling. Maybe if we each mailed them one stone, and said "Here is help for your stonewalling" ?
[Captivate Android Development] diminished5th:
Ok been reading through and I have COG3.0.2. It seems like from what I was reading all I have to do is use CWM to install this? Please correct me if I'm wrong. Also if this doesn't fix the GPS issue how would I go back to the stock settings. Thanks for the help in advance.
[Captivate Android Development] azranger:
Yes, you use CWM to install the files but COG already has GPS fixes built in, There are many fixes out there and you can experiment on which works best for you. Unfortunatly none of the fixes will fix the GPS, they only make the sat loc faster not more accurate. You will have times when your GPS is dead on then it will start to drift off.

On the app market there is a app from samsung to restore the gps if you need to restore to stock, it's called gps restore.
[Captivate Android Development] xpcomputers:
I'm sure I read somewhere that someone noticed that the GPS runs badly when the screen is showing a white background, but fine with black background (I haven't tested this myself).

They hypothesised that the screen itself (or its driver chips) might be the cause of the EMI.

I think they reported that some GPS software worked fine in night mode (uses dark colours), but goes wonky when in day mode (uses white background). Since this was the same software just using different screen colours, most other settings and features should be identical.

Their theory was that shifting programs like my tracks to the background process only worked because it shifted you away from a white background on the screen!

I think this theory has enough merit to be tested more fully!

If we could get one of the gps test software authors to make a version with a button on screen to switch from black background (which most use) to white, and back again, them we could prove this theory, whilst watching the sat signal strengths on screen live.

Even better might be some other features in there too... like a button to toggle a gpu loop for example, or other tests. That way you can trigger various items from inside a gui displaying the sat signal strengths. And it would be simple enough to get mass testing by everyone on their own device, and report back.

Sorry I can't remember where I read this, as it was a few months ago, (possibly in the as I9000 forums?).

Hope this helps the knowledgeable ones...

Mike
[Captivate Android Development] Dani897:
ive been having some success with control plane mode and no gps plus or dynamic accuracy. though i can see my accuracy go away with tree cover it works best overall never straying more than 10-20 meters from the road, in the past i have seen more than 100 meters away from the road in my tracks. it seems to work great with google nav as well. but it may also be my rom.

i have only the most basic understanding of da_g's post but i remember reading that glgps processing is handled in the gpu, i do recall having bigger tracking issues with the gpu overclocked way back when unhelpful was actively maintaining his kernel thread and i was using his v1.4.x kernel that had user configurable gpu settings. the question is, is it gpu load or gpu emi that is the problem? well da_g observing signal drop off when switching apps seems to suggest emi, but what if it's the power supplied to the chip, could a heavier gpu load draw the voltage down just a bit? probably not but it's something to think about. we need an unhelpful kernel for 2.2 or ginger bread to test that (you could edit the system voltage as well as the cpu voltage.) i wonder if someone could port his work to that chinese kernel or the armani one, or the rogers one?

edit: now that i think about it my voltage drop idea might explain why a white screen effects the positioning more than a black screen in some peoples experience.

i will say though i have no software/programming knowledge i am completely comfortable with pulling my phone apart, i am comfortable with electronics i really like the ease of disassembly and the tough construction, if anyone can help me identify the gpu(or is that part of the hummingbird chip, confused?) and gps chip i can try to shield it and post a video.
[Captivate Android Development] askpcguy:
Here is a post on the disassembly of the Captivate http://xdaforums.com/showthread.php?t=740022

The GPS chip is a broadcom and there was a better disassembly site which identified the different chips but I cannot find the page now.
[Captivate Android Development] ThisWasATriumph:
Ok I really think you guys are on to something With the power usage thing. I monitored signal strengths with screen filter on and off and with it on observed higher averages. :eek: Furthermore, using only GPS Test, I watched signal strengths increase all across the bars at the exact moment the screen dimmed a few seconds before the screen turns off. It was instant.
[Captivate Android Development] Rred:
DaG, that's fascinating. To think that the graphics processing unit, or the AMOLED screen itself, could be causing enough RFI/EMI to kill the GPS function....I think the technical term for that situation would be "screwed!".

Latent manufacturing/design defect, covered by US state and federal warranty laws. That could really hurt somebody's bottom line, no wonder they're stonewalling.

By all means, please keep up the good work!
[Captivate Android Development] xpcomputers:
Ah! Now that could be it! I'm sure I read somewhere else on XDA forums (again can't remember where sorry - I've read LOADS of long threads about GPS problems!), that GPS supposedly works better when powered from a car power adapter, than when running on battery! Like you say, those two items could be linked... They could both point to a lack of voltage or amps to run the gps! Clearly it isn't an on/off thing, but a sliding scale.

More power = higher gps signal strength.

Lower power = lower gps signal strength!

I think it still could be EMI, but at this point, I think power supply looks to be a better place to push the research first...

Mike
[Captivate Android Development] realcoofox:
hi, Da_G, nice to meet you! The first time i know you use android! Good job!

Send from my I897 using XDA app via GFW
[Captivate Android Development] minlee85:
GPS Lock

Hello DA_G, noob here..sort of... admiring your work....I flashed my att captivate with cognition 3.04 and CWM'd one of your gps tweak (att version)... after that bam!!!! I had 10 satlite fixed instantly. However, when I drove around with stock navigation on, it keeps losing GPS signal and do not update the current location all the time... is it my app or I should try different version of tweaks???Do you have any thoughts???
[Captivate Android Development] Dani897:
the community hasn't nailed down a fix yet, da_g has just set things the way they should have been, there isstill an underlying issue. google navigation seems to be the biggest problem, try another app,

"Here is a post on the disassembly of the Captivate http://xdaforums.com/showthread.php?t=740022

The GPS chip is a broadcom and there was a better disassembly site which identified the different chips but I cannot find the page now."

i have seen that thread but in my phone the text on many of the chips is not very readable. i haven't pulled it apart again yet, if i had a second phone i would be more proactive about it.
[Captivate Android Development] joeuser:
use sensor data to aid gps

on froyo in gps settings, we have a "use sensor data to aid positioning and save energy". when enabled, it seems to turn off the gps after a couple of minutes of not moving the device and turn it back on when you resume moving. you can verify this by watching the gps icon in the title bar. i like this function a lot, it really helps to save energy on bike trips. no need to toggle the gps manually for every little break.

however, this function also seems to "do" something to the position data. the "overshooting of intersections" that da_g's settings fixed nicely seems to come back when enabled. maybe the driver is trying to interpolate some movement from the sensors here? anybody knows exactly what is happening?

what i'd like to have: support the automatic sleepmode of gps while not moving but NOT fuxxor the position data.

any clever ideas on how to achieve this?
[Captivate Android Development] bobloblawsum:
i have a bell I9000M vibrant, basically the international I9000. Does anyone know if this fix will work on this device?
[Captivate Android Development] opcow:
Interesting thoughts on the screen causing interference. Before sending my phone in for repair I had flakey GPS. If I started Maps or My Tracks without having a recent GPS lock they would take a really long time to lock (if ever). If I ran lbstestmode first and did a get postition test I could get a lock and then switch to Maps or whatever and get a lock. I always wondered why that was. Thinking about it now, the lbstestmode screen was mostly black, so maybe that explains it.
[Captivate Android Development] movielover76:
Much better

I don't ever expect a perfect GPS on this phone, just good enough to get me through august when I'll be upgrading my phone, I'm fairly sure their is a hardware issue that is partially to blame but with the ATT version of this fix and Cognition 3.04, I've got very good results in Google navigation, which is all I'm concerned about, my locks inside were about the same for what it's worth, but what I've noticed is that locking into satellite's when stationary doesn't seem to correlate very well with decent tracking, which is the real goal.

Tracking is generally good, in two 35 minutes drives I only had the tracking drift onto an adjacent road twice and then quickly correct, so it's made the GPS very usable.

One hint, I'm fairly sure that the antenna's on this phone are in the bottom, and when I mounted my phone in my generic cell phone holder so that the bottom of the phone was not obstructed by the holder, on the second part of my drive, the circle (indicating the accuracy of the location) stayed noticeably more accurate than my first part of the trip, indicating to me that It was performing better because the antenna could get a better signal, and this phone seems to need a very good signal to stay accurate to any degree.

Thanks for the great fix, this will probably keep me from having to replace my phone prematurely and pay an ETF that I'm trying to avoid
[Captivate Android Development] cmd512:
Having the phone in a phone holder on the windshield = GPS performs flawlessly. Second I lower the phone to lap level, it all goes to hell in a hand basket!
[Captivate Android Development] AtoZ0to9:
This is exactly the GPS fix I needed... locked on perfectly in a hearbeat while indoors and was 100% accurate about where I was... excellent work!
[Captivate Android Development] xpcomputers:
GPS antenna is 3/4 way up left hand side!

This means best reception is found when phone is landscape with the left edge at the top (ie rotate clockwise). I suspect most right handed people instinctively rotate it anti-clockwise instead, and most holders are designed that way too!