Hi, all. I am developing an application for Android that gets the latitude and longitude of where the person is standing at a certain point in time.
I wrote a test application. When I run the application, it appears to work fine, except the accuracy prints out 300 meters sometimes.
I go into Google Maps application and it has me within a few meters of my location on the map...It's pretty accuracte.
So my questions is, how is Google's coordinates so accurate when my application reports the reading being off by 300 meters?
Does Google massage the data some how to make it more accurate? Am I missing something in my code?
I need these readings to as accurate as possible. I also print the provider to the screen and it displays gps, so I believe I am not using the network (cell towers).
Here is how I am doing it.
First, I create a LocationManager : LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
Is it possible google maps is detecting your position using wifi and not your GPS?
Regards, Dave Brown
SCJP 6 - [url]http://www.dbws.net/[/url] - Check out Grails Forum
Joined: Feb 24, 2009
I turned WiFi off because I know that Google Maps can use SkyHook via the WiFi. I think I would also have to be logged onto a network in order for it to use SkyHook via WiFi. I still have the same issue with WiFI turned off.
I'm not certain how closely Android's GPS feature matches the JSR GPS spec, but the JSR version of GPS allows the client to select from multiple location service providers. And, by the way, it is Location Services, not GPS. GPS is a particular kind of location service.
The distinction is important, because with cell phones, one of the more popular location services is Trilateration. Which is a means of detecting position by triangulation one's position relative to cell phone towers. On the Sprint network at least, trilateration's accuracy is only guaranteed to - wait for it - 300 meters.
Why use trilateration instead of GPS? Some (mostly older devices) didn't have GPS hardware. Sprint and Verizon often disable the GPS hardware to prolong battery life. And sometimes, you just can't collect enough satellites to use GPS, especially indoors.
Obviously, trilateration has its own limits. If you're out of range of cell service, it won't work at all, although in crowded areas, it may actually be much more precise than 300 meters. It's just one of the options.
If I remember correctly, the Androd location services allow selecting for more/loss accurate location services, so if to-the-centimeter accuracy is critical, be sure you request the fine-grained location service. How fine the actual resolution will be can vary, but the most accurate source available will be used.
Oh yes, and you may have to explicitly select for true GPS on your phone. I think it's turned off by default on mine. As I said, GPS can suck down some power.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Feb 24, 2009
Thank you for your reply. I found that when I turned on the phone and started my app. when indoors and then walked outside, the accuracy stayed at about 300 meters. When I went outside and then opened my app., the accuracy got better, down to 3 meters. I didn't think that being inside would make such a difference. I expected some variation, just not that much.
Your response was educational as well. I knew about triangulation but I did not know about trilateration.
I had recently developed a Android GPS tracking program on the same lines as you did.
I am using Android Samung phone and when I turned on GPS along with Network, it seems to consider the network settings first over the GPS.
Network setttings will showed inaccurate position of about 100-150 meters.
When I disabled the network settings and kept the GPS on, it gave me the correct position.
Also GPS settings work accurately outside the house or in open sky area.
Oracle SOA Architect Certified Expert.
Oracle Certified Master, Java EE 5 Enterprise Architect certification
IBM Certified Rational Software Architect.
IBM Certified Service Oriented Architecture (SOA) - Associate.
IBM Websphere MQ 6.0 Certified - System Adminstrator
Sun Certified Web Component Developer for J2EE 5.0.
Sun Certified Java Programmer SE 5.0.