-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfn_region_geometry.m
94 lines (91 loc) · 2.88 KB
/
fn_region_geometry.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
function [wp,wp2,rot]=fn_region_geometry(variable)
%variable='region4';
switch variable
case 'region4'
%% region 4 starting point
wp(1,:)=[40.5 -74];
%% range and bearing numbers for the alongshelf line
range_km=500;
range_step=6;
bearing=217;
%% range_km and bearing for the end points of the cross shelf lines
wp2=[];
range2=300;
bearing2=127;
%% rotation angle for the current vectors
rot=360-37;
case 'region4N'
%% region 4 starting point
wp(1,:)=[40.5 -74];
%% range_km and bearing numbers for the alongshelf line
range_km=300;
range_step=6;
bearing=217;
%% range_km and bearing for the end points of the cross shelf lines
wp2=[];
range2=300;
bearing2=127;
%% rotation angle for the current vectors
rot=360-37;
case 'region4C'
%% region 4 starting point
wp(1,:)=[38.75 -75];
%% range_km and bearing numbers for the alongshelf line
range_km=300;
range_step=6;
bearing=217;
%% range_km and bearing for the end points of the cross shelf lines
wp2=[];
range2=300;
bearing2=127;
%% rotation angle for the current vectors
rot=360-37;
case 'region4S'
%% region 4 starting point
wp(1,:)=[37 -76];
%% range_km and bearing numbers for the alongshelf line
range_km=300;
range_step=6;
bearing=217;
%% range_km and bearing for the end points of the cross shelf lines
wp2=[];
range2=300;
bearing2=127;
%% rotation angle for the current vectors
rot=360-37;
case 'region3'
%% region 3 starting point
% wp(1,:)=[41.5 -70];% removed 20171003 HJR
wp(1,:)=[41.0 -72];
%% range_km and bearing numbers for the alongshelf line
range_km=350;
range_step=6;
bearing=250;
%% range_km and bearing for the end points of the cross shelf lines
wp2=[];
range2=300;
bearing2=160;
%% rotation angle for the current vectors
rot=360-70;
case 'region2'
%% region 2 starting point
wp(1,:)=[42 -70];
%% range_km and bearing numbers for the alongshelf line
range_km=100;
range_step=6;
bearing=217;
%% range_km and bearing for the end points of the cross shelf lines
wp2=[];
range2=200;
bearing2=127;
%% rotation angle for the current vectors
rot=360-37;
end
%% calculate the lat and lon of the alongshelf line pts
for ii=2:range_km/range_step
wp(ii,:)=course2ll([wp(ii-1,1) wp(ii-1,2) bearing range_step]);
end
%% calculate the lat and lon of the end points for the cross shelf lines
for ii=1:length(wp)
wp2(ii,:)=course2ll([wp(ii,1) wp(ii,2) bearing2 range2]);
end