Guest User

Untitled

a guest
Apr 21st, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. $A = sin((1-$fraction)*$d)/sin($d);
  2. $B = sin($fraction*$d)/sin($d);
  3. $x = $A*cos($lat1)*cos($lon1) + $B*cos($lat2)*cos($lon2);
  4. $y = $A*cos($lat1)*sin($lon1) + $B*cos($lat2)*sin($lon2);
  5. $z = $A*sin($lat1);
  6. $lat = atan2($z,sqrt(pow($x,2)+pow($y,2)));
  7. $lon = atan2($y,$x);
  8.  
  9. $lat1 = 40.712775
  10. $lon1 = -74.005973
  11. $lat2 = 51.507351
  12. $lon2 = 0.127758
  13. $d = 5570226.620092113
  14. $fraction = .25
  15.  
  16. $lat = -0.11849150286153
  17. $lon = 1.0514624708325
Add Comment
Please, Sign In to add comment