Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $A = sin((1-$fraction)*$d)/sin($d);
- $B = sin($fraction*$d)/sin($d);
- $x = $A*cos($lat1)*cos($lon1) + $B*cos($lat2)*cos($lon2);
- $y = $A*cos($lat1)*sin($lon1) + $B*cos($lat2)*sin($lon2);
- $z = $A*sin($lat1);
- $lat = atan2($z,sqrt(pow($x,2)+pow($y,2)));
- $lon = atan2($y,$x);
- $lat1 = 40.712775
- $lon1 = -74.005973
- $lat2 = 51.507351
- $lon2 = 0.127758
- $d = 5570226.620092113
- $fraction = .25
- $lat = -0.11849150286153
- $lon = 1.0514624708325
Add Comment
Please, Sign In to add comment