2018-03-30 10:04:14 +00:00
|
|
|
% Reads GNSS-SDR Tracking dump binary file using the provided
|
|
|
|
% function and plots some internal variables
|
2020-12-30 12:35:06 +00:00
|
|
|
|
2018-03-30 10:04:14 +00:00
|
|
|
% Javier Arribas, 2011. jarribas(at)cttc.es
|
|
|
|
% Antonio Ramos, 2018. antonio.ramos(at)cttc.es
|
|
|
|
% -------------------------------------------------------------------------
|
|
|
|
%
|
2020-12-30 12:35:06 +00:00
|
|
|
% GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2018-03-30 10:04:14 +00:00
|
|
|
% This file is part of GNSS-SDR.
|
|
|
|
%
|
2020-12-30 12:35:06 +00:00
|
|
|
% Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
2020-02-08 00:20:02 +00:00
|
|
|
% SPDX-License-Identifier: GPL-3.0-or-later
|
2018-03-30 10:04:14 +00:00
|
|
|
%
|
|
|
|
% -------------------------------------------------------------------------
|
|
|
|
%
|
|
|
|
|
|
|
|
close all;
|
|
|
|
clear all;
|
|
|
|
|
|
|
|
if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
|
|
|
addpath('./libs')
|
|
|
|
end
|
|
|
|
|
2021-06-22 14:15:03 +00:00
|
|
|
samplingFreq = 3000000; %[Hz]
|
|
|
|
plot_last_outputs=0;%1000;
|
2019-08-16 15:49:16 +00:00
|
|
|
|
2021-06-22 14:15:03 +00:00
|
|
|
channels = 1; % Number of channels
|
2018-03-30 10:04:14 +00:00
|
|
|
first_channel = 0; % Number of the first channel
|
|
|
|
|
2021-06-22 14:15:03 +00:00
|
|
|
path = '/home/javier/git/gnss-sdr/install/test_inta/'; %% CHANGE THIS PATH
|
2018-03-30 10:04:14 +00:00
|
|
|
|
|
|
|
for N=1:1:channels
|
2019-08-16 15:49:16 +00:00
|
|
|
tracking_log_path = [path 'tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE track_ch_ BY YOUR dump_filename
|
2018-03-30 10:04:14 +00:00
|
|
|
GNSS_tracking(N) = dll_pll_veml_read_tracking_dump(tracking_log_path);
|
|
|
|
end
|
|
|
|
|
|
|
|
% GNSS-SDR format conversion to MATLAB GPS receiver
|
|
|
|
|
|
|
|
for N=1:1:channels
|
|
|
|
trackResults(N).status = 'T'; %fake track
|
2019-08-16 15:49:16 +00:00
|
|
|
if plot_last_outputs>0 && plot_last_outputs<length(GNSS_tracking(N).code_freq_hz)
|
2020-12-30 12:35:06 +00:00
|
|
|
|
2019-08-16 15:49:16 +00:00
|
|
|
start_sample=length(GNSS_tracking(N).code_freq_hz)-plot_last_outputs;
|
|
|
|
else
|
|
|
|
start_sample=1;
|
|
|
|
end
|
|
|
|
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz(start_sample:end).';
|
|
|
|
trackResults(N).carrFreq = GNSS_tracking(N).carrier_doppler_hz(start_sample:end).';
|
|
|
|
trackResults(N).dllDiscr = GNSS_tracking(N).code_error(start_sample:end).';
|
|
|
|
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco(start_sample:end).';
|
|
|
|
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error(start_sample:end).';
|
|
|
|
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco(start_sample:end).';
|
2018-03-30 10:04:14 +00:00
|
|
|
|
2019-08-16 15:49:16 +00:00
|
|
|
trackResults(N).I_P = GNSS_tracking(N).P(start_sample:end).';
|
|
|
|
trackResults(N).Q_P = zeros(1,length(GNSS_tracking(N).P(start_sample:end)));
|
2018-03-30 10:04:14 +00:00
|
|
|
|
2019-08-16 15:49:16 +00:00
|
|
|
trackResults(N).I_VE = GNSS_tracking(N).VE(start_sample:end).';
|
|
|
|
trackResults(N).I_E = GNSS_tracking(N).E(start_sample:end).';
|
|
|
|
trackResults(N).I_L = GNSS_tracking(N).L(start_sample:end).';
|
|
|
|
trackResults(N).I_VL = GNSS_tracking(N).VL(start_sample:end).';
|
|
|
|
trackResults(N).Q_VE = zeros(1,length(GNSS_tracking(N).VE(start_sample:end)));
|
|
|
|
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E(start_sample:end)));
|
|
|
|
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).L(start_sample:end)));
|
|
|
|
trackResults(N).Q_VL = zeros(1,length(GNSS_tracking(N).VL(start_sample:end)));
|
|
|
|
trackResults(N).data_I = GNSS_tracking(N).prompt_I(start_sample:end).';
|
|
|
|
trackResults(N).data_Q = GNSS_tracking(N).prompt_Q(start_sample:end).';
|
|
|
|
trackResults(N).PRN = GNSS_tracking(N).PRN(start_sample:end).';
|
|
|
|
trackResults(N).CNo = GNSS_tracking(N).CN0_SNV_dB_Hz(start_sample:end).';
|
|
|
|
trackResults(N).prn_start_time_s = GNSS_tracking(N).PRN_start_sample(start_sample:end)/samplingFreq;
|
2018-03-30 10:04:14 +00:00
|
|
|
% Use original MATLAB tracking plot function
|
|
|
|
settings.numberOfChannels = channels;
|
|
|
|
plotVEMLTracking(N, trackResults, settings)
|
|
|
|
end
|
|
|
|
|
2019-08-16 15:49:16 +00:00
|
|
|
%Doppler plot (optional)
|
|
|
|
% for N=1:1:channels
|
|
|
|
% figure;
|
|
|
|
% plot(trackResults(N).prn_start_time_s , GNSS_tracking(N).carrier_doppler_hz(start_sample:end).' / 1000);
|
|
|
|
% xlabel('Time(s)'); ylabel('Doppler(KHz)'); title(['Doppler frequency channel ' num2str(N)]);
|
|
|
|
% end
|