python - Longitude and Latitude formula complimenting it -


from math import radians, cos, sin, asin, sqrt def haversine(lon1, lat1, lon2, lat2):       lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2])      dlon = lon2 - lon1      dlat = lat2 - lat1      = sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlon/2)**2     c = 2 * asin(sqrt(a))      km = 6367 * c     return km home = input('please enter airport wish fly using given names eg bgbw') if row[3] or row[7] == home:     print(row[6] , row[7]) 

*i got formula here unsure of how implement it, when print row 6 , row 7 prints longitude , latitude, maths not strong point have never seen formula before think struggling *


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -