I am trying to measure area from gps coordinates but fail to get the correct result (7200 square meters). I used the formula from this post but I get way too high number as result (should be in square meters). Here is my current work in jsfiddle. Any idea what is wrong?
Math.radians = function(degrees) {
return degrees * Math.PI / 180;
};
area = Math.radians(x2 - x1) * (2 + Math.sin(Math.radians(y1)) + Math.sin(Math.radians(y2))) + Math.radians(x3 - x2) * (2 + Math.sin(Math.radians(y2)) + Math.sin(Math.radians(y3))) + Math.radians(x4 - x3) * (2 + Math.sin(Math.radians(y3)) + Math.sin(Math.radians(y4))) + Math.radians(x5 - x4) * (2 + Math.sin(Math.radians(y4)) + Math.sin(Math.radians(y5)));
area = Math.abs(area * 6378137.0 * 6378137.0 / 2.0)
alert(area);