return locationA.distanceTo(locationB); } public void SetCopterLocation(LatLng copterPositionLatLng, float head, float alt) { if (onLocationChangedListener != null) { Location copterLocation = new Location("CustomCopterLocation"); copterLocation.setLatitude(copterPositionLatLng.latitude); copterLocation.setLongitude(copterPositionLatLng.longitude); copterLocation.setBearing(head); copterLocation.setAccuracy(2); copterLocation.setAltitude(alt); onLocationChangedListener.onLocationChanged(copterLocation); } } static double FullCircleDegrees = 360d; static double HalfCircleDegrees = FullCircleDegrees / 2d; static double DegreesToRadians = Math.PI / HalfCircleDegrees; static double RadiansToDegrees = 1 / DegreesToRadians;