Exact coordinates from ios app - ios

I'm creating a tracking application and ios application is the front end to gather the coordinates. Issue is my ios application is not giving the exact path followed. Im using this code to gather coordinates
locationMgr.desiredAccuracy = kCLLocationAccuracyBestForNavigation
locationMgr.delegate = self
//locationMgr.allowDeferredLocationUpdatesUntilTraveled(1.0, timeout:100)
locationMgr.requestWhenInUseAuthorization()
locationMgr.pausesLocationUpdatesAutomatically=false
locationMgr.distanceFilter=1
locationMgr.startUpdatingLocation()
I'm using coordinates gathered upto 8th decimal point such as 34.98776555
but Out put is not straight one that I followed. Please help

GPS Positioning typically has an accuracy of 1-5 meters. There are additional factors that can reduce the accuracy further.
As per the excerpt from the following website : How Accurate is the GPS on my Smart Phone?
For any GPS to work the antennae needs a clear view of the sky. Users of smart phones will frequently be in “urban canyons” or indoors. This is where WiFi and cellular network positioning become necessary. Both of these methods are used by smart phones as indoor positioning systems. The phone will use a hybrid approach, using all three methods to locate you. These other two technologies aren’t nearly as accurate as A-GPS, but can still locate you sufficiently to find the closest vanilla latte!
Generally WiFi positioning is more accurate than cellular network
positioning. It uses wireless access points and measures the
intensity of the received signal from one or more networks to find the
position. Interestingly it doesn’t require your device to be WiFi
enabled to work.
Cellular network positioning triangulates your position based off of
nearby cell phone towers. Phone companies have precise locations for
their cell towers, which when combined with signal strength can be
used to approximate your location. Both of these techniques are
dependent on overlapping signals from either access points and
cellular towers. Therefore they’re more accurate in urban settings.
CLLocationManger has an attribute called horizontalAccuracy which you can use to ignore points if they aren't accurate enough as per your requirements.
public func locationManager(manager: CLLocationManager, didUpdateToLocation newLocation: CLLocation, fromLocation oldLocation: CLLocation){
print(newLocation.coordinate.latitude)
print(newLocation.coordinate.longitude)
print(newLocation.horizontalAccuracy)
}
A GPS point which is off by just 1-2 meters will cause that point to get plotted off the road. From my experience getting pinpoint accuracy will be difficult and there is nothing that can be done about it.

Related

Does altitude variance effects geofencing?

I need to implement a auto-check in feature for managing office attendance.Will accuracy of geofencing be effected if office is situated on 50th floor.ie Does altitude variance effects accuracy of geofencing?
The accuracy is not an issue (geofencing is based on lat/long coordinates, which are the same regardless of the floor). The issue is going to be GPS accuracy. Due to the fact that GPS is not able to penetrate walls, the GPS coordinates will nearly always show you outside of the building, not inside of it. Not to mention being able to identify which office room someone has entered.
If this is acceptable accuracy level for your project, then just GPS works. If you need to see that the person has actually entered the building or the specific office, you will need to utilize beacons.
(Disclosure: I work for Proximi.io, a technology-agnostic positioning platform)

didEnterRegion called with larger radius (iOS)

I want didEnterRegion to be called with much precision, but I wasn't able to do so. Here is what I have done: I used the best values of distanceFilter and desiredAccuracy (most precise GPS settings according to Apple) and have a destination CLCircularRegion (Subclass of CLRegion).
self.locationManager.distanceFilter = kCLLocationAccuracyBestForNavigation;
self.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
#property (nonatomic, strong) CLCircularRegion *Destination;
self.Destination = [[CLCircularRegion alloc] initWithCenter:CLLocationCoordinate2DMake(43.907691, -69.963158) radius:5 identifier:#"Destination"];
[self.locationManager startMonitoringForRegion:self.Destination];
The problem is when I am like 150m away from this destination, didEnterRegion gets called. Also around similar distance away didExitRegion gets called. I want didEnter and didExit region to be called when I am 5 m away, not 150m away, as I have specified with initiation of CLCircularRegion. Does anyone have a solution? Precision is what I need, and 150m instead of 5m is too inaccurate for me. Thanks ton -
(I used iPhone 4S to Test)
While in theory accuracies of 5m are possible with the current GPS+ technical gear, it may be that Apple prevents such accuracy for region monitoring for various reasons.
One is that they always want a good user experience and the 5m accuracy you want is within the accuracy range you will often get from the GPS readings. Thus leaving such a small region could also be on account of lower accuracy readings while the user is still within the region. Apple does cover up for such errors by setting thresholds for posting regionEnter or regionExit notifications. From Apple documentation:
When testing your region monitoring code in iOS Simulator or on a device, realize that region events may not happen immediately after a region boundary is crossed. To prevent spurious notifications, iOS doesn’t deliver region notifications until certain threshold conditions are met. Specifically, the user’s location must cross the region boundary, move away from the boundary by a minimum distance, and remain at that minimum distance for at least 20 seconds before the notifications are reported.
The specific threshold distances are determined by the hardware and the location technologies that are currently available. For example, if Wi-Fi is disabled, region monitoring is significantly less accurate. However, for testing purposes, you can assume that the minimum distance is approximately 200 meters
Nevertheless since you can ask for high accuracy readings Apple should also take that into account. The alternative might be - as you commented - to use didUpdateLocation: and determine if inside or outside the region. That way you could include a test for location accuracy and only accept an exit/entry when horizontal accuracy is good enough.

Location with iBeacon

I am using an iBeacon, and using triangulation and trilateration (or something similar), want to be able to locate an exact (or fairly accurate) distance between the iBeacon and user's device (in feet/metres/e.t.c). What is the best way to do this, and how would I do this?
I forgot to mention: I understand that it is possible to find proximity (i.e near, immediate, far, etc.), however as mentioned, ideally I am looking to find an accurate distance (maybe by combining RSSI, accuracy, and proximity values).
For this you should use RSSI (Received Signal Strength Indication) of an iBeacon. The signal strength determines how close or far it is from you. But the problem is that:
Every beacon's RSSI might differ distance, accuracy.
If beacon is behind the wall or any static obstacle the RSSI-Distance-Ratio will not work.
Therefore instead of Triangulation or Trilateration you should go for Fingerprinting. This will work better then rest of the techniques.
Place obstacles all around you.
Make reference points on your map.
Calibrate your app with that location i.e. Get the signal strengths from atleast 3 nearest iBeacons and save it against that reference points.
Do this for all other reference points.
(If you can) Do this twice or thrice and take average and store in database.
Now you have laid map of calibrated reference points. (This will handle all different RSSI-DIstance-Ratios of all the beacons)
Now whenever you are at any position compare it with the nearest point and you will get to know the closest location of your reference point.
If you are using google maps, the lat long they provide is upto six decimal place i.e. 0.11 meters which i think is preety much accurate in a room as well.
I guess this helps :)
Please mark this the right answer if it works.
In iOS the Core Location beacon information you get when you range a beacon includes both a "proximity" value (far/near/immediate) and an "accuracy" reading, which is actually approximate distance, in meters.
In order for the distance reading to be as accurate as possible, you should really calibrate your beacons. To do that, you put the beacon exactly 1 meter from the receiver and take a reading. The receiver gives you a "measured power" reading, which you then set on the transmitter. The measured power reading is used in calculating the distance reading.
Distance readings are very approximate, and are subject to interference from the surroundings.
The Apple sample app "AirLocate" shows working code for calibrating a beacon, and I believe it also displays

ios google maps accuracy

i have view that display user current location using google maps and route to his distention.
the problem: user location is out of the road most of the time, I can't put the app like this in the Appstore, it will get bad reviews.
I checked google sdk for IOS, is there any property for accuracy !?
like: self.googleMap.accuracy = bestForNavigation
are there any tweaks or properties to set that improve user location accuracy?
how maps apps on the Appstore display user location with so much accuracy like google app?
In the CoreLocationManager you can set the desiredAccuracy to kCLLocationAccuracyBestForNavigation. However, GPS is still never perfect, you may get anywhere from 5 to 100m accuracy from the GPS depending on signal quality, sky view (canyons, cities), etc.
Another source of error to watch out for, make sure your GPS data is in the same datum (ie: WGS-84) as the map and the road network data. Different datums can add small (or large) errors.
To compensate for inherent GPS and mapping error, most turn-by-turn navigation apps use what we call "snap to road". We compute what roads the user is near and IF the GPS location is within 30m (see note1) of the road AND the course (or heading, note2) is within +/- 25 degrees of the road direction, THEN we "snap" to the road. That means we change the location and heading of the displayed location dot so that it shows that the user is exactly on the road (compute the nearest point on the road from the GPS point) and heading along the road path (select the road heading that is closest). This requires detailed road geometry data including curves and some fun calculations but it works really well once you get it.
If they are further off the road or not aligned with the road heading then we show their actual GPS location. This works really well but it requires that you have the road network geometry available (or at least their route to destination geometry) so you can make these checks.
Note1: we select a tolerance based on the reported horizontalAccuracy from the CLLocation we get.
Note2: we blend the compass heading (corrected) and course (from GPS) to decide the users actual heading. Below about 8 kph we predominantly use compass heading, above that we mainly use GPS course (its more accurate). We also GPS course to determine compass error to correct it. This allows us to show accurate headings even when stopped at a light or at very slow parking lot speeds.
There are limits to GPS accuracy.
If an app has access to the underlying map data and there is an assumption that the location should be on a road then it could fudge the user's location. But what if I am parked beside the road or not in a vehicle.
Fro: gps.gov: The GPS signal in space will provide a "worst case" pseudorange accuracy of 7.8 meters at a 95% confidence level.
But it is possible for receivers to do better than this especially if they are stationary. In the stationary case location averaging can help substantially but the fact it is stationary would have to be known to the device. It is also possible for receivers to do much worse. So, 10 to 20 meters is probably a safe assumption.

How high is GeoPositionAccuracy.High?

When working with the Windows Phone Location API, I am trying to gauge distance between two points that are only say inches or feet away. That said, accuracy is very important.
What is the difference between GeoPositionAccuracy.Default and GeoPositionAccuracy.High? Is the difference related to the number of decimal values? If that is the case, how many decimal values are assigned for GeoPositionAccuracy.Default and GeoPositionAccuracy.High?
GeoPositionAccuracy is just used to tell Windows Phone whether you need an accurate position or not. You get to make that choice because a higher accuracy uses more battery, so it's better not using it if you're just trying to figure out in which town the user is currently located. GeoPositionAccuracy.Default probably doesn't even use the GPS, but alternative localization methods
For the actual accuracy of the position you get, you can check the HorizontalAccuracy property of the GeoCoordinate. It gives you the error margin in meters.
GeoPositionAccuracy.Default uses a combination of the following:
Assisted GPS (aka cell tower triangulation)
Wi-Fi Triangulation (aka IP lookup)
GeoPositionAccuracy.High uses the methods above, in addition to:
GPS
Assisted GPS is battery friendly & locks on the location fast since it uses the cell radio which is already on. I can be accurate to the city block or building level in urban areas, but accuracy degrades in rural areas where the density of cell towers decreases. It also works well inside buildings.
GPS is slower to acquire a satellite lock and consumes more battery power since the GPS radio must be turned on as needed. Once locked in, it's the most accurate positioning method within just a few feet. It's virtually useless inside buildings since you need line of sight with the sky. Dense urban areas like Manhattan can also cause GPS inaccuracies.
Wi-Fi / IP Lookup is the least accurate since the IP address of an Wi-Fi hotspot can sometimes be registered at a different address.
I don't believe it makes any guarantees on the accuracy, it just allocates more resources towards acquiring a more accurate position (by providing more power to GPS module for instance).

Resources