-
Notifications
You must be signed in to change notification settings - Fork 0
/
romans_dome.m
74 lines (67 loc) · 1.12 KB
/
romans_dome.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
function [val] = romans_dome(c)
% "Romans coordinates"
% "Traversing speaker counter clock wise."
if ~exist('c', 'var')
c = 'normal';
end
val.name = 'romans';
% "azimuth(deg) elevation(deg) distance(metres)"
S = [
75 21 4.3
45 21 4.3
15 21 4.3
345 21 4.3
315 21 4.3
285 21 4.3
255 21 4.3
225 21 4.3
195 21 4.3
165 21 4.3
135 21 4.3
105 21 4.3
67.5 55 3.8
22.5 55 3.8
337.5 55 3.8
292.5 55 3.8
247.5 55 3.8
202.5 55 3.8
157.5 55 3.8
112.5 55 3.8
90 79 3.8
0 79 3.8
270 79 3.8
180 79 3.8
];
val.id = {
'S1',
'S2',
'S3',
'S4',
'S5',
'S6',
'S7',
'S8',
'S9',
'S10',
'S11',
'S12',
'S13',
'S14',
'S15',
'S16',
'S17',
'S18',
'S19',
'S20',
'S21',
'S22',
'S23',
'S24',
};
val.az = S(:,1)*pi/180;
val.el = S(:,2)*pi/180;
val.r = S(:,3);
% direction cosines, unit vector
[val.x, val.y, val.z] = sph2cart(val.az, val.el, 1);
fprintf('%s\n', val.name);
end