Assuming longitude1 is required, the following result was found.
= dist * 1.609344 } // kilometers if (unit=="N") { dist = dist * 0.8684 } // nautical Production code // v_Latitude1, v_Longitude1 are coords for origin // v_Latitude2, v_Longitude2 are coords for destination v_Latitude1 = v_Latitude1.toDecimal();...