Skip to content

vincenty.py

Corey Koval edited this page Jul 12, 2020 · 2 revisions

vincenty.py

Vincenty's direct and inverse formulas for computing accurate distances and bearings on an ellipsoid (earth).

def get_heading(coord1, coord2)

Calculates the heading of coord2 from coord1. Coord1 and 2 are both tuples containing the latitude and longitude of the points. Returns a float in degrees.

def inverse(coord1,coord2)

Vincenty's Inverse Formula to computer an accurate distance between two points. Coord1 and 2 are both tuples containing the latitude and longitude of the points. Returns a tuple of floats in meters and heading in degrees.

def direct(phi1, lembda1, alpha12, s)

Computes the latitude and longitude of a point at a give distance and heading.

  • phi1
    • float, latitude of the start point, decimal degrees
  • lembda1
    • float, longitude of the start point, decimal degrees
  • alpha12
    • float, heading, decimal degrees
  • s
    • float, Distance to endpoint, meters
Clone this wiki locally