public double distanceTo(Location to) { return 6378 * (Math.PI/2 - Math.asin( Math.sin(to.latitude) * Math.sin(latitude) + Math.cos(to.longitude - longitude) * Math.cos(to.latitude) * Math.cos(latitude))); }