Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bandVals = "CDEFGHJKLMNPQRSTUVWXX"
- lon = 31.96212
- lat = -103.004715
- zone = int(lat + 186.0) / 6
- if (lon >= 84.0):
- band = 'Y' if (lat < 0.0) else 'Z'
- elif (lon <= -80.0):
- band = 'A' if (lat < 0.0) else 'B'
- else:
- band = bandVals[int(lon + 80.0) / 8]
- print '{:02d}{:s}'.format(zone,band)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement