#!/usr/bin/env python '''Calculate convergence angle from UTM coordinates in degrees Requires `pip install docopt numpy utm km3astro` Usage: get_convergence_angle.py Arguments: easting UTM Easting of the site northing UTM Northing of the site zone UTM zone letter UTM letter ''' from docopt import docopt from km3astro.coord import convergence_angle import utm import numpy args = docopt(__doc__, version='0.1') easting = args[''] northing = args[''] zone = args[''] letter = args[''] latitude, longitude = utm.to_latlon(float(easting), float(northing), int(zone), letter) conv_angle = convergence_angle(latitude/180.*numpy.pi,longitude/180.*numpy.pi)*180./numpy.pi print("lat, long", latitude, longitude) print("convergence angle",conv_angle)