close all;
clear all;
clc;
Event_Title = 'Test';
disp(' ');
To_Time = 58560;
disp(' ');
Source = 'Junk';
disp(' ');
Pre_TALO_Time = [10; 12];
Pre_Altitude = [11.926; 240.923];
BO_TALO_Time = [14.333;16.444];
BO_Altitude = [240.923;515.4021];
Post_TALO_Time = 17.54;
Post_Altitude = 727.5692;
fclose('all');
BET_TALO_Time = [10.55; 11.55; 12.55; 13.55; 14.55; 15.55; 16.55; 17.55; 18.55; 19.55; 20.55];
BET_Altitude = [111.1303; 205.7099; 285.1169; 365.4585; 446.7016; 528.8142; 611.7657; 695.5264; 780.0678; 865.3626; 951.3843];
fid = figure('Name','Event Altitude','numbertitle','off');
axes('Position', [0.04 0.07 1.16 0.884]);
if size(Pre_Altitude) > 0
h = plot(Pre_TALO_Time, Pre_Altitude, '-o', 'MarkerSize', 15);
set(h(1), 'Color', 'r', 'MarkerFaceColor', 'r');
end
hold on;
if size(Post_Altitude) > 0
h = plot(Post_TALO_Time, Post_Altitude, '-d', 'MarkerSize', 15);
set(h(1), 'Color', 'r', 'MarkerFaceColor', 'r');
end
if size(Pre_Altitude) & size(Post_Altitude) > 0
aa = [Pre_TALO_Time(end), Post_TALO_Time(1)];
bb = [Pre_Altitude(end), Post_Altitude(1)];
plot(aa, bb, 'r-', 'LineWidth', 1);
end
if size(BO_Altitude) > 0
hold all;
h = plot(BO_TALO_Time, BO_Altitude, '*');
set(h(1), 'Color', 'b', 'MarkerFaceColor', 'b', 'MarkerSize', 15 );
end
title(Event_Title, 'Fontsize', 20, 'fontweight', 'b');
plt1=plot(-100,-100,'-', 'Color', 'r');
legend(plt1,{Source}, 'Location', 'NortheastOutside');
set(legend, 'FontSize', 20);
Max_TALO_X_Values = [max(Pre_TALO_Time) max(BO_TALO_Time) max(Post_TALO_Time)];
Max_TALO_X = max(Max_TALO_X_Values);
set(gca, 'XLim', [0 10*ceil(max(Max_TALO_X)/10)]);
Max_Y_Values = [max(Pre_Altitude) max(BO_Altitude) max(Post_Altitude)];
Max_Y = max(Max_Y_Values);
set(gca, 'YLim', [0 10*ceil(max(Max_Y)/10)]);
ylim('auto');
xlabel('TALO (Sec)', 'fontsize', 20, 'fontweight', 'b');
ylabel('Altitude (Km)', 'fontsize', 20, 'fontweight', 'b');
set(gca, 'Fontsize', 16);
grid on;
box on;
saveas(gcf,'Altitude_TALO_Linear.fig');
hold on;
writerObj = VideoWriter('Video.avi');
writerObj.FrameRate = 2;
open(writerObj);
for i=1:size(BET_Altitude)
pause(0.1);
figure(fid);
plot(BET_TALO_Time(i),BET_Altitude(i),'og');
frame = getframe(gcf);
writeVideo(writerObj, frame);
end
hold off;
close(writerObj);
close(gcf);