Advertisement
Guest User

Untitled

a guest
Feb 5th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. from PIL import Image
  2.  
  3. im = Image.open ( "grid.png" )
  4.  
  5. pix = im.load ()
  6.    
  7. lat = -23.108
  8. lon = 158.236
  9.  
  10. cl0 = 37
  11. ln0 = 24
  12.  
  13. len_cl = 23 / 15
  14. len_ln = 29 / 15
  15.  
  16. lat = 90 - int ( lat )
  17. lon = int ( lon ) + 180
  18.    
  19. lon = int ( cl0 + len_cl * lon )
  20. lat = int ( ln0 + len_ln * lat )
  21.  
  22. print ( lon, lat )
  23.    
  24. for i in range ( -2, 3 ) :
  25.     for j in range ( -2, 3 ) :
  26.         pix [ lon + i, lat + j ] = 255, 0, 0
  27.        
  28. im.save ( "iss_position.png" )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement