question: public double linearDistance ( Location location ) { if ( location == null ) { throw new IllegalArgumentException ( Logger . logMessage ( Logger . ERROR , "Location" , "linearDistance" , "missingLocation" ) ) ; } double lat1 = Math . toRadians ( this . latitude ) ; double lon1 = Math . toRadians ( this . longitude ) ; double lat2 = Math . toRadians ( location . latitude ) ; double lon2 = Math . toRadians ( location . longitude ) ; if ( lat1 == lat2 && lon1 == lon2 ) { return 0 ; } double dLat = lat2 - lat1 ; double dLon = lon2 - lon1 ; if ( Math . abs ( dLon ) > Math . PI ) { dLon = dLon > 0 ? - ( 2 * Math . PI - dLon ) : ( 2 * Math . PI + dLon ) ; } double distanceRadians = Math . sqrt ( dLat * dLat + dLon * dLon ) ; return Double . isNaN ( distanceRadians ) ? 0 : distanceRadians ; }
target:  Computes the angular distance of the linear path between this location and a specified location. In radians, this angle is the arc length of the segment between the two locations. To compute a distance in meters from this value, multiply the return value by the radius of the globe. This function uses a flat-earth approximation proximal to this location.