# GPS Distance Calculation

/During a recent project I needed to calculate the distance between two GPS coordinates. After a little research I found tons of people that have done this before and most(well the correct ones) are baseed on the Haversine formula. I wanted to share my implementation just to help people get to the answer quickly with-out having to analyze the trig.

A little helper I will be calling.

var toRad = function(deg) { return deg * Math.PI / 180; }

The meat of the work…