static public GeoPoint trilaterate(GeoPoint c1, double r1, GeoPoint c2, double r2, GeoPoint c3, double r3){
        
        if (r1 < 0 || r2 < 0 || r3 < 0)
            return null;
        
        // convert geo points to cartesian
        Projection proj = GeoProjections.newSimpleProjection((c1.getLon() + c2.getLon() + c3.getLon()) / 3d);
        Point cc1 = proj.convertGeoToPoint(c1);
        Point cc2 = proj.convertGeoToPoint(c2);
        Point cc3 = proj.convertGeoToPoint(c3);
        
        Point[] pts =  find3CirclesIntersections(cc1, r1, cc2, r2, cc3, r3);
        if (pts == null)
            return null;
        
        // adjust distances
        r1 = r1 * 2d - geoDistance(c1, proj.convertPointToGeo(pts[0]));
        r2 = r2 * 2d - geoDistance(c2, proj.convertPointToGeo(pts[1]));
        r3 = r3 * 2d - geoDistance(c3, proj.convertPointToGeo(pts[2]));
        pts = find3CirclesIntersections(cc1, r1, cc2, r2, cc3, r3);
        if (pts == null)
            return null;
        
        Point p = new Point((pts[0].getX() + pts[1].getX() + pts[2].getX()) / 3d, (pts[0].getY() + pts[1].getY() + pts[2].getY()) / 3d);
        double accuracy = Math.sqrt((distance(pts[0], p) + distance(pts[1], p) + distance(pts[2], p)) / 3d);
        return proj.convertPointToGeo(new Point(p.getX(), p.getY(), accuracy));
        
    }