Skip to content

Instantly share code, notes, and snippets.

Paul Brittain paulbrittain

Block or report user

Report or block paulbrittain

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@paulbrittain
paulbrittain / haversine_distance.py
Last active Jan 25, 2018
Haversine great-circle distance computational formula in Python
View haversine_distance.py
from math import sin, cos, sqrt, radians, atan2
def calculate_distance_between(input_longitude1, input_latitude1, input_longitude2, input_latitude2):
earth_radius = 6371.0
input_longitude1 = radians(input_longitude1)
input_latitude1 = radians(input_latitude1)
input_longitude2 = radians(input_longitude2)
input_latitude2 = radians(input_latitude2)
You can’t perform that action at this time.