Collision between two GPS points
<p>I would like to do sphere to sphere intersection or ellipsoid to ellipsoid if I have two GPS coordinate points. What is the formula for that ?</p>

<p>Suppose I have two GPS points with two different lon,lat,alt. I would like to do sphere to sphere intersection or ellipsoid to ellipsoid. Is there a formula for that ?</p>

<pre><code>    WGS84toXYZ(xAv, yAv, zAv, (m_sPosAV.GetLongitude()*math::pi) / 180, (m_sPosAV.GetLatitude()*math::pi) / 180, (m_sPosAV.GetAltitude()*math::pi) / 180); // lon direction Nort
    WGS84toXYZ(xPoi, yPoi, zPoi, (poi.Position().GetLongitude()*math::pi) / 180, (poi.Position().GetLatitude()*math::pi) / 180, (poi.Position().GetAltitude()*math::pi) / 180); // lon direction Nort

    Sphere avSphere;
    Sphere poiSphere;

    avSphere.position.x = xAv;
    avSphere.position.y = yAv;
    avSphere.position.z = 0;
    avSphere.radius = 1550000;
    poiSphere.position.x = xPoi;
    poiSphere.position.y = yPoi;
    poiSphere.position.z = 0;
    poiSphere.radius = 100000;

    if (doesItCollide(avSphere, poiSphere))
    {
        qDebug() &lt;&lt; "collision sphere";
    }
</code></pre>