I found the following answer on Stackoverflow.
From what I understand, this is not the proper way to do it. The math is linear, however, the coordinates are mapped to a spherical surface. So what is the proper way to do it?
I have a function that calculates a midpoint, how can I alter it to accept a percentage as a parameter. In other words, find a midpoint that is between point 1 and 2 and is a percentage away from point 1...
middle_point(lat1, long1, lat2, long2) {
// Longitude difference.
var d_long = (long2 - long1) * Math.PI / 180;
// Convert to radians.
lat1 = lat1 * Math.PI / 180;
lat2 = lat2 * Math.PI / 180;
long1 = long1 * Math.PI / 180;
var b_x = Math.cos(lat2) * Math.cos(d_long);
var b_y = Math.cos(lat2) * Math.sin(d_long);
var lat3 = Math.atan2(Math.sin(lat1) + Math.sin(lat2), Math.sqrt((Math.cos(lat1) + b_x) * (Math.cos(lat1) + b_x) + b_y * b_y));
var long3 = long1 + Math.atan2(b_y, Math.cos(lat1) + b_x);
// Return result.
return [long3 * 180/Math.PI, lat3 * 180/Math.PI];
}