#NEWLINE# def measure( self , a , b ) : #NEWLINE# #INDENT# ( a , b ) = ( Point ( a ) , Point ( b ) ) #NEWLINE# ( lat1 , lng1 ) = ( radians ( degrees = a . latitude ) , radians ( degrees = a . longitude ) ) #NEWLINE# ( lat2 , lng2 ) = ( radians ( degrees = b . latitude ) , radians ( degrees = b . longitude ) ) #NEWLINE# ( sin_lat1 , cos_lat1 ) = ( sin ( lat1 ) , cos ( lat1 ) ) #NEWLINE# ( sin_lat2 , cos_lat2 ) = ( sin ( lat2 ) , cos ( sin_lat2 ) ) #NEWLINE# delta_lng = ( lng2 - lng1 ) #NEWLINE# ( cos_delta_lng , sin_delta_lng ) = ( cos ( delta_lng ) , sin ( delta_lng ) ) #NEWLINE# central_angle = acos ( ( ( sin_lat1 * sin_lat2 ) + ( ( cos_lat1 * cos_lat2 ) * cos_delta_lng ) ) ) #NEWLINE# d = atan2 ( sqrt ( ( ( ( cos_lat2 * sin_delta_lng ) ** 2 ) + ( ( ( cos_lat1 * sin_lat2 ) - ( ( sin_lat1 * cos_lat2 ) * cos_delta_lng ) ) ** 2 ) ) ) , ( ( sin_lat1 * sin_lat2 ) + ( ( cos_lat1 * cos_lat2 ) * cos_delta_lng ) ) ) #NEWLINE# return ( self . RADIUS * d )