import utm
import track_run
import numpy as np
# lat = 25.7998911821
# lon = 125.727539062
# print lat, lon
# (ulat, ulon, a, b) = utm.from_latlon(lat, lon)
# print ulat, ulon, a, b

# print utm.to_latlon(ulat, ulon, a, b)

# arr = np.array([5, 4, 3, 2, 1, 6, 7, 9, 12, -1, 0])
# arr = [5, 4, 3, 2, 1, 6, 7, 9, 12, -1, 0]
# idx = np.argpartition(arr, 4)
# print (arr[idx[:4]])

#idw
# def idw(values, ds):
# 	denominator = 0.
# 	numerator = 0.
# 	for i in range(len(values)):
# 		d = float(ds[i])
# 		v = float(values[i])
# 		denominator = denominator + (1. / d**2)
# 		numerator = numerator + (v / d**2)
# 	return numerator/denominator

# print idw([12, 10, 10], [350, 750, 850])

# print '++++++'
# track_run.cal_trajectory(25.799891182088334, 125.7275390625, 'forward', 'euler', 'roms', 0, 72, '', 1, 0.16, True, 'idwutm')
track_run.cal_trajectory(25.799891182088334, 125.7275390625, 'forward', 'rk4', 'roms', 0, 72, '', 1, 0.16, True, 'idwutm')