Can be explained mathematically...
Hope this helps you...
----------------
LatLon.midPoint = function(lat1, lon1, lat2, lon2) {
lat1 = lat1.toRad();
lat2 = lat2.toRad();
var dLon = (lon2-lon1).toRad();
var Bx = Math.cos(lat2) * Math.cos(dLon);
var By = Math.cos(lat2) * Math.sin(dLon);
lat3 = Math.atan2(Math.sin(lat1)+Math.sin(lat2),
Math.sqrt((Math.cos(lat1)+Bx)*(Math.cos(lat1)+Bx) + By*By ) );
lon3 = lon1.toRad() + Math.atan2(By, Math.cos(lat1) + Bx);
if (isNaN(lat3) || isNaN(lon3)) return null;
return new LatLon(lat3.toDeg(), lon3.toDeg());
}
/*
* calculate destination point given start point, initial bearing (deg) and distance (km)
* see
http://williams.best.vwh.net/avform.htm#LL
*/
LatLon.prototype.destPoint = function(brng, d) {
var R = 6371; // earth's mean radius in km
var lat1 = this.lat.toRad(), lon1 = this.lon.toRad();
brng = brng.toRad();
var lat2 = Math.asin( Math.sin(lat1)*Math.cos(d/R) +
Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng) );
var lon2 = lon1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),
Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));
lon2 = (lon2+Math.PI)%(2*Math.PI) - Math.PI; // normalise to -180...+180