From 9b740b454d099539a2c1ceff7f3e60fd99089d36 Mon Sep 17 00:00:00 2001 From: miguekf Date: Sun, 11 Dec 2022 02:11:12 +0100 Subject: [PATCH] MOD: updated matlab vtl_kf --- src/utils/matlab/vtl/kf_prototype.m | 121 +++++++-------- .../vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m | 5 +- src/utils/matlab/vtl/vtl_general_plot.m | 134 +++++++++++++++-- src/utils/matlab/vtl/vtl_prototype.m | 138 +++--------------- 4 files changed, 205 insertions(+), 193 deletions(-) diff --git a/src/utils/matlab/vtl/kf_prototype.m b/src/utils/matlab/vtl/kf_prototype.m index 806c2139b..6367f121c 100644 --- a/src/utils/matlab/vtl/kf_prototype.m +++ b/src/utils/matlab/vtl/kf_prototype.m @@ -28,36 +28,7 @@ kf_yerr = zeros(2*sat_number, 1); % kf_xerr = zeros(8, 1); kf_S = zeros(2*sat_number, 2*sat_number); % kf_P_y innovation covariance matrix -%% State error Covariance Matrix Q (PVT) -kf_Q = [ 100 0 0 0 0 0 0 0 - 0 100 0 0 0 0 0 0 - 0 0 100 0 0 0 0 0 - 0 0 0 10 0 0 0 0 - 0 0 0 0 10 0 0 0 - 0 0 0 0 0 10 0 0 - 0 0 0 0 0 0 500 0 - 0 0 0 0 0 0 0 1500];%careful, values for V and T could not be adecuate. -%% - -% % Measurement error Covariance Matrix R assembling -% for chan=1:5 %neccesary quantities -% % It is diagonal 2*NSatellite x 2*NSatellite (NSat psudorange error;NSat pseudo range rate error) -% kf_R(chan, chan) = 40.0; %TODO: fill with real values. -% kf_R(chan+sat_number, chan+sat_number) = 10.0; -% end - -kf_R=[ 3 0 0 0 0 0 0 0 0 0 - 0 3 0 0 0 0 0 0 0 0 - 0 0 3 0 0 0 0 0 0 0 - 0 0 0 3 0 0 0 0 0 0 - 0 0 0 0 3 0 0 0 0 0 - 0 0 0 0 0 30 0 0 0 0 - 0 0 0 0 0 0 30 0 0 0 - 0 0 0 0 0 0 0 30 0 0 - 0 0 0 0 0 0 0 0 30 0 - 0 0 0 0 0 0 0 0 0 30]; - -% pre-allocate for speed +%% pre-allocate for speed d = zeros(sat_number, 1); rho_pri = zeros(sat_number, 1); rhoDot_pri = zeros(sat_number, 1); @@ -73,7 +44,21 @@ sat_dopp_hz_filt=zeros(sat_number,length(navSolution.RX_time)); %% ################## Kalman Tracking ###################################### % receiver solution from rtklib_solver for t=2:length(navSolution.RX_time) - + + %% State error Covariance Matrix Q (PVT) and R (MEASUREMENTS) + if (t