-
Notifications
You must be signed in to change notification settings - Fork 2
/
getSiteBLoc.m
30 lines (25 loc) · 955 Bytes
/
getSiteBLoc.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function [ siteB, dataID,PA ] = getSiteBLoc(dnum)
% nominal site B location is CINMS_B_30_00
% ~7.6 km from edge of southbound side of the shipping lane
% ~3.5 km from edge of northbound lane
% need to add in code that looks up site location based on time period!
siteB = [ 34.2755, -120.0185 ];
dataID = [];
PA = '';
%load('D:\Projects\ShippingCINMS\code\matlab\CINMS_B_depInfo.mat');
load('E:\Data\ShippingCINMS\CINMS_B_depInfo');
si = find(recTimes(:,1) <= dnum,1,'last');
ei = find(recTimes(:,2) >= dnum,1,'first');
if isempty(si) && isempty (ei)
fprintf('No HARP deployment found for this time period...skipping\n');
return;
elseif isempty(si) || isempty(ei)
fprintf('Partial HARP deployment found for this time period...skipping\n');
return;
elseif si<ei
fprintf('Multiple HARP deployments found for this time period...skipping!!!!\n');
return;
end
siteB = [ lats(si), lons(si) ];
dataID = names{si};
PA = preAmp{si};