This repository has been archived by the owner on May 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
makePixelInstsDemo.m
76 lines (57 loc) · 1.83 KB
/
makePixelInstsDemo.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
function r = makePixelInstsDemo( )
% Make pixel instruments using pixel toolbox. duplicate of demoInstsFile.
% start by forgetting everything you know
PIXForget;
% and set the station name
PIXSetStation('aerielle');
% sea level
zmsl = 0;
instID = [];
% vbar insts, two y transects
y = [450 700];
x = [125:25:225];
for ii=1:length(x)
name = ['vbar' num2str(x(ii))];
tid = PIXMakeVBAR( x(ii), y(1), x(ii), y(2), zmsl, name);
instID = [instID tid];
end
% runup
% note: normally for a runup line you want to keep a fixed X and Y.
% This requires knowing the Z for each point on the line. For a fixed
% station you may have done the survey transects or have other information
% that allows you to know that. For a UAV operation, you probably do not,
% Thus this is the "no Z" call.
xshore = 125;
xdune = 70;
y = 600:50:650;
rot = 0;
for ii=1:length(y)
[xr, yr, zr] = runupPIXArray( xshore, xdune, y(ii), zmsl, rot );
name = ['runup' num2str(fix(y(ii)))];
tid = PIXCreateInstrument( name, 'runup', PIXFixedZ+PIXUniqueOnly );
PIXAddPoints( tid, xr, yr, zr, name );
instID = [instID tid];
end
% cBathy, 5 meter points
dx = 5;
dy = 5;
x1 = 80;
x2 = 400;
y1 = 450;
y2 = 900;
tid = PIXCreateInstrument( 'mBW', 'matrix', PIXFixedZ+PIXDeBayerStack );
PIXAddMatrix( tid, x1, y1, x2, y2, zmsl, dx, dy );
instID = [instID tid];
% stability slices
tid = PIXCreateInstrument( 'x300Slice', 'line', PIXFixedZ+PIXUniqueOnly );
PIXAddLine( tid, 300, 500, 300, 540, 7, .1, 'x300Slice' );
instID = [instID tid];
tid = PIXCreateInstrument( 'y517Slice', 'line', PIXFixedZ+PIXUniqueOnly );
PIXAddLine( tid, 100, 520, 115, 520, 7, .1, 'y517Slice' );
instID = [instID tid];
% make a package of all insts
pid = PIXCreatePackage('AerielleDemo', instID);
e = matlab2Epoch(now);
% build the initial r
r = PIXCreateR( pid, e, zmsl, 'uav' );
end