jeudi 26 février 2015

Calculate an intersection point of multiple spheres on the surface of earth


The question i am going to ask is very much similar to this question-

How to calculate the intersection of 2 Circles?

But the problem here is, the radius of the spheres are too small (within 8 meter). I have used the Newton-Raphson method with Jackobian matrix to calculate a point which is exist in the intersection area of three spheres.

I have the (lat,long) and a radius for three spheres and may be more. But every time I getting a matrix which is not invertible. But if the radius is >1 KM then It works fine. To apply NR method I've first convert the lat,long to x,y,z by this



lat = toRadians(latitude);
lon = toRadians(longitude);
x = earthRadius * cos(lat) * cos(lon);
y= earthRadius * cos(lat) * sin(lon);
z = earthRadius * sin(lat);


and used this as a center of a sphere and use r/1000 as radius (converted to KM) of that sphere. Algorithm starts with an initial point which i have considered the centroid. I guess it is for the Bad Starting Point. The radius is calculated form the signal strength of the different wi-fi access points(AP). The number of spheres are dependent on how many APs are available. Any advice would be helpful for me.





Aucun commentaire:

Enregistrer un commentaire