From bea662564e5c983bebb37cd00919bcb4718653c7 Mon Sep 17 00:00:00 2001 From: Claudio <claudio.mandrioli@control.lth.se> Date: Wed, 27 Feb 2019 10:43:39 +0100 Subject: [PATCH] changed name to plot script for single experiments --- matlab/main_car.m | 2 +- matlab/main_cycling.m | 2 +- matlab/plot_data.m | 32 -------------------------------- matlab/plot_tradeoff.m | 2 +- matlab/run_many_cycling.m | 2 +- 5 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 matlab/plot_data.m diff --git a/matlab/main_car.m b/matlab/main_car.m index ac57c2b..f6bf76f 100644 --- a/matlab/main_car.m +++ b/matlab/main_car.m @@ -18,4 +18,4 @@ out_data=GPSaidedINS_car(in_data,settings); %% Plot the data disp('Plot data') -plot_data \ No newline at end of file +plot_single_trace diff --git a/matlab/main_cycling.m b/matlab/main_cycling.m index 1d21fce..a0ba614 100644 --- a/matlab/main_cycling.m +++ b/matlab/main_cycling.m @@ -18,4 +18,4 @@ out_data=GPSaidedINS_cycling(in_data,settings); %% Plot the data disp('Plot data') -plot_data +plot_single_trace diff --git a/matlab/plot_data.m b/matlab/plot_data.m deleted file mode 100644 index 03f5d00..0000000 --- a/matlab/plot_data.m +++ /dev/null @@ -1,32 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Script for data plot: -% plots the trajecotry and the stimation accuracy with the GPS turn on -% signal -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% display the overall error (root mean square) -out_data.error - -% Display trajectory estimated with sensor fusion against trajectory for the -% GPS alone always on -h=zeros(1,2); -figure(1) -hold on -plot(in_data.GNSS.pos_ned(2,:),in_data.GNSS.pos_ned(1,:),'b-'); -h(1)=plot(in_data.GNSS.pos_ned(2,:),in_data.GNSS.pos_ned(1,:),'b.'); -h(2)=plot(out_data.x_h(2,:),out_data.x_h(1,:),'-'); -title('Trajectory') -ylabel('North [m]') -xlabel('East [m]') -legend(h,'GNSS position estimate','GNSS aided INS trajectory') -axis equal -grid on - -%plot control signal P and turn on signal of the GPS -h=zeros(1,2); -figure(2) -hold on -h(1)=plot(out_data.P_store); -h(2)=plot(out_data.turn); -legend(h,'sum of the trace of P','antenna turned ON') -grid on \ No newline at end of file diff --git a/matlab/plot_tradeoff.m b/matlab/plot_tradeoff.m index 95645e0..b2560c3 100644 --- a/matlab/plot_tradeoff.m +++ b/matlab/plot_tradeoff.m @@ -8,7 +8,7 @@ xlabel('energy') ylabel('error') title('cycling energy accuracy tracking trade-off') grid - +%iterate and plot the results for the different P thresholds for j=1:length(P_treshold) scatter(energy(:,j), error(:,j),20,color(j,:),'o','filled') end \ No newline at end of file diff --git a/matlab/run_many_cycling.m b/matlab/run_many_cycling.m index d29e060..d98bbb1 100644 --- a/matlab/run_many_cycling.m +++ b/matlab/run_many_cycling.m @@ -25,7 +25,7 @@ for j=1:length(P_treshold) disp(['Starting simulations with threshold for P equal to:', num2str(P_treshold(j))]) %display reached treshold settings.P_treshold=P_treshold(j); %set P reference for k=1:n_run %iterate over the number of simulations per threshold - disp(['Simulation number:',num2str(k)]) %display simulation number + disp(['Simulation number:',num2str(k)]) %display simulation number out_data=GPSaidedINS_cycling(in_data,settings); % Run the GNSS-aided INS energy(k,j)=out_data.energy; % store energy error(k,j)=out_data.error; % store positioning error -- GitLab