clear all
close all
clc

data = csvread('Results_marcelo1/recorded_error_distance.csv');

time = data(:,1);
time = time/100000-10;
error_distance = data(:,2);


% % 
 figure('position', [80 80 400 300], 'color', [1 1 1])
plot(time, error_distance, 'b', 'LineWidth',0.5);
hold on


grid on
%axis ([0 60 0 0.080])


data = csvread('Results/recorded_error_distance.csv');

time = data(:,1);
time = time/100000-39;
error_distance = data(:,2);


% % 
% figure('position', [80 80 400 300], 'color', [1 1 1])
plot(time, error_distance, 'r', 'LineWidth',0.5);
hold on


grid on
axis ([0 60 0 0.060])

legend('Using UTI','Without UTI')

AxisFontName = 'Helvetica';
AxisFontSize = 8;

set(gca, 'XTick', 0:5:60, 'YTick', 0:0.0025:0.08, 'FontName', AxisFontName, 'FontSize', AxisFontSize)

title('Distance from Ghost', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)
xlabel('Time [s]', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)
ylabel('Distance [Meter]', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)


export_fig error_distance2 -pdf -transparent
