Ejemplo n.º 1
0
F = np.load('point_s1_07-14.npz')
point_pos = F['pos']
point_s1 = 3600*F['s1']
point_time = F['time']
F.close()

ground = ground2
ross_lon = np.mean([-106.040772,-106.040763])
ross_lat = np.mean([37.780315,37.780312])
schmale_lon = np.mean([-106.0422978,-106.0422984])
schmale_lat = np.mean([37.78155488	,37.7815583])
#(ross, schmale)
paired_flights = [(4,4),(5,5)]

ground_m = f.lonlat2m(proj_center_lon,proj_center_lat,ground[0],ground[1])
ross_pos_m = f.lonlat2m(proj_center_lon,proj_center_lat,ross_lon,ross_lat)
schmale_pos_m = f.lonlat2m(proj_center_lon,proj_center_lat,schmale_lon,schmale_lat)
dx = ross_pos_m[0] - schmale_pos_m[0]
dy = schmale_pos_m[1] - ross_pos_m[1]

s1=[]
plt_sec=[]
for i, pair in enumerate(paired_flights):
    plt_sec_temp = []
    s1_temp = []
    
    ross_data = pd.read_csv('Ross{:d}_DroneMetData.txt'.format(pair[0]), delim_whitespace=True,header=1,names=['date','time','wind_speed','wind_dir','temp'])
    seconds = []
    for t in range(ross_data.shape[0]):
        hrs_in_sec = int(ross_data['time'][t][0:2])*3600
lon = np.mean(schmale_lon + ross_lon + [ground[0]])
lat = np.mean(schmale_lat + ross_lat + [ground[1]])
plt.scatter(rossx, rossy, color='cyan')
plt.scatter(schmalex, schmaley, color='blue')
plt.scatter(ground[0], ground[1], color='brown')
plt.scatter(ground[0], schmaley, color='red')
plt.scatter(lon, lat, color='magenta')

import sys
sys.exit()
s1 = []
plt_sec = []
for i, pair in enumerate(paired_flights):
    plt_sec_temp = []
    s1_temp = []
    ross_pos_km = f.lonlat2m(ground[0], ground[1], ross_lon[i], ross_lat[i])
    schmale_pos_km = f.lonlat2m(ground[0], ground[1], schmale_lon[i],
                                schmale_lat[i])
    ground_km = [0, 0]
    dx = ross_pos_km[0] - schmale_pos_km[0]
    dy = schmale_pos_km[1] - ross_pos_km[1]
    #print('dx = '+str(dx),'dy = '+str(dy))

    ross_data = pd.read_csv(
        'Ross{:d}_DroneMetData.txt'.format(pair[0]),
        delim_whitespace=True,
        header=1,
        names=['date', 'time', 'wind_speed', 'wind_dir', 'temp'])
    seconds = []
    for t in range(ross_data.shape[0]):
        hrs_in_sec = int(ross_data['time'][t][0:2]) * 3600