From 3062b5565dfdea28133fb3eb97bafb97709bf79c Mon Sep 17 00:00:00 2001 From: miguekf Date: Thu, 8 Dec 2022 13:58:38 +0100 Subject: [PATCH] MOD: extract filtering from plot routine --- src/utils/matlab/vtl/general_raw_plot.m | 14 -------------- .../matlab/vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m | 12 ++++++++++++ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/utils/matlab/vtl/general_raw_plot.m b/src/utils/matlab/vtl/general_raw_plot.m index a9dc27570..e295aa543 100644 --- a/src/utils/matlab/vtl/general_raw_plot.m +++ b/src/utils/matlab/vtl/general_raw_plot.m @@ -1,19 +1,5 @@ %general_raw_plot.m -%% ====== FILTERING ======================================================= -moving_avg_factor= 500; -LAT_FILT = movmean(navSolution.latitude,moving_avg_factor); -LON_FILT = movmean(navSolution.longitude,moving_avg_factor); -HEIGH_FILT = movmean(navSolution.height,moving_avg_factor); - -X_FILT = movmean(navSolution.X,moving_avg_factor); -Y_FILT = movmean(navSolution.Y,moving_avg_factor); -Z_FILT = movmean(navSolution.Z,moving_avg_factor); - -vX_FILT = movmean(navSolution.vX,moving_avg_factor); -vY_FILT = movmean(navSolution.vY,moving_avg_factor); -vZ_FILT = movmean(navSolution.vZ,moving_avg_factor); - % navSolution.X(navSolution.X==0) = []; %% ====== GNSS-SDR Plot all figures ======================================================= close all diff --git a/src/utils/matlab/vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m b/src/utils/matlab/vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m index 8ddf9ff63..c4841e21c 100644 --- a/src/utils/matlab/vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m +++ b/src/utils/matlab/vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m @@ -130,7 +130,19 @@ utmstruct.geoid = wgs84Ellipsoid; % navSolution.N(k), ... % navSolution.U(k)]=cart2utm(navSolution.X(k), navSolution.Y(k), navSolution.Z(k), utmZone); % end +%% ====== FILTERING ======================================================= +moving_avg_factor= 500; +LAT_FILT = movmean(navSolution.latitude,moving_avg_factor); +LON_FILT = movmean(navSolution.longitude,moving_avg_factor); +HEIGH_FILT = movmean(navSolution.height,moving_avg_factor); +X_FILT = movmean(navSolution.X,moving_avg_factor); +Y_FILT = movmean(navSolution.Y,moving_avg_factor); +Z_FILT = movmean(navSolution.Z,moving_avg_factor); + +vX_FILT = movmean(navSolution.vX,moving_avg_factor); +vY_FILT = movmean(navSolution.vY,moving_avg_factor); +vZ_FILT = movmean(navSolution.vZ,moving_avg_factor); %% general_raw_plot %%