recently I checked location in galaxy tab by disabling GPS and wifi and the accuracy is around 50 to 65 meters(location is rural).
later I cleared the total cache memory of the maps app, and the device and when I checked the location under same scenario the accuracy is very bad it's around 1.2km to 2km.
-Now I activated the wifi and suddenly it came under 50meters, now when I disable it even then the location shown is around 60 meters accuracy.
Is there any way that we can find the approx location by only using mobile networks without using wifi and gps, as the device is gathering some info in to the cache and this helps when wifi and gps are disabled.
what I am asking is, can't the device use the mobile triangulation and get the accuracy around 50 meters than to depend on the cache of wifi and gps. where can we get this implementation source code of android.
PS: I want to disable wifi and gps because I want to mimic this functionality in hardware as adding wifi and gps modules is power hungry and costly.
In a large city, where the phone can receive a signal from several towers, then triangulation may well be fairly accurate. The only parameter that the phone can measure is signal strength, and from that infer a distance to each mast.
In a rural setting the phone may only have a signal from one mast. All that it can do then is to estimate the distance to the mast, place your position at the mast and calculate the accuracy based on that one signal strength.
Related
The app which i'm writing need to somehow detect if an android device is indoors or outdoors. My goal is to detect if the user left a certain building as soon as possible.
I tried to use the user location signals. I'm not initiating any GPS sampling since I don't want to waste too much battery power, so the only way to detect if a user left a building is to wait for him to be far enough from the place and then use location signals which were sampled by wifi or cell.
The problem is that it takes quite some time for me to detect that the user left the building.
I know that when a user is indoors, his GPS signal is weaker. Can I somehow use the GPS status to find out if the user is indoors or outdoors? Will it be wasteful as initiating a GPS location sample?
Thanks.
I don't think you can do what you want to do with the FusedLocationProvider as this uses WiFi and cell tower triangulation. You will need to use the LocationManager.
It is also difficult to detect if you're inside and as far as I know there is no definitive way of doing this. You can make informed guesses however.
In terms of detecting a "weak" GPS signal you have a few things you could check:
The number of satellites available to you. If a low number then you are either indoors or somewhere with poor satellite coverage.
The horizontal accuracy of a received GPS location. If this value is high it can be deemed as poor accuracy which could be because you're inside.
No location has been received for a period of time. This could be because you're inside.
Have you thought of doing other checks as well as GPS so if they're connected to WiFi it increases the likelihood of them being inside?
I am using Android Location class to retrieve location from device. It gives location and Accuracy in meters.
I am using Samsung Galaxy S3. Getting below location details:
When I turn on Sim network and GPS, I can location as accurate as of 8 meters.
Surprisingly when I turn on GPS only, I can get location accuracy of say 36 meters.
My question is location accuracy depends on what?Does it depend on a device(if its high quality device then good location accuracy) ?
Does it depend on county in which we are using device (depends on its phone or GPS network) ?Or it depends on some thing else ?Any inputs !!
In short it depends on BOTH
Your GPS give accurate results with help of Mobile Network and WIFI.
From Android official website "GPS, Cell-ID, and Wi-Fi can each provide a clue to users location. Determining which to use and trust is a matter of trade-offs in accuracy, speed, and battery-efficiency."
Does it depend on a device(if its high quality device then good location accuracy) ?
No, doesn't depend on device.
Does it depend on county in which we are using device (depends on its phone or GPS network) ?
Or it depends on some thing else ?
Sort of, if you have good reception and connected to nearby wifi, your accuracy will be close.
GPS accuracy depends on:
1) Availability of assistance. You should be connected to WiFi or cell network so that latest satellite orbit models can be downloaded to the phone.
2) Signal strength. A stronger signal means (usually) better accuracy. More satellites means (usually) better accuracy. You must have the orbit model (aka ephemeris) for a satellite to use it.
3) Direct signal path to satellite. Bouncing signals add length to the path and dilute your position accuracy. Hard walls, water towers, metalized glass windows, all bounce GPS signals. If the reflection is stronger than the true signal, you can have a problem.
4) Antenna and RF path of the GPS inside the device. manufacturers who make good antennas get better performance because it gives a stronger signal for every satellite. Antennas that are directional or have large nulls are not good if pointed in the wrong direction.
5) Frequency stability of the oscillator in the handset. The oscillator is the reference to measure time delays. Every GPS receiver has one. Oscillators should change frequency only slowly (under 1 or 2 parts per billion in any given second). Oscillators hate heating, they hate electrical noise on their power supply, and a few other things. This is something designed into a phone, you can't change it. Putting the oscillator next to a power amp or SD card controller is a bad idea because they get hot.
The best GPS accuracy is obtained with an outdoor device, connected to a network for assistance, in an open field with good view of the sky. You should be 50 meters or more away from any building, wall, or surface that can reflect a signal. Salt water can also reflect signals, fresh water usually does not.
So that's the answer on GPS but it doesn't answer your full question. It sounds like the additional setting also uses some other positioning technology, probably WiFi. Try turning off the WiFi and see what kind of accuracy you get at the same time in the same location. WiFi can be very accurate, especially if there are multiple WiFi APNs that your phone can hear.
Hi I am working on a project which requires fetching of user's current coordinates and I am fetching it in high accuracy mode.
Ever since I started testing out this application in my device I have noticed that my money is getting deducted from my balance I am not sure why is it happening.
I currently dont have a data pack and my mobile data is turned of in my device but I am connected to wifi. Even if some application is using internet for some purpose it should make use of the my wifi connection right?
Can anyone please explain me why is my balance getting deducted (if you have faced similar issue) ? Is it really because of the fetching of location in high accuracy mode ?
Thanks.
Edit
I get this dialog box frequently:
GPS coordinates on a android device (or any device for that matter) is received in 2 ways.
From a GPS hardware that connects to your GPS Satellites
From your network, via the GPS location of the tower to which your SIM card is connected to.
The GPS hardware connects to multiple satellites and approximates your location to a point. And this location is the most accurate you can get. It consumes a lot more battery and decipates a lot more heat on the devices, since a lot of current is needed to read from the GPS satellites. This does not use the network at all. If your SIM card cannot make phone calls/and/or/data even then this location can be received.
Your network GPS also does similar, but it takes GPS coordinates of the towers closeby (to which the SIM card is connected to, and then approximates the location of your device. This GPS location (in comparison with the GPS hardware) calculates a less accurate. This consumes GPRS/3G data bandwidth and you will be charged for this.
Both the hardware are completely independent.
Now, some smart ass developers in Google have used sensors like compass, rotation, movement to develop something called AGPS, which takes the GPS location from the GPS hardware, and then uses network and sensor information to ensure that your location is known without use of too much power, and there by lesser heat decipation. This is called AGPS.
I want to access my current location in my application in android. Initially I did that with WIFI and CELL TOWER in indoor. I used GPS to access locations at outdoor. The location accessed via GPS is accurate but via WIFI is far away from the actual spot. Can anyone help me regarding this issue.
The GPS system determines your position by connecting to and timing the responses from 4 different satellites. Due to this, it requires a clear view of the sky, and doesn't work indoors and underground. It also allows it to be very accurate.
On the other hand, WiFi positioning uses a table compiled by Google and other companies and organizations that has anonymously collected data about wifi hotspots and GPS positions of devices connected to those. This is much less accurate than GPS.
Cell network positioning uses the Triangulation technique, which uses one or more cell phone towers to determine the approximate location of the device. This method is explained very well here.
Location is a crapshoot.
Generally, GPS is accurate enough to get you to right address - and even that can't be counted on. Wifi to the right neighborhood, and cell tower the right zip code (or neighboring one). If you need to locate people within specific buildings, use one of the "indoor positioning systems". There are a couple available for android but you need to prepare the buildings.
There is a lot of nonsense about triangulation posted in this thread.
Old time surveyors and radio direction finders used triangulation. GPS, cell tower, and wifi do not use triangulation; they use Trilateration (or worse mere proximity). Triangulation is the determination of position by the measurement of angles (minimum of not three but two angle measurements and one baseline distance make a triangle). Trilateration or multilateration is the determination of position by measurement of distance which in this case is derived from time of travel (GPS, some cell network based location systems) or received signal strength (cell tower, wifi). And often you don't have at least three towers or routers to properly trilaterate off of. You can get some position data from two towers but it has more ambiguity as it doesn't know which side of the line between the two towers you are on. These two alternative locations can potentially be almost as far apart as the cell towers themselves. And if you only have one, then you can only narrow the position down to the working area around the tower (or one or two sectors of that radius based on which of the three antenna arrays sees the cell phone).
Cell towers may be as close as 1/4 mile in urban areas, 1-2 miles in suburban, and as much as 22 miles apart (GSM timing limit) in rural areas (particularly when located on mountain tops). So the nearest cell tower might be dead on accurate if you happen to be standing at the base of the tower but in practice it is likely to be off by 1/8mile to 22miles. Yet a woman was falsely convicted of murder and incarcerated because this method ["pinpointed"][1] her location - give or take 22 miles.
If we have several cell towers in range we could trilaterate the position but the accuracy will be limited by the crudeness of the signal strength based interpolation and the very long baseline between towers. Is the signal weaker because of more distance or is it weaker because it had to go through walls, trees, and shrubs and had to bend around buildings, trees, and shrubs? Was the signal reflected off other objects? Or because the transmit signal strength was lower to start with?
For WiFi, the routers are frequently located at each house and business. So they may be 50 feet from one another. And there is a very good chance that you are located very close to the wifi you are using or nearest. WiFi location may not work at all in many areas because the buildings are so spread out.
And WiFi and cell tower based location depend on having a database of tower and wifi router positions which is often incomplete, approximate, and sometimes wildly inaccurate (consider what happens when you buy a wifi router at goodwill and leave the SSID the same or move a router). Google gets this data by driving streetview vans around collecting data and by grabbing data from user's phone cellular radios and GPS.
[Skyhook wifi location][2] accuracy estimates: 1 Wifi: 700 ft, 3-4Wifi: 150ft, dense urban, more wifi: 50ft. Google
GPS has much larger distances between satellites and users compared to wifi and cell based systems but is a much more sophisticated system engineered from the ground up to be a locator system and using sophisticated timing measurements. It works almost anywhere on earth but can have problems with heavy tree canopy, dense tall buildings (skyscrapers), or being inside buildings. And with inferior devices that don't have a GPS chip. Or with the GPS chip being turned off because it consumes significant amounts of battery power. Most devices today have wifi even if they don't have GPS or Cellular.
In approximate order from worst to best (may vary depending on location):
nearest cell tower - off by up to 22miles but often within a mile.
This is the data the government can usually get from cell provider records.
cell tower trilateration (signal strength) done at tower. Rare.
The government/cell company can do this if they know they know in
advance that they need to but can't do it retroactively.
cell tower trilateration (signal strength) done at phone.
The phone has a list of "neighbor cells" and their signal strength.
Google could use this.
Cell tower trilateration using network based timing.
Strongest wifi
Wifi trilateration by signal strength done at phone.
GNSS (GPS (US), GLONASS (Russia), Galileo or Beidou/COMPASS (China), IRNSS (India), QZSS (Japan)). Accuracy of around 50ft
Differential GNSS (A system such as WAAS is used to correct) Accuracy around 10ft.
Emerging in-building location systems (using wifi routers or bluetooth low energy beacons with exact positions known and calibration data collected inside the building or potentially time of arrival based systems).
Survey quality GNSS - not found in phones. Accuracy around 3ft.
Accuracy of each technique can vary a lot and rather than being accurate to a stated distance, it is a probabilistic distribution.
For one dedicated outdoor (trail) GPS receiver I own combined with an external antenna, someone [measured][3] that 10% of the time, the accuracy was about 1m, 50% of the time the accuracy was about 2.9m, 95% of the time the accuracy was within 6.9m, and 99% of the time it was within 10.1m. And 1% of the time, it is just embarassing. So most of the time, it can locate you to about the size of a suburban lot. And on average it is about 10ft. A cell phone might use a newer chip but it also has a much lousier antenna.
Also, within a building you can use NFC tags, QR codes, 2D barcodes, and bluetooth beacons to designate specific locations such as rooms, workstations, businesses, departments, check out lines, etc.
[1]: https://www.techdirt.com/articles/20140908/04435128452/turns-out-cell-phone-location-data-is-not-even-close-to-accurate-everyone-falls-it.shtml Turns out cell phone location data is not even close to accurate
[2]: Howardforums thread 1383415
[3]: http://www.leb.esalq.usp.br/disciplinas/Molin/leb447/Arquivos/GNSS/ArtigoAcuraciaGPSsemAutor.pdf GPS HORIZONTAL POSITION ACCURACY
The Wi-Fi and cell tower combine to give you what is called COARSE accuracy in Android. By default this is stated as an inaccurate result and is only approximation of your location. This method gives a faster result and uses less power, and therefore gives an approximate result.
The GPS result is called FINE accuracy in Android, naturally because its result is finer and more correct when you use the maps. This comes with the fall back of taking a longer time to calculate, as well as using more battery power.
I would suggest you use the getBestProvider method to determine which provider is the best at any given time and it will give you the most possible accurate location. Unfortunately if it uses any of the coarse accuracy sources, you will have to bear with some approximately inaccurate results
GPS uses satellite triangulation method.
WIFI/CELL just uses tower location, and assumes you are somewhere around in its area/range.
I'm working in android (developing application for mobile and tablets). I am using android version is 2.2.
In my application, I want to capture the longtitude,latitude.
My suprevisor is said to me capture the locations using GPS,AGPS,LBS
I'm new to android .I does not know GPS,AGPS,LBS.
Please send me the details, what are the difference,advantages,disadvantages of these 3?
Don't compare LBS with GPS and AGPS. LBS stands for Location based services . It's a service done with the help of GPS/AGPS . For example 'Requesting the nearest business or service, such as an ATM or restaurant' is a service required by a user. There are many applications available for to provide above service. Those application will use either GPS/AGPS to find the location and service to user based on the location fetched.
So simply any application which use location to serve users are considered as LBS.
Following is the difference between GPS and AGPS
The difference between GPS and A-GPS is actually pretty straightforward. A GPS phone comes with a built-in GPS chip. GPS, short for Global Positioning System, is typically used to determine the location, speed, direction and time of the device. So, for example, in the case of the Mobile, when GPS is activated on the unit, the system would be able to triangulate the position of the receiver when three or more satellites are connected. And since it is able to calculate speed and direction, GPS is also commonly used as a navigation device while driving.
A-GPS (Assisted-GPS), on the other hand, was developed to enhance the performance of GPS. This is especially useful in environments where the GPS chip may have difficulty in getting a satellite signal, such as an urban canyon, or places where there is too much overhead obstruction. What A-GPS does is it leverages on an intermediary called an Assistant Server which provides information on cell ID or other data to help the device identify the right satellites to connect to. This shortens the time needed for a location lock although certain A-GPS solutions require an active connection to a cell phone network.
Pros and Cons of GPS and AGPS:
The realiability and Accuracy is high in the GPS and it is low in AGPS.
The location captured by AGPS is not as accurate as GPS.
The location capturing via GPS is time consuming and power (Battery) consuming, etc.
Hope it helps. For more details on A-GPS
GPS - Global positioning system -> get your location via satellites
AGPS - Assisted GPS -> get your location via satellites and network providers
LBS - Location Based Services -> doesn't have much to do with getting your location.
Basically, in Android you can get your location using following providers:
Network: get your location based on your wifi connection. fairly fast, but not so accurate
GPS: get your location based on GPS receiver. fairly slow, but quite accurate
so you have a trade-off: either to use Network provider and get your results fast, or to use GPS provider and get more accurate data.
Read more here:
http://developer.android.com/guide/topics/location/strategies.html
LBS - Location Based Services
GPS - Global Positioning System
AGPS - Assisted Global Positioning System
LBS
As abbas.aniefa said, We can't say differences of LBS over GPS and AGPS. It is the service which uses GPS/AGPS to find location. Android provides a number of building blocks for location based services.
GPS
GPS, the Global Positioning System run by the United States Military.
This provider determines location using satellites.
Depending on conditions, this provider may take a while to return a location fix.
Advantages
It will give our location accurately,
It will work fine in out-door locations.
Disadvantages
It may be very very slow in in-door locations,
It will quickly drain battery.
It will be slower than network provider.
A-GPS
A-GPS - Assited GPS. Normal GPS can take a long time to get a position fix. For this reason most cell phone companies have the GPS in the phone turned off except for emergency calls and for services they sell you (such as directions).
A-GPS will come under network location provider category because it uses GPS chip on device, as well as assistance from the network (cellular network) to provide a fast initial fix.
Advantages
It will give our location very accurately in-door location itself,
Drainage of battery will be saved,
It will be faster than GPS Provider.
Disadvantage
We can not use it with GPS alone. It will depend on network connection.
Over all Differences of GPS and A-GPS
GPS
Uses GPS chip on the device,
Line of sight to the satellites,
Need about 7 to get a fix,
Takes a long time to get a fix,
Doesn’t work around tall buildings.
A-GPS
Uses GPS chip on device, as well as assistance from the network (cellular network) to provide a fast initial fix,
Very low power consumption,
Very accurate,
Works without any line of sight to the sky,
Depends on carrier and phone supporting this (even if phone supports it, and network does not then this does not work).
I think GPS is done/processed via satellite communication without any network service provider.
The AGPS is done/processed via the network (which is provided by service provider such as Airtel,Vodafone,etc).We should pay for service provider for usage of network.
The LBS is processed through the AGPS.
I dont know whether my points are correct or not.Im heard from others and put it.
All are welcome to give their suggestions,ideas,etc.