?? untitled5.m
字號:
%飛機的經緯高度,得到飛機在地球固聯坐標系下的坐標
j = pi/4; w = 0; h = 0;R = 6.371e6;
r = [-sin(j) -sin(w)*cos(j) cos(w)*cos(j);
cos(j) -sin(w)*sin(j) cos(w)*sin(j);
0 cos(w) sin(j)];
p = [cos(w)*cos(j) cos(w)*sin(j) sin(w)]'*(R+h);
p1=[0 0 0]';
p0 = r*p1+p;
%將飛機在地球固聯坐標系下的坐標變換到天線底座坐標系下
%天線底座的經緯高度
t_j = 0; t_w = 0; t_h = 0;
t_r = [-sin(t_j) -sin(t_w)*cos(t_j) cos(t_w)*cos(t_j);
cos(t_j) -sin(t_w)*sin(t_j) cos(t_w)*sin(t_j);
0 cos(t_w) sin(t_j)];
t_p = [cos(t_w)*cos(t_j) cos(t_w)*sin(t_j) sin(t_w)]'*(R+t_h);
p2 = inv(t_r) *(p0 - t_p);
%將飛機在天線底座坐標系下的坐標變換為極坐標,即天線應該達到的姿態
%因為只需要判斷姿態,所以將飛機的坐標單位化
unit_p2 = p2/sqrt(p2(1)^2+p2(2)^2+p2(3)^2);
fy = asin(unit_p2(3))*180/pi %還有180度角,如何判斷象限???
hx = -atan(unit_p2(1)/unit_p2(2))*180/pi
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -