一、STK 和 Matlab的生成的图片对比
(一)STK图片
(二)Matlab图片
(三)STK生成的报表数据
"Time (UTCG)","Azimuth (deg)","Elevation (deg)","Range (km)"
20 Jun 2023 04:27:45.224,0.150,0.000,2595.396820
20 Jun 2023 04:28:45.000,9.701,0.730,2514.867948
20 Jun 2023 04:29:45.000,19.670,0.906,2495.267863
20 Jun 2023 04:30:45.000,29.547,0.497,2538.578726
20 Jun 2023 04:31:20.554,35.168,0.000,2592.806684
20 Jun 2023 06:04:38.828,332.752,0.001,2593.757869
20 Jun 2023 06:05:38.000,338.504,3.156,2265.352599
20 Jun 2023 06:06:38.000,346.231,6.617,1959.013252
20 Jun 2023 06:07:38.000,356.673,10.215,1695.705178
20 Jun 2023 06:08:38.000,10.616,13.469,1499.700869
20 Jun 2023 06:09:38.000,27.901,15.374,1400.605493
20 Jun 2023 06:10:38.000,46.316,14.968,1419.421166
20 Jun 2023 06:11:38.000,62.682,12.472,1551.932442
20 Jun 2023 06:12:38.000,75.459,8.994,1772.501479
20 Jun 2023 06:13:38.000,84.926,5.384,2052.328989
20 Jun 2023 06:14:38.000,91.936,1.981,2369.709116
20 Jun 2023 06:15:15.356,95.399,0.000,2579.803770
20 Jun 2023 07:43:13.282,306.581,0.001,2589.560358
20 Jun 2023 07:44:13.000,305.001,3.882,2192.161107
20 Jun 2023 07:45:13.000,302.625,8.680,1797.452151
20 Jun 2023 07:46:13.000,298.741,15.062,1413.409875
20 Jun 2023 07:47:13.000,291.438,24.440,1054.140490
20 Jun 2023 07:48:13.000,274.162,39.037,758.183797
20 Jun 2023 07:49:13.000,226.429,51.804,625.102520
20 Jun 2023 07:50:13.000,177.262,39.647,748.100048
20 Jun 2023 07:51:13.000,159.262,24.782,1039.624607
20 Jun 2023 07:52:13.000,151.709,15.219,1397.170132
20 Jun 2023 07:53:13.000,147.689,8.742,1780.408864
20 Jun 2023 07:54:13.000,145.205,3.893,2174.656308
20 Jun 2023 07:55:12.418,143.528,0.000,2569.737040
20 Jun 2023 09:25:21.275,256.451,0.000,2577.814143
20 Jun 2023 09:26:21.000,247.096,1.227,2443.010805
20 Jun 2023 09:27:21.000,236.859,1.905,2370.826367
20 Jun 2023 09:28:21.000,226.289,1.915,2367.955776
20 Jun 2023 09:29:21.000,216.004,1.255,2434.498094
20 Jun 2023 09:30:21.000,206.522,0.035,2564.652505
20 Jun 2023 09:30:22.433,206.309,0.000,2568.464000
20 Jun 2023 21:19:30.299,203.659,0.001,2568.112665
20 Jun 2023 21:20:30.000,199.748,3.659,2194.953963
20 Jun 2023 21:21:30.000,194.182,7.979,1834.534503
20 Jun 2023 21:22:30.000,185.812,13.186,1501.388703
20 Jun 2023 21:23:30.000,172.511,19.299,1220.054312
20 Jun 2023 21:24:30.000,151.488,24.941,1035.354724
20 Jun 2023 21:25:30.000,124.154,26.171,1003.184151
20 Jun 2023 21:26:30.000,100.072,21.723,1136.789798
20 Jun 2023 21:27:30.000,84.167,15.517,1388.798880
20 Jun 2023 21:28:30.000,74.290,9.954,1706.874918
20 Jun 2023 21:29:30.000,67.901,5.335,2059.726998
20 Jun 2023 21:30:30.000,63.524,1.446,2431.197180
20 Jun 2023 21:30:54.765,62.103,0.000,2587.792830
20 Jun 2023 22:58:31.658,251.719,0.001,2576.656221
20 Jun 2023 22:59:31.000,255.859,3.583,2210.341717
20 Jun 2023 23:00:31.000,261.703,7.802,1855.573310
20 Jun 2023 23:01:31.000,270.328,12.813,1529.205640
20 Jun 2023 23:02:31.000,283.674,18.561,1255.254749
20 Jun 2023 23:03:31.000,304.073,23.730,1075.855412
20 Jun 2023 23:04:31.000,330.084,24.937,1041.738995
20 Jun 2023 23:05:31.000,353.486,21.031,1165.716924
20 Jun 2023 23:06:31.000,9.587,15.275,1406.083943
20 Jun 2023 23:07:31.000,19.935,9.936,1713.752461
20 Jun 2023 23:08:31.000,26.816,5.424,2057.754921
20 Jun 2023 23:09:31.000,31.657,1.591,2421.524875
20 Jun 2023 23:09:58.624,33.433,0.000,2593.020498
21 Jun 2023 00:41:12.220,306.073,0.000,2589.506085
21 Jun 2023 00:42:12.000,315.124,1.561,2422.749935
21 Jun 2023 00:43:12.000,325.297,2.654,2313.128583
21 Jun 2023 00:44:12.000,336.163,3.105,2270.092106
21 Jun 2023 00:45:12.000,347.104,2.833,2297.455707
21 Jun 2023 00:46:12.000,357.477,1.889,2392.611303
21 Jun 2023 00:47:12.000,6.830,0.431,2547.548264
21 Jun 2023 00:47:27.263,9.019,-0.000,2595.236174
二、Matlab 读取数据生成对应的图像
注:为了便于计算,进行一些特殊处理。
%% ## 读取STK的报告文件
clc;clear;close all
T=readtable('F:\05_地图数据\STK_ReportsData\AER12.csv');
Tim=T.Time_UTCG_;
Az=T.Azimuth_deg_;
El=T.Elevation_deg_;
Ra=T.Range_km_;
formatDate="d MMM yyyy HH:mm:ss.SSS";% 设置时间格式,并输出相应的格式
t = datetime(Tim,'InputFormat',formatDate, ...
'Format',formatDate,'Locale', 'en_US'); % 这一句很关键,本地化的属性
% figure(1)
% plot(t,Ra)% 时间没有截断
%% 对时间进行截断处理
% 判断截断点(相邻点的时间差大于某个值)
difft=diff(t);% 对时间进行差分
tIdx=find(difft>seconds(120));%相邻时间差大于120秒 即认为已断
tIdxq=t(tIdx)+seconds(0.6); % 时间断点后面插一个值
tq=sort([t; tIdxq]); % 重排顺序
Raq=interp1(t,Ra,tq); % 插值
% figure
% plot(t,Ra,'b.-',tq,Raq,'r*') % 原始数据和插值后的数据
% hold on
% plot(t(tIdx),Ra(tIdx),'go','MarkerSize',12)% 截断点的位置
% 多的插值点赋值为NaN
difftq=diff(tq);
tqIdx=find(difftq<seconds(1));
Raq(tqIdx+1)=nan;
%%
figure(5)
title('时间 方位角 高度角 距离 信息')
yyaxis right % 在右坐标轴显示
plot(tq,Raq,'b-','LineWidth',1)% 截断后的数据
xlabel('Time(UTCG)')
ylabel('Distance(km)')
ylim([600 2610])
% 处理角度信息
Azq=interp1(t,Az,tq); % 插值
Elq=interp1(t,El,tq); % 插值
Azq(tqIdx+1)=nan;
Elq(tqIdx+1)=nan;
yyaxis left % 在右坐标轴显示
plot(tq,Azq,'g-',tq,Elq,'r-','LineWidth',1)% 截断后的数据
ylabel('Angle(°)')
ylim([-5 365])
legend('Range(km)','Azimuth(deg)','Elevation(deg)','Location','best')
return
id=[];
for k=1:length(tIdxq)
idx= find(tq==tIdxq(k))
id=[id; idx]
end