I am calculating the distance between two lat long coordinates using -(CLLocation)distanceFomLocation:(CLLocation) and Haversine formula. But its not giving the correct result.
I am using core location framework to find out the lat long of two posions which are 1 meter apart in actual but the above formula gives the distance some times 40m sometimes 30m and so on. I have set the desired accuracy is ten meters. I am using iPhone 4s device.
Just want to know that what is accuracy of method -(CLLocation)distanceFomLocation:(CLLocation) for calculating the distances? I have to calculate the distances whth in 10 m range.
The formula is correct, for 1m distance the acuarcy is under 1/1000 of milimeter. That what is wrong is your lat/lon position you got from the GPS device, which can deviate that 40m.
For 10m distance the formula used in either haversine or distanceFromLocation are perfectly accurate. It starts to get interesting when distances are some kilometer apart.
So don't worry. But yor main problem is to get such acurate positions, and that depends what you need it for.
Do you need distance meassure of the coordinates of ONE GPS device, (that works) or between differnet GPS devices (can be appart 30m for two device on same position, but usually 3-6m GPS accuracy when having good view to open sky.
Further make sure that you use desiredAccuracy BestForNavigation or Best.
Related
i am using a pair of DW1000 UWB sensors and am able to get accurate distance bw them.
how can i get rid of (z1-z2) term in the final distance..i.e if both sensors are fixed at (x1,y1)and (x2,y2 ) respectively , how do i ensure that the distance (reported ) states constant even if i move the tags up or down
You need to give the (z1-z2) information to the anchor to calculate the horizontal distance. Use Pythagoras' Theorem. If z1-z2 is unknown, you need more sensors.
I am trying to see if there is a plugin or Node library that will be able to estimate a lat/long based on an array of distances from known locations. Attached image shows three circles which are radius from known location. I would like to take this information and estimate a location from the combination of information. Originally I was thinking of just showing the intersect of the circles, but that does not cover cases where the circles do not intersect.
I have two Set of GPS Points recorded from High Precision GPS Receivers which travels from Point A to Point B . please see the Image attached.
Black Point is the GPS points of Vehicle 1 and its path... Blue Point is the GPS Points of Vehicle 2 and its path. Vehicle 2 should follow the same path as Vehicle 1 , But there exists some deviation in pratcical scenerios. So. I need to Caluculate how much deviation it has .
I am trying to find the lateral distance between the vehicle 1 and nearest vehicle 2 GPS Point.
What I did till now ?
*) Since vehicle 1 is ahead of vehicle 2 and , vehicle 2 reaches vehicle1 (approx) after some time (say buffer as 5 ~10 seconds )....
I am calculating the arc distance between Vehicle 1 GPS Point and a set of Vehicle 2 GPS Points (buffer) and finding the minimum of those Arc Distances.
*) By finding the Minimum of Arc Distance , I am finding the GPS Point which is nearest to the vehicle 1 GPS Point.. now , I am stuck at finding the Lateral Distance between these two GPS Points in an effecient manner.
Please let me know if u have any questions or comments on my procedure..
I assume both routes start from the same position. so i would do the following:
Resample each route to get a new set of points with a known sampling step from on another (You can interpolate the new points from the old see for example https://www.mathworks.com/matlabcentral/answers/278615-how-to-create-points-set-on-2d-polyline)
Once i have two sets of points that start from the same location and are in a constant sampling step just calculate the distance between each corresponding points.
I'm developing an iPhone app where the user chooses an image and then is allowed to draw on it (dots) that maybe stored on different zoomscales (he's allowed to zoom in and out).
I store the location of every point drawn in an array but when I calculate the distance I come to realize the result isn't correct if the points were stored on different zoomscales. Would someone kindly help me with this?
Probably you should store points in normalized unit.
Assuming that you are using UIScrollView for zooming, divide both x and y by current scrollView.zoomScale before storing. When calculating the distance, multiply the distance back by scrollView.zoomScale.
How accurate is the altitude measurement from a mobile phone's GPS? I've gathered that the lat/long can vary by hundreds of meters but is that same level of uncertainty present in the altitude values?
In particular I'm working with Windows Phone 7 but I'm sure that this question applies to other mobile devices. I expect that there are only a few GPS chip manufacturers and the same chip would be used by different phones.
This question deals with how it is calculated but it doesn't mention anything about accuracy or reliability.
I don't know specifically about the iPhone, but elevation is often much less accurate than X,Y information from a GPS. Here are some sources of information about this.
It requires fairly complicated math to understand fully, but no the altitude on ANY gps is not as accurate the lat/long position.
http://weather.gladstonefamily.net/gps_elevation.html
http://gpsinformation.net/main/altitude.htm
http://www.sawmillcreek.org/showthread.php?83752-Do-civilian-GPS-unts-do-accurate-altitude
quote from the third link - "The altitude error is much greater because it is a satellite based system. If you think about it, the best satellite positions for a perfect read are going to be evenly distributed in an imaginary sphere surrounding you. Unfortunately, since you are standing on the earth, that rules out half the sphere because you need line-of-sight to the satellite. As a practical matter, it even rules out a constellation with satellites close to the horizon. So, generally speaking, your fixes will be overhead--which means that the cumulative error is mainly in the vertical plane. So, I think the offhand estimate is vertical error = 1.5x horizontal error."
Vertical error is specified as 1.5 * horizontal error. You must also allow for local deviation between the geodetic model and the planetary surface because the geodetic oblate spheroid model is an approximation only even when local correction tables are in use.
Since the triangulation hands back a point in space, the same inaccuracies would apply to the Z axis like they do to X and Y.
In other words, it's no more and no less accurate than the accuracy of the LAT/LONG.