# Overview

## Visual Units Tools

This is/will be a collection of tools developed at Visual Units (www.visualunits.se) and released as open source under the MIT license.

### distance

A Python implementaion (optionally using a C library for speed) for computing distances on the globe using the WGS84 ellipsoid. It is a direct translation of Chris Veness' implementation of Vincenty inverse formula (in Javascript) which you can find at http://www.movable-type.co.uk/scripts/latlong-vincenty.html.

Usage:

>> import distance
>> distance.distance(lat1, lon1, lat2, lon2)
returns distance in meters as a floating point number


If distance.c is compiled into cDistance.so and can be found for loading, it will be used instead of the Python implementation. To compile the c file, you can, for example, use:

gcc -fPIC -shared -o cDistance.so distance.c