From 6390f4c2162077664758709cc9614f2c3993aabd Mon Sep 17 00:00:00 2001 From: miguekf Date: Thu, 15 Dec 2022 18:09:22 +0100 Subject: [PATCH] ADD: matlab tracking file for plots --- src/utils/matlab/vtl/vtl_tracking.m | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/utils/matlab/vtl/vtl_tracking.m diff --git a/src/utils/matlab/vtl/vtl_tracking.m b/src/utils/matlab/vtl/vtl_tracking.m new file mode 100644 index 000000000..fca25566f --- /dev/null +++ b/src/utils/matlab/vtl/vtl_tracking.m @@ -0,0 +1,64 @@ +% ------------------------------------------------------------------------- +% +% GNSS-SDR is a Global Navigation Satellite System software-defined receiver. +% This file is part of GNSS-SDR. +% +% Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors) +% SPDX-License-Identifier: GPL-3.0-or-later +% +% ------------------------------------------------------------------------- +% +%% +clc +close all +clearvars + +% if ~exist('gps_l1_ca_read_pvt_raw_dump.m', 'file') +% addpath('./libs') +% end +% +% if ~exist('cat2geo.m', 'file') +% addpath('./libs/geoFunctions') +% end +SPEED_OF_LIGHT_M_S=299792458.0; +Lambda_GPS_L1=0.1902937; +%% + +for chan=0:4 +load(['tracking\tracking_raw' num2str(chan) '.mat']); +tracking_channel(chan+1).PRN=PRN; +tracking_channel(chan+1).CN0_SNV_dB_Hz=CN0_SNV_dB_Hz; +tracking_channel(chan+1).carrier_doppler_hz=carrier_doppler_hz; +tracking_channel(chan+1).carrier_doppler_rate_hz=carrier_doppler_rate_hz; +tracking_channel(chan+1).code_error_chips=code_error_chips; +tracking_channel(chan+1).code_freq_chips=code_freq_chips; +tracking_channel(chan+1).code_freq_rate_chips=code_freq_rate_chips; +tracking_channel(chan+1).acc_carrier_phase_rad=acc_carrier_phase_rad; + +clearvars -except tracking_channel chan +end +%% +figure +for chan=1:5 +subplot(2,3,chan); +plot(tracking_channel(chan).carrier_doppler_hz); +grid minor +end +sgtitle('carrier doppler hz channel') +%% +figure +for chan=1:5 +subplot(2,3,chan); +plot(tracking_channel(chan).CN0_SNV_dB_Hz); +grid minor +end +sgtitle('CN0 SNV dB Hz channel') + +%% +figure +for chan=1:5 +subplot(2,3,chan); +plot(tracking_channel(chan).acc_carrier_phase_rad); +grid minor +end +sgtitle('acc carrier phase rad') \ No newline at end of file