nox-flamma / tramhunter

Automatically exported from code.google.com/p/tramhunter
0 stars 0 forks source link

Only uses GPS for location (not radio tower / wifi)? #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
On Motorola Milestone with 2.1 f/w if I start the app it shows a location 20 or 
so KM away (probably based on home location).  I looked at this for 5-10 
minutes (if not it seemed that long).

Eventually it showed trams near me and I don't think it was because of the GPS 
as I was in a tall building and "GPS Test" didn't think I had a fix.  If it 
used radio tower information it did this AFTER failing to get a GPS fix now 
BEFORE!!!!

Surely it should use tower/wifi info and then try to do better with GPS.

Original issue reported on code.google.com by dbar...@gmail.com on 20 Jul 2010 at 3:11

GoogleCodeExporter commented 9 years ago
How it works is that the activity starts with your last known location, which 
is usually a network-based location (wifi, cell tower) with 100m accuracy 
(roughly). It uses this to show the initial list of nearest stops. We assume 
that it's usually accurate enough for finding the nearest stop.

The activity then registers for location updates. So when your phone realises 
it has changed location, it'll tell Tram Hunter, and it will update the nearest 
stops list. With the location updates, we ask for updates from network and GPS, 
so it will use either method, obviously giving preference to the GPS.

It doesn't actually try them in order, they work simultaneously. This is all 
abstracted in the Android libraries anyway.

I'm in London, so haven't actually tested this function properly myself, but I 
believe a couple of the Melbourne dev's have. 

It should work in the same way the Google Maps does. Can you try it again, and 
let me know how it goes?

Original comment by andybott...@gmail.com on 20 Jul 2010 at 8:12

GoogleCodeExporter commented 9 years ago
I'll play with it some more however surely a tower based fix would occur within 
seconds unless do you have to specify an accuracy when doing so (100m for 
example and perhaps this is too much)?  If so sounds like a candidate for an 
option...

Even a 500m/1KM +- fix is better than what happens now, you could start that 
way and change when rough position found?

Anyway I will keep trying :-)

Original comment by dbar...@gmail.com on 20 Jul 2010 at 9:35

GoogleCodeExporter commented 9 years ago
We're not specifying any particular accuracy, so there should be no reason why 
it doesn't work automatically.

I'll try and get one of the other devs to provide some more information.

Original comment by andybott...@gmail.com on 20 Jul 2010 at 1:53

GoogleCodeExporter commented 9 years ago
Hi dbareis,

Andy is correct in what he is saying. The closest stops screen initially asks 
the phone for it's last known radio tower (not gps) location (to get an almost 
instant display) which can have greatly varying accuracy (i.e. from 100m in 
built up areas with plenty of towers to over 1km or more in areas with fewer 
towers).

This location will be used to display the initial list of stops, which probably 
explains the list showing stops 20km away.

The application then asks android to provide both radio tower (network) and gps 
location updates. If a gps location is provided the application will use that 
over the network location, otherwise it will use network location until it can 
get a gps fix.

Also when android provides location updates if those updates include accuracy 
then that accuracy will be displayed next to the screen name.

Can you reliably replicate this problem (i.e. can you make it happen again)? If 
so, do other location aware applications such as google maps have the same 
issue?

Original comment by necro...@gmail.com on 21 Jul 2010 at 12:02

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
After waiting an excessive amount of time in tram hunter I started maps and it 
detected my location in less than 10 seconds.  When back into tram hunter, 
still waiting.  I don't have 3G data (turned on), could it be waiting on the 
network and then only didplaying the closest tram stops after a timeout?  Will 
experiment some more...

Is it possible that aGPS is not working and when its a non-GPS fix I'm getting 
it via Wi-Fi (and would that make a difference to tram hunter)?  My phone is a 
UK phone.

I've tried to locate a diagnostic program so I'd know where the fixes etc are 
coming from.  Perhaps tram hunter could have some sort of progress/diag info 
when waiting on fix.

Original comment by dbar...@gmail.com on 22 Jul 2010 at 10:00

GoogleCodeExporter commented 9 years ago
I've now done a bit more testing and found "MyLocation" and "My GPS status 
free" and with these I can see that the issue is that a good signal doesn't 
mean that Android can always get a good network fix, for example if you are in 
a building and getting a good signal off a repeater.

The app like many others provides too little feedback which leaves it open to 
being blamed.  I have noticed that when you do know the location you'd display 
something like "+-75m" I'd like to suggest you put something there (in red or 
bold) about not having a fix and perhaps output "..." (dots) to show something 
is happening.

As for the application showing trams for the last fix, I've found that that 
rarely happens, it mostly goes back to my home address.

Original comment by dbar...@gmail.com on 27 Jul 2010 at 10:11