yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] sgspluss:
Ok let me answer...

The gps-update and the init.d file are both needed becuase with gps-update you'll install the lto.dat (which actually dont work with the init.d file atm. i dont know why) and the init.d file are for updateing the lto.dat (this works but dont ask me why updateing are works and install not)

Then we have the gps.conf, the one from crypeted is for the whole world and dont need any edit, if you use the ntp from ntp.org then you have to edit your gps.conf exaclly for your country. So if you can see the one from crypeted are user friendlier thats the reason why i add this.

Now let me explain whats lto.dat are for... As far as i know it contains gps satellite states for/in orbit. (more i dont know, sure it contains more but that i dont know)

Result if you use gps.conf with lto.dat together, you'll get an fast GPS fix...

BTW i have sent breeno also an PM for few hours where i explain what does what.

Now lets come to the end, the reason why i was rude is he ask few questions in GPS fix thread (about update-binary same like here) and tells me he is new on android and lookes into the flashable.zip so far all ok but after few minutes he post questions about GPS fix on CM10.2 dev thread? Why Not again in GPS fix theard as befor? Anyway today it wasnt my day and i will be fast angry, thats the reason why i have written rude BUT i am sorry never mind it in this way...

Hope I've clear out a bit what does what and why it is in the flashable.zip.

Also i hope if anyone have an idea to make the GPS fix better feel free to PM me...

Regards

Tapatalked from my GT-I9001
[LG Optimus 2x] breeno.net:
[MENTION=4920940]sgspluss[/MENTION]: I've seen this kind of goofiness with OpenBSD's rc.d system (analogous to init.d). My suggested workaround would be this: Populate your zip with a recent lto.dat to be copied to /data/gps, and ensure it is given correct permissions at install. The 07lto-dat script will find the pre-existing file and should be able to overwrite it (shouldn't matter that it is old because it just gets overwritten by the new download). No more issue with the first download by 07lto-dat. Make sense?

As for everything else, no hard feelings. I'm the newbie here, and I understand now that my way of doing things differs from the norm at XDA. I'm used to the free-for-all of the OpenBSD mailing lists, with tons of open communication in the development list. Nobody's afraid to post their diffs, research, bug reports, or whatever if it adds value. There is some method to that madness, because only PM'ing authors could result in a lot of devs not getting the heads-up, you know? Food for thought, not trying to push anything on anybody.

-Breeno

---------- Post added at 04:46 AM ---------- Previous post was at 04:07 AM ----------

I don't know if this will help, but I stumbled across this today: How Android GPS Works. It made things a little clearer for me.

I'll try and find some time to look into this more, but earlier today was a bit of a free time anomaly. I'm coming up on my term 1 law exams, so I'm going to be pretty busy over the next month.

I expect I will get a chance to try more stuff this Christmas break, so if you could spare some quick feedback on this report it would be good. Particularly, was I too verbose for your needs? What can I do to make a better report?

Thanks.

-Breeno
[LG Optimus 2x] vkk178:
Some info on what LTO does is here http://goo.gl/pP7AOp..

An App which seesm to do the same http://goo.gl/AeQvf2
[LG Optimus 2x] breeno.net:
GPS Test Report

[MENTION=3605868]tonyp[/MENTION]: That was my mistake, I did indeed have the stock gps.conf. I was confused by this thread I found while digging around: CM7 GPS - no lto.dat?.

Note that messages 24, 26, and 27 in that thread all indicate that the P990 doesn't use gps.conf. This is important. Here's why.

I took a little time and ran a test matrix. I tried each combination after a reboot with a two minute wait to let the system get fully loaded. Then I'd turn on GPS and load up GPS Status and give it 60 seconds, recording the best fix/sats number. All testing was done inside my house on the main floor (two story house). Here are the results:

Stock gps.conf / no lto.dat: 5/8

Fix gps.conf / no lto.dat: 6/8

Stock gps.conf / with lto.dat: 11/11

Fix gps.conf / with lto.dat: 11/11

It seems that gps.conf has little or no effect. This reminded me of that CM7 thread with claims that the P990 doesn't use the file. So I did one final test. I removed gps.conf and tested with only the lto.dat file. 11/11!

It appears that there is absolutely no need for the gps.conf file. I'm testing it with only the lto.dat right now from my basement, where I could never get any GPS lock in the past, and I'm getting 9/9! :D

I'm convinced at this point that inclusion of some form of the 07lto-dat script in /system/etc/init.d would be a great addition to TheROM. As for gps.conf, I doubt it is needed at all. :eek: Who woulda thought it?

-Breeno

---------- Post added at 06:25 AM ---------- Previous post was at 06:23 AM ----------

Yeah, I saw that earlier today, too. My first reaction was "GPS AIDS? Why would I want to give AIDS to my GPS?". :silly:

Thanks for the other link!

-Breeno

---------- Post added at 07:23 AM ---------- Previous post was at 06:25 AM ----------

[MENTION=3605868]tonyp[/MENTION]: ^^^ This got me curious. I had a quick look at /system/etc/gps_brcm_conf.xml and I noticed some other interesting values inside the <hal> tag (where ltoFileName="lto.dat" resides), namely:

LbsSyncLto="false"

LbsSyncLtoThresholdDays="3"

Could it be that synchronization of lto.dat has been sitting dormant in gps_brcm_conf.xml all this time? :fingers-crossed: Perhaps. I only have enough time to report this potential avenue. I've got a big day of classes tomorrow, and I can't afford to do anymore testing tonight. :crying:

-Breeno
[LG Optimus 2x] sgspluss:
Yes breeno you are right with this

lto.dat contains (as i saied befor) gps satellite states for/in orbit thats the reason why you get with them faster fix.

Now its also depending in which country you live, that handles the gps.conf... as far as i know in the stock are just 3 rates in this one from GPS fix are much more information, thats means theoretically also a bit faster again.

In my Stock-Based rom we need both file (there it seems that both works only togehter) in CM i really dont know if its the same, but it doesnt matter becuase if you have the same result with stock and fix gps.conf we can change it without problem.

For the flashable GPS fix, it needs a bit more of work example to get the init.d script fully working that we can delete the bin file, and also personally i have to learn more about those files generally GPS, let me see what i can do in the future more :)

BTW: i fount this message today in the GPS fix thread maybe it helps in anyway?
[LG Optimus 2x] echo_21:
Hi Breeno, please be very careful with your methodology and your summary! There is a large difference between GPS cold start and GPS warm start. See e.g. http://en.wikipedia.org/wiki/Time_to_first_fix

I guess your test results are all results of a warm start. But people are having problems with GPS cold start (e.g. after ROM replacement).
[LG Optimus 2x] breeno.net:
Good link, thanks.

Am I correct to assume you meant "after

battery

replacement"? Cold start / warm start is the equivalent of cold boot / warm boot? Assuming that, I expect that such people are having a problem more significant than can be corrected by changes to GPS configuration files. The Broadcom LTO technology is designed specifically to provide aGPS benefits even where the mobile carrier's network cannot be reached. It is designed to bring the device up to the "hot or standby" scenario (relatively) quickly with only the lto.dat file. See here: Broadcom LTO Technical Brief.

I've just confirmed this myself. Using only yesterday's lto.dat (gps.conf not used), I turned on airplane mode, powered down, popped battery, booted up, corrected time manually (margin of error probably 3 seconds), and then turned on only GPS. I had 11/11 fix/sats within one minute (testing yesterday with 3G on, I was getting the same locks in less than 15 seconds). Before yesterday, I've never had my GPS successfully lock without 3G enabled, and even then it always took at least a couple minutes.

If people are having trouble as you say, I'm going to go out on a limb and recommend full wipe without restoring any apps, just a clean install of TheROM. Then test as I have above. If enough people report problems under those conditions, then we may have something more than mere faulty hardware. They key word is report. They've got to do the leg work if they hope to get results.

People that do such testing will want to use this link to retrieve the most recent lto.dat generated by Broadcom: Latest lto.dat. It should be copied to /data/gps, owned root:root, and chmod 644 (rw-r--r-- for the GUI people). If people want their testing to include the gps.conf from message #1362, it needs to replace the one in /system/etc. Make sure the permissions remain the same as the original file. Honestly, at this point I consider gps.conf to be a waste of time on the P990.

[MENTION=3605868]tonyp[/MENTION] / [MENTION=4920940]sgspluss[/MENTION]: If you have a look at the Broadcom LTO Technical Brief, you will see that the third paragraph under LTO OVERVIEW states "... devices using LTO can operate for up to

four days

out of network ...". This would indicate that the 07lto-dat script has chosen too high a refresh rate for the lto.dat file. I think it would be advisable to change "max_age_days=5" to "max_age_days=3".

-Breeno

EDIT: Same cold boot scenario as above, except with mobile and WiFi enabled at boot, and thus time auto-sync'd to an NTP server. Identical result: 11/11 in approximately one minute. For those who wondered.
[LG Optimus 2x] fabiodelaplazia:
Hi, updata from tonyp build 5, wipe is require??
[LG Optimus 2x] breeno.net:
Always a good idea to go to the changelog on the first page and read through it. Finish that by clicking through to the most recent build announcement, where you would have found...

That is, if by "tonyp build 5" you mean TheROM build 5. As far as I know, nothing more is necessary but don't blame me if there is something hidden away in a previous build announcement!

-Breeno
[LG Optimus 2x] fabiodelaplazia:
build 5 is 10.1 ans this version is cm10.2 no probleme with only dalvik cache and cache wipe?

Edit: by precaution i fullwipe+titanium backup
[LG Optimus 2x] tonyp:
I see, yes then I agree to [MENTION=5458952]breeno.net[/MENTION] - just push an older lto.dat to the folder in the flashable zip, that would be way better than having to manually run the gps-updater script.

Let me tell you again: This statement is simply wrong, you do NOT

NEED TO

edit the gps.conf file to a country specific NTP server.

Yes, of course you won't have any disadvantage from that as it could might increase the RTT (round trip time) a little bit, but it certainly won't do anything exceptional.

While I agree Gordons gps.conf is the better one you're reason for that isn't correct.

But thanks a lot for linking to the commit [MENTION=5439590]farbing[/MENTION] found - this does look like a good addition to my CM10.2 device tree which will basically do the same as the intention of the init.d script

You most certainly weren't verbose for my needs.

Just because it's become the norm at xda for most users to post one-liner demanding questions like "I don't have time to read the OP, can you tell me..." it doesn't mean the norm is the right way to do things.

I always appreciate if people are participating in research and development, so there's no need to apologize for that for my side.

As [MENTION=5399879]echo_21[/MENTION] already noticed you need to be careful with the GPS cold fix and warm fix.

Many apps allow you to reset the gps data, like the GPS Status ot GPS Status & Toolbox one.

You have to do that before being able to test it. The cold start takes longer as all gps positions will be questioned one after the other.

In a warm start your phone already knows a couple ones where to start.

The script downloads the 7day file, I think updating it every 5 days is sufficient enough. But 3 days is what the commit suggested by [MENTION=5439590]farbing[/MENTION] does as well, so I think that's what I'm going to choose as well.[/QUOTE]
[LG Optimus 2x] sgspluss:
Yes thats right i dont have thought about this solution :good: thank you, this will come with next flashable zip...

Hmh so if i am so wrong can you tell us why you can find follwoing text on pool.ntp.org?

As pool.ntp.org will assign you timeservers from all over the world, time quality will not be ideal. You get a bit better result if you use the continental zones (For example europe, north-america, oceania or asia.pool.ntp.org), and even better time if you use the country zone (like ch.pool.ntp.org in Switzerland) - for all these zones, you can again use the 0, 1 or 2 prefixes, like 0.ch.pool.ntp.org. Note, however, that the country zone might not exist for your country, or might contain only one or two timeservers. If you know timeservers that are really close to you (measured by network distance, with traceroute or ping), time probably will be even better.

So as i understand it now correctly what i saied are correctly BUT not for gps fix just for get the right timezone ;)

What does it mean, it seems that the gps.conf really arent for getting faster gps fix just more for timezones BUT i can imagine if you set your country then you'll have an little improvement (maybe just few m/s or not, dont know) as without the correct country where you live...
[LG Optimus 2x] sgspluss:
Which actually means we just need the lto.dat in /data/gps.

If this file in the roms and update itself all 3 days we get "fast gps fix"...

So we dont need to work on gps.conf this doesnt change anything about gps fix, am i right?
[LG Optimus 2x] echo_21:
Thank you very much for spending your time on doing this experiments! Only working systematically like you do will bring light into the darkness :good: . I wish I had the time to do such investigation too.

Please continue to share your results.
[LG Optimus 2x] tonyp:
Yes, it will probably improve the time to get a fix a little. As your quote tells, "you get a

bit

better result".

All I wanted to tell you was that the "have to set the server" and "must set the correct server" etc has been wrong, as this isn't needed at all.

If Gordon would be able to host servers all over the world it would improve his conf file a little further as well.

The patch you're linking here is the framework support, which requires an "overlay" in the device tree.

Here's an example for that: http://review.cyanogenmod.org/#/c/51423/

I will merge that patch into my next build, then you'll have an option to enable auto lto download in your settings.

I am pretty sure the gps.conf does play it's role. See, at CM10.1 changing the gps.conf to the one from Gordon helped lots of people to improve their GPS lock speed - that's why pengus and I used it by default at some point.

Unless CM10.2 would have changed that behaviour, which I didn't come across any references, to.
[LG Optimus 2x] echo_21:
What is a fast fix? I would say "fast" should mean as fast as with P990 possible (clear sky, outside buildings, not moving). This is any time under let's say 12 seconds. This will only be possible if the P990 has current ephemeris data. The ephemeris data is valid only for 4 hours. ephemeris data is valid only for 4 hours. So it cannot be a valid part of an lto.dat file that had been updated days ago.

If ephimeris data update does not work over aGPS (downloads GPS data like ephimeris and almanac from the internet) or an ephimeris calculation script that runs offline on the P990 (I don't know if the latter exists and breeno.net is talking about), any GPS fix will surely take more than 12 seconds. The ephimeris data has to be downloaded from the GPS satellites data stream then. This will take e.g. 30 second what is not "fast".

Note: standard aGPS downloads almac and ephimeris from a aGPS server in the internet. Only the almanac is valid for many days (up to 60 days) and it will be a part of lto.dat.

Can we be sure that the fixes under discussion cover the frequent (once in 2 hours) ephimeris data update too?
[LG Optimus 2x] breeno.net:
That's my take on the situation. You might want to update your script to use the other LTO file, too.

-Breeno
[LG Optimus 2x] sgspluss:
Well yes it seems to be from device to device variable... for one its working good for some other it doesnt improve gps.

Lets see whats happend if you build the patches in they [MENTION=5439590]farbing[/MENTION] has written...

For now i dont know how is gps really working (same as you tony), so i can not say more because i really dont know anymore.
[LG Optimus 2x] breeno.net:
If we trust Broadcom's literature then the answer is yes. From Long Term Orbits Technical Brief:

This was the original reason I suggested a three day expiry on the lto.dat file.

-Breeno
[LG Optimus 2x] sgspluss:
Sounds interessting and answers many questions, but the whole literature from broadcom are very helpfull :good:

Now i understand it a bit better... :)
[LG Optimus 2x] echo_21:
Thanks for working this out! Reading Long Term Orbits Technical Brief makes perfect sense to me.

So let me summarize (forgive me if I repeat other posts and correct me if I am wrong):

1. LTO data have a validity of 4 days, so it is fine to update it every e.g. 2-3 days. In case if update download fails download has to be repeated as long as it is successful

2. A continuously running script periodically reads the LTO data and calculates the essential GPS ephemeris data used by the P990 GPS module at least every 2 hours and the GPS almanac data at least every 2-3 days.

I WAN'T TO HAVE LTO TECHNOLOGY WORKING PROPERLY ON MY P990 :D rather than I wanted to have working aGPS in the past.

Can we be sure that all required LTO technology scripts will run on P990 after the suggested fixes?
[LG Optimus 2x] sgspluss:
Found this... HERE

I think if we can get this fully working we have a perfect working GPS, or not?

We just need the lto.dat and for them an updater-script which update it every (lets say) 3 days, then we have to rewritte the gps.conf to "enable the offline LTO-AGPS"

Or what you mean...?
[LG Optimus 2x] breeno.net:
Just so I'm clear, there exists corresponding code that query's the LongTermOrbits object and uses the information to retrieve a new lto.dat file when the current file's age has exceeded the download interval? If so, that's great news! Will the option be enabled by default?

I'm still going strong without a gps.conf for almost the last two hours, including two battery pulls. However, I just renamed gps_brcm_conf.xml and rebooted. That completely disabled my GPS. Makes sense. Why would you need two separate yet redundant configuration files for GPS? Which one wins in case of disagreement?

Coincidentally, gaining my first satellite fix after restoring gps_brcm_conf.xml and rebooting took nearly two minutes. However, successive reboots and battery pulls went off as expected (fixes in under 10 seconds on reboot, around 60 seconds with a battery pull).

-Breeno

---------- Post added at 04:13 PM ---------- Previous post was at 04:01 PM ----------

You definitely understand! :highfive: My GPS performance has been incredible all day!

If I have understood tonyp correctly, then when he adds the latest patches the phone will automatically update the LTO data as needed. No external fixes will be needed, period. It will be built directly into TheROM. :fingers-crossed:

-Breeno
[LG Optimus 2x] sudden36:
I just want to add something about ntp. I think the gains in accuracy one gets when using local ntp servers is in the range of 1-10ms because the latencies of the connection are eliminated by the ntp protocol itself. The most important reason the ntp pool is accesible by country is load balance.

Gesendet von meinem LG-P990 mit Tapatalk 2
[LG Optimus 2x] breeno.net:
No, I wouldn't worry about that. The lto.dat usage is configured in gps_brcm_conf.xml, and it is already enabled in TheROM. We only need an automatic way to update the lto.dat file. Your script already does that, and it looks like CM10.2 will be doing it natively very soon now.

-Breeno
[LG Optimus 2x] sgspluss:
Thank you... let me take a look into the files also i will compare it with CM10.1 and so on, maybe i can understand it then better. ;)
[LG Optimus 2x] echo_21:
Sorry guys it is late an I suffer from a flew. Thus, my last post contained a logical error I have to correct here.

As the correct ephemeris data downloaded directly from the satellite or via aGPS from the internet contain actual time correction parameters, it is impossible to calculate them from LTO data that are e.g. 3 days old. The time correction is required to compensate fluctuating satellite signal delay times produced be changing atmospheric and ionospheric parameters. Atmosphere and ionosphere parameters change much more quickly (in hours) than the updates of the LTO data (2-3 days).

Without the correct ephemeris correction (no current time correction included) the location accuracy will worse than with correct delay correction. But if LTO calculates such non-precise ephemeris data from e.g. 3 day old LTO data a fix will be possible anyway.

I think now that LTO Technology makes a fast first possible under conditions where autonomous GPS (without aGPS) won't fix. But it will be not very accurate (e.g. +/- 50 m). After the fix the P990 is able to download the ephemeris data from the satellite data stream and the location accuracy will increase within minutes.

So a working aGPS should be as quick as a working LTO. A working aGPS should be more accurate at the first fix. The main advantage of LTO over aGPS should be that LTO makes fixes even when longer periods of no internet access.

Can we be sure that all required LTO technology scripts will run on P990 after the suggested fixes?

Can we be sure that aGPS is properly working on P990?

Can we be sure that LTO and aGPS mechanisms don't interfere?
[LG Optimus 2x] poruid:
Probably creation of an empty file with the touch command and setting the correct permissions on it suffices.
[LG Optimus 2x] sudden36:
Hey ho, after some testing with gps indoors i discovered an anoying problem with our p990. Activating the radio( GSM/UMTS chip) causes a significant drop in signal quality of the gps signals :(. It drops from a 8/10 continous fix to a 3/5 fix ever ~10s :(

Can anyone please verify my findings with a different baseband? I used v20E

This is most probably only relevant indoors, but i think deactivating the radio could also lead to a faster fix outdoors, because I think for the chip its hard to get a fix but easier to stay locked.

Gesendet von meinem LG-P990 mit Tapatalk 2
[LG Optimus 2x] Welliesorter:
Thank you!
[LG Optimus 2x] ronniet:
Yep, same here. I can't get a GPS lock. Tried a couple of apps to see what the GPS is doing and, at most, I can get about 3 satellites.
[LG Optimus 2x] Custom40:
Seriously? I get GPS lock after MAX 10 secs even without using any apps at all other than the navigation app.

In the house, I can't get any signal even if I wait for minutes, while in car, I have to hold my phone out the window for a few secs, but full GPS signal will be gained in about 5 secs most of the time.

In other words, try it outside, and then judge :)
[LG Optimus 2x] szabeee:
I have same problem that's why i can't use this rom :-/
[LG Optimus 2x] cleps:
I tried with Gps Aids, but the problem remains... Returning to cm10.1: (
[LG Optimus 2x] wucinac:
I have a problem. I noticed that when I get a message viper stop working and when I open an application seeking to re-install drivers that are already installed.
[LG Optimus 2x] derEremit:
could everyone who has no Gps fix please also post whether the're on old or new bl

i'm on oldbl and can't get a fix either.
[LG Optimus 2x] szabeee:
I'm on newbl and gps isn't working
[LG Optimus 2x] ronniet:
I'm on the old bootloader.