Skip to content

Instantly share code, notes, and snippets.

@jtornero
jtornero / vincenty
Created September 16, 2015 06:41
Python implementation of Vincenty's direct formula
def vinc_pt(f, a, phi1, lembda1, alpha12, s ) :
import math
"""
Returns the lat and long of projected point and reverse azimuth
given a reference point and a distance and azimuth to project.
lats, longs and azimuths are passed in decimal degrees
Returns ( phi2, lambda2, alpha21 ) as a tuple
Parameters:
===========
f: flattening of the ellipsoid