o
    6k~i^  ã                   @   s(   d dl mZmZmZmZmZ dd„ ZdS )é    )ÚradiansÚcosÚsinÚasinÚsqrtc           	      C   sv   t t| |||gƒ\} }}}||  }|| }t|d ƒd t| ƒt|ƒ t|d ƒd   }dtt|ƒƒ }d}|| S )z“
    Calculate the great circle distance between two points
    on the earth (specified in decimal degrees)
    Returns distance in kilometers
    é   iã  )Úmapr   r   r   r   r   )	Úlat1Úlon1Úlat2Úlon2ÚdlatÚdlonÚaÚcÚR© r   ú1/var/www/newdalilibackend/backend/places/utils.pyÚcalculate_distance   s   0r   N)Úmathr   r   r   r   r   r   r   r   r   r   Ú<module>   s    