-
Notifications
You must be signed in to change notification settings - Fork 1
/
updateSkyMapISS.m
39 lines (33 loc) · 1 KB
/
updateSkyMapISS.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
function updateSkyMapISS(az, el)
hObject = findall(0,'Tag','ISSTracker');
handles = guidata(hObject);
if (el > 0)
ca = cosd(az - 270);
sa = sind(az - 270);
[xxx,yyy]=linecircme(sa/ca,0,0,0,90-el);
if (sa>=0) && (ca<=0)
%1st Quadrant anticlockwise from North
issXs = min(xxx);
issYs = max(yyy);
elseif (ca<=0) && sa<0
%2nd Quadrant anticlockwise from North
issXs = min(xxx);
issYs = min(yyy);
elseif ca>0 && (sa<=0)
%3rd Quadrant anticlockwise from North
issXs = max(xxx);
issYs = min(yyy);
elseif ca>0 && sa>0
%4th Quadrant anticlockwise from North
issXs = max(xxx);
issYs = max(yyy);
end
set(handles.ISSSky, 'Visible', 'on');
set(handles.ISSSky, 'XData', issXs);
set(handles.ISSSky, 'YData', issYs);
else
set(handles.ISSSky, 'XData', 0);
set(handles.ISSSky, 'YData', 0);
set(handles.ISSSky, 'Visible', 'off');
end
end