Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. double angle = 45.0;
  2. double fromCenterLat = 49.9983451;
  3. double fromCenterLng = 36.2399642;
  4. double earthBigR = 6378.1;
  5. double earthSmallR = 6356.8;
  6.  
  7.  
  8. double V = 5;
  9. double t = 1;
  10.  
  11.  
  12. double newLat = fromCenterLat * (V * t * Math.Cos(angle)) * 360 / 2 * Math.PI * earthBigR;//X
  13. double newLng = fromCenterLng * (V * t * Math.Sin(angle)) * 180 / 2 * Math.PI * earthSmallR; //Y
  14.  
  15.  
  16.  
  17. return new PointLatLng((newLat * 2 * Math.PI * earthBigR) / 360,
  18. (newLng * 2 * Math.PI * earthSmallR) / 180);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement