mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 20:50:33 +00:00
Cleanup of Matlab/Octave code
This commit is contained in:
parent
a2e40eca95
commit
9458fe6e57
@ -1,37 +1,36 @@
|
|||||||
% /*!
|
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||||
% * \file dll_pll_vml_plot_sample.m
|
% function and plots some internal variables
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||||
% function and plot some internal variables
|
% Antonio Ramos, 2018. antonio.ramos(at)cttc.es
|
||||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
% -------------------------------------------------------------------------
|
||||||
% * \author Antonio Ramos, 2018. antonio.ramos(at)cttc.es
|
%
|
||||||
% * -------------------------------------------------------------------------
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
% *
|
%
|
||||||
% * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
% *
|
% Satellite Systems receiver
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
%
|
||||||
% * Satellite Systems receiver
|
% This file is part of GNSS-SDR.
|
||||||
% *
|
%
|
||||||
% * This file is part of GNSS-SDR.
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% *
|
% it under the terms of the GNU General Public License as published by
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% * it under the terms of the GNU General Public License as published by
|
% at your option) any later version.
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
%
|
||||||
% * at your option) any later version.
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% *
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% GNU General Public License for more details.
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
%
|
||||||
% * GNU General Public License for more details.
|
% You should have received a copy of the GNU General Public License
|
||||||
% *
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% * You should have received a copy of the GNU General Public License
|
%
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
% -------------------------------------------------------------------------
|
||||||
% *
|
%
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
close all;
|
close all;
|
||||||
clear all;
|
clear all;
|
||||||
|
|
||||||
if ~exist('dll_pll_veml_read_tracking_dump.m','file')
|
if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
||||||
addpath('./libs')
|
addpath('./libs')
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -76,8 +75,8 @@ for N=1:1:channels
|
|||||||
|
|
||||||
% Use original MATLAB tracking plot function
|
% Use original MATLAB tracking plot function
|
||||||
settings.numberOfChannels = channels;
|
settings.numberOfChannels = channels;
|
||||||
settings.msToProcess = length(GNSS_tracking(N).E)*coherent_integration_time_ms;
|
settings.msToProcess = length(GNSS_tracking(N).E) * coherent_integration_time_ms;
|
||||||
plotVEMLTracking(N,trackResults,settings)
|
plotVEMLTracking(N, trackResults, settings)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,36 +1,35 @@
|
|||||||
% /*!
|
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||||
% * \file galileo_l1_ca_dll_pll_vml_plot_sample.m
|
% function and plots some internal variables
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||||
% function and plot some internal variables
|
% -------------------------------------------------------------------------
|
||||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
%
|
||||||
% * -------------------------------------------------------------------------
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
% *
|
%
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
% *
|
% Satellite Systems receiver
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
%
|
||||||
% * Satellite Systems receiver
|
% This file is part of GNSS-SDR.
|
||||||
% *
|
%
|
||||||
% * This file is part of GNSS-SDR.
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% *
|
% it under the terms of the GNU General Public License as published by
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% * it under the terms of the GNU General Public License as published by
|
% at your option) any later version.
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
%
|
||||||
% * at your option) any later version.
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% *
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% GNU General Public License for more details.
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
%
|
||||||
% * GNU General Public License for more details.
|
% You should have received a copy of the GNU General Public License
|
||||||
% *
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% * You should have received a copy of the GNU General Public License
|
%
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
% -------------------------------------------------------------------------
|
||||||
% *
|
%
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
close all;
|
close all;
|
||||||
clear all;
|
clear all;
|
||||||
|
|
||||||
if ~exist('galileo_e1_dll_pll_veml_read_tracking_dump.m','file')
|
if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
||||||
addpath('./libs')
|
addpath('./libs')
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -42,7 +41,7 @@ path = '/Users/carlesfernandez/git/cttc/build/'; %% CHANGE THIS PATH
|
|||||||
|
|
||||||
for N=1:1:channels
|
for N=1:1:channels
|
||||||
tracking_log_path = [path 'track_ch' num2str(N+first_channel-1) '.dat']; %% CHANGE track_ch BY YOUR dump_filename
|
tracking_log_path = [path 'track_ch' num2str(N+first_channel-1) '.dat']; %% CHANGE track_ch BY YOUR dump_filename
|
||||||
GNSS_tracking(N)= galileo_e1_dll_pll_veml_read_tracking_dump(tracking_log_path);
|
GNSS_tracking(N) = dll_pll_veml_read_tracking_dump(tracking_log_path);
|
||||||
end
|
end
|
||||||
|
|
||||||
% GNSS-SDR format conversion to MATLAB GPS receiver
|
% GNSS-SDR format conversion to MATLAB GPS receiver
|
||||||
@ -73,7 +72,7 @@ for N=1:1:channels
|
|||||||
% Use original MATLAB tracking plot function
|
% Use original MATLAB tracking plot function
|
||||||
settings.numberOfChannels = channels;
|
settings.numberOfChannels = channels;
|
||||||
settings.msToProcess = length(GNSS_tracking(N).E)*4;
|
settings.msToProcess = length(GNSS_tracking(N).E)*4;
|
||||||
plotVEMLTracking(N,trackResults,settings)
|
plotVEMLTracking(N, trackResults, settings)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,33 +1,31 @@
|
|||||||
% /*!
|
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||||
% * \file galileo_e5a_dll_pll_plot_sample.m
|
% function and plots some internal variables
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
% Javier Arribas, Marc Sales 2014. jarribas(at)cttc.es, marcsales92@gmail.com
|
||||||
% function and plot some internal variables
|
% -------------------------------------------------------------------------
|
||||||
% * \author Javier Arribas, Marc Sales 2014. jarribas(at)cttc.es
|
%
|
||||||
% marcsales92@gmail.com
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
% * -------------------------------------------------------------------------
|
%
|
||||||
% *
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
% * Copyright (C) 2010-2014 (see AUTHORS file for a list of contributors)
|
% Satellite Systems receiver
|
||||||
% *
|
%
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
% This file is part of GNSS-SDR.
|
||||||
% * Satellite Systems receiver
|
%
|
||||||
% *
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% * This file is part of GNSS-SDR.
|
% it under the terms of the GNU General Public License as published by
|
||||||
% *
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
% at your option) any later version.
|
||||||
% * it under the terms of the GNU General Public License as published by
|
%
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% * at your option) any later version.
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% *
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
% GNU General Public License for more details.
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
%
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
% You should have received a copy of the GNU General Public License
|
||||||
% * GNU General Public License for more details.
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% *
|
%
|
||||||
% * You should have received a copy of the GNU General Public License
|
% -------------------------------------------------------------------------
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
%
|
||||||
% *
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
close all;
|
close all;
|
||||||
clear all;
|
clear all;
|
||||||
|
|
||||||
@ -44,7 +42,7 @@ path = '/Users/carlesfernandez/git/cttc/build/'; %% CHANGE THIS PATH
|
|||||||
|
|
||||||
for N=1:1:channels
|
for N=1:1:channels
|
||||||
tracking_log_path = [path 'tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE tracking_ch_ BY YOUR dump_filename
|
tracking_log_path = [path 'tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE tracking_ch_ BY YOUR dump_filename
|
||||||
GNSS_tracking(N)= gps_l1_ca_dll_pll_read_tracking_dump(tracking_log_path);
|
GNSS_tracking(N) = gps_l1_ca_dll_pll_read_tracking_dump(tracking_log_path);
|
||||||
end
|
end
|
||||||
|
|
||||||
% GNSS-SDR format conversion to MATLAB GPS receiver
|
% GNSS-SDR format conversion to MATLAB GPS receiver
|
||||||
@ -72,26 +70,26 @@ for N=1:1:channels
|
|||||||
% Use original MATLAB tracking plot function
|
% Use original MATLAB tracking plot function
|
||||||
settings.numberOfChannels = channels;
|
settings.numberOfChannels = channels;
|
||||||
settings.msToProcess = length(GNSS_tracking(N).E);
|
settings.msToProcess = length(GNSS_tracking(N).E);
|
||||||
plotTrackingE5a(N,trackResults,settings)
|
plotTrackingE5a(N, trackResults, settings)
|
||||||
end
|
end
|
||||||
|
|
||||||
for N=1:1:channels
|
for N=1:1:channels
|
||||||
% figure;
|
% figure;
|
||||||
% plot([GNSS_tracking(N).E,GNSS_tracking(N).P,GNSS_tracking(N).L],'-*');
|
% plot([GNSS_tracking(N).E, GNSS_tracking(N).P, GNSS_tracking(N).L],'-*');
|
||||||
% title(['Early, Prompt, and Late correlator absolute value output for channel ' num2str(N)']);
|
% title(['Early, Prompt, and Late correlator absolute value output for channel ' num2str(N)']);
|
||||||
% figure;
|
% figure;
|
||||||
% plot(GNSS_tracking(N).prompt_I,GNSS_tracking(N).prompt_Q,'+');
|
% plot(GNSS_tracking(N).prompt_I, GNSS_tracking(N).prompt_Q, '+');
|
||||||
% title(['Navigation constellation plot for channel ' num2str(N)]);
|
% title(['Navigation constellation plot for channel ' num2str(N)]);
|
||||||
% figure;
|
% figure;
|
||||||
%
|
%
|
||||||
% plot(GNSS_tracking(N).prompt_Q,'r');
|
% plot(GNSS_tracking(N).prompt_Q,'r');
|
||||||
% hold on;
|
% hold on;
|
||||||
% plot(GNSS_tracking(N).prompt_I);
|
% plot(GNSS_tracking(N).prompt_I);
|
||||||
% title(['Navigation symbols I(red) Q(blue) for channel ' num2str(N)]);
|
% title(['Navigation symbols I(red) Q(blue) for channel ' num2str(N)]);
|
||||||
%
|
%
|
||||||
figure;
|
figure;
|
||||||
t=0:length(GNSS_tracking(N).carrier_doppler_hz)-1;
|
t = 0:length(GNSS_tracking(N).carrier_doppler_hz)-1;
|
||||||
t=t/1000;
|
t = t/1000;
|
||||||
plot(t,GNSS_tracking(N).carrier_doppler_hz/1000);
|
plot(t, GNSS_tracking(N).carrier_doppler_hz / 1000);
|
||||||
xlabel('Time(s)');ylabel('Doppler(KHz)');title(['Doppler frequency channel ' num2str(N)]);
|
xlabel('Time(s)'); ylabel('Doppler(KHz)'); title(['Doppler frequency channel ' num2str(N)]);
|
||||||
end
|
end
|
@ -1,36 +1,35 @@
|
|||||||
% /*!
|
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||||
% * \file glonass_ca_dll_pll_plot_sample.m
|
% function and plots some internal variables
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
% Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
||||||
% function and plot some internal variables
|
% -------------------------------------------------------------------------
|
||||||
% * \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
%
|
||||||
% * -------------------------------------------------------------------------
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
% *
|
%
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
% *
|
% Satellite Systems receiver
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
%
|
||||||
% * Satellite Systems receiver
|
% This file is part of GNSS-SDR.
|
||||||
% *
|
%
|
||||||
% * This file is part of GNSS-SDR.
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% *
|
% it under the terms of the GNU General Public License as published by
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% * it under the terms of the GNU General Public License as published by
|
% at your option) any later version.
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
%
|
||||||
% * at your option) any later version.
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% *
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% GNU General Public License for more details.
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
%
|
||||||
% * GNU General Public License for more details.
|
% You should have received a copy of the GNU General Public License
|
||||||
% *
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% * You should have received a copy of the GNU General Public License
|
%
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
% -------------------------------------------------------------------------
|
||||||
% *
|
%
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
close all;
|
close all;
|
||||||
clear all;
|
clear all;
|
||||||
|
|
||||||
if ~exist('glonass_ca_dll_pll_read_tracking_dump.m','file')
|
if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
||||||
addpath('./libs')
|
addpath('./libs')
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -43,7 +42,7 @@ path = '/archive/'; %% CHANGE THIS PATH
|
|||||||
|
|
||||||
for N=1:1:channels
|
for N=1:1:channels
|
||||||
tracking_log_path = [path 'glo_tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE epl_tracking_ch_ BY YOUR dump_filename
|
tracking_log_path = [path 'glo_tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE epl_tracking_ch_ BY YOUR dump_filename
|
||||||
GNSS_tracking(N)= glonass_ca_dll_pll_read_tracking_dump(tracking_log_path);
|
GNSS_tracking(N) = dll_pll_veml_read_tracking_dump(tracking_log_path);
|
||||||
end
|
end
|
||||||
|
|
||||||
% GNSS-SDR format conversion to MATLAB GPS receiver
|
% GNSS-SDR format conversion to MATLAB GPS receiver
|
||||||
@ -70,5 +69,5 @@ for N=1:1:channels
|
|||||||
% Use original MATLAB tracking plot function
|
% Use original MATLAB tracking plot function
|
||||||
settings.numberOfChannels = channels;
|
settings.numberOfChannels = channels;
|
||||||
settings.msToProcess = length(GNSS_tracking(N).E);
|
settings.msToProcess = length(GNSS_tracking(N).E);
|
||||||
plotTracking(N,trackResults,settings);
|
plotTracking(N, trackResults, settings)
|
||||||
end
|
end
|
||||||
|
@ -1,36 +1,35 @@
|
|||||||
% /*!
|
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||||
% * \file gps_l1_ca_dll_pll_plot_sample.m
|
% function and plots some internal variables
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||||
% function and plot some internal variables
|
% -------------------------------------------------------------------------
|
||||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
%
|
||||||
% * -------------------------------------------------------------------------
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
% *
|
%
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
% *
|
% Satellite Systems receiver
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
%
|
||||||
% * Satellite Systems receiver
|
% This file is part of GNSS-SDR.
|
||||||
% *
|
%
|
||||||
% * This file is part of GNSS-SDR.
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% *
|
% it under the terms of the GNU General Public License as published by
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% * it under the terms of the GNU General Public License as published by
|
% at your option) any later version.
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
%
|
||||||
% * at your option) any later version.
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% *
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% GNU General Public License for more details.
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
%
|
||||||
% * GNU General Public License for more details.
|
% You should have received a copy of the GNU General Public License
|
||||||
% *
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% * You should have received a copy of the GNU General Public License
|
%
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
% -------------------------------------------------------------------------
|
||||||
% *
|
%
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
close all;
|
close all;
|
||||||
clear all;
|
clear all;
|
||||||
|
|
||||||
if ~exist('gps_l1_ca_dll_pll_read_tracking_dump.m','file')
|
if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
||||||
addpath('./libs')
|
addpath('./libs')
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -43,7 +42,7 @@ path = '/archive/'; %% CHANGE THIS PATH
|
|||||||
|
|
||||||
for N=1:1:channels
|
for N=1:1:channels
|
||||||
tracking_log_path = [path 'glo_tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE epl_tracking_ch_ BY YOUR dump_filename
|
tracking_log_path = [path 'glo_tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE epl_tracking_ch_ BY YOUR dump_filename
|
||||||
GNSS_tracking(N)= gps_l1_ca_dll_pll_read_tracking_dump(tracking_log_path);
|
GNSS_tracking(N) = dll_pll_veml_read_tracking_dump(tracking_log_path);
|
||||||
end
|
end
|
||||||
|
|
||||||
% GNSS-SDR format conversion to MATLAB GPS receiver
|
% GNSS-SDR format conversion to MATLAB GPS receiver
|
||||||
@ -70,7 +69,7 @@ for N=1:1:channels
|
|||||||
% Use original MATLAB tracking plot function
|
% Use original MATLAB tracking plot function
|
||||||
settings.numberOfChannels = channels;
|
settings.numberOfChannels = channels;
|
||||||
settings.msToProcess = length(GNSS_tracking(N).E);
|
settings.msToProcess = length(GNSS_tracking(N).E);
|
||||||
plotTracking(N,trackResults,settings)
|
plotTracking(N, trackResults, settings)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,32 +1,30 @@
|
|||||||
% /*!
|
% Readx GNSS-SDR PVT dump binary file using the provided
|
||||||
% * \file gps_l1_ca_pvt_plot_sample.m
|
% function and plotx some internal variables
|
||||||
% * \brief Read GNSS-SDR PVT dump binary file using the provided
|
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||||
% function and plot some internal variables
|
% -------------------------------------------------------------------------
|
||||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
%
|
||||||
% * -------------------------------------------------------------------------
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
% *
|
%
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
% *
|
% Satellite Systems receiver
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
%
|
||||||
% * Satellite Systems receiver
|
% This file is part of GNSS-SDR.
|
||||||
% *
|
%
|
||||||
% * This file is part of GNSS-SDR.
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% *
|
% it under the terms of the GNU General Public License as published by
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% * it under the terms of the GNU General Public License as published by
|
% at your option) any later version.
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
%
|
||||||
% * at your option) any later version.
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% *
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% GNU General Public License for more details.
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
%
|
||||||
% * GNU General Public License for more details.
|
% You should have received a copy of the GNU General Public License
|
||||||
% *
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% * You should have received a copy of the GNU General Public License
|
%
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
% -------------------------------------------------------------------------
|
||||||
% *
|
%
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
|
|
||||||
close all;
|
close all;
|
||||||
clear all;
|
clear all;
|
||||||
@ -65,7 +63,7 @@ h=35;
|
|||||||
%=== Convert to UTM coordinate system =============================
|
%=== Convert to UTM coordinate system =============================
|
||||||
utmZone = findUtmZone(lat_deg, long_deg);
|
utmZone = findUtmZone(lat_deg, long_deg);
|
||||||
|
|
||||||
[settings.truePosition.E, ...
|
[settings.truePosition.E, ...
|
||||||
settings.truePosition.N, ...
|
settings.truePosition.N, ...
|
||||||
settings.truePosition.U] = cart2utm(X, Y, Z, utmZone);
|
settings.truePosition.U] = cart2utm(X, Y, Z, utmZone);
|
||||||
|
|
||||||
|
@ -1,4 +1,28 @@
|
|||||||
% Read PVG raw dump
|
% Read PVG raw dump
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
|
||||||
%clear all;
|
%clear all;
|
||||||
|
|
||||||
|
@ -1,32 +1,31 @@
|
|||||||
% /*!
|
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||||
% * \file gps_l1_ca_dll_fll_pll_plot_sample.m
|
% function and plots some internal variables
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||||
% function and plot some internal variables
|
% -------------------------------------------------------------------------
|
||||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
%
|
||||||
% * -------------------------------------------------------------------------
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
% *
|
%
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
% *
|
% Satellite Systems receiver
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
%
|
||||||
% * Satellite Systems receiver
|
% This file is part of GNSS-SDR.
|
||||||
% *
|
%
|
||||||
% * This file is part of GNSS-SDR.
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% *
|
% it under the terms of the GNU General Public License as published by
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% * it under the terms of the GNU General Public License as published by
|
% at your option) any later version.
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
%
|
||||||
% * at your option) any later version.
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% *
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% GNU General Public License for more details.
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
%
|
||||||
% * GNU General Public License for more details.
|
% You should have received a copy of the GNU General Public License
|
||||||
% *
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% * You should have received a copy of the GNU General Public License
|
%
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
% -------------------------------------------------------------------------
|
||||||
% *
|
%
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
%close all;
|
%close all;
|
||||||
%clear all;
|
%clear all;
|
||||||
samplingFreq = 64e6/16; %[Hz]
|
samplingFreq = 64e6/16; %[Hz]
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
|
||||||
%help script to compare GNSS-SDR Preambles starts
|
%help script to compare GNSS-SDR Preambles starts
|
||||||
channel=3;
|
channel=3;
|
||||||
% From GNSS_SDR telemetry decoder
|
% From GNSS_SDR telemetry decoder
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
|
||||||
% compare pseudoranges
|
% compare pseudoranges
|
||||||
|
|
||||||
close all;
|
close all;
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
|
||||||
% Read observables dump
|
% Read observables dump
|
||||||
|
|
||||||
%clear all;
|
%clear all;
|
||||||
|
@ -1,74 +1,72 @@
|
|||||||
% /*!
|
% Usage: dll_pll_veml_read_tracking_dump (filename, [count])
|
||||||
% * \file dll_pll_veml_read_tracking_dump.m
|
%
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file into MATLAB.
|
% Opens GNSS-SDR tracking binary log file .dat and returns the contents
|
||||||
% * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
||||||
% * -------------------------------------------------------------------------
|
% Read GNSS-SDR Tracking dump binary file into MATLAB.
|
||||||
% *
|
% Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||||
% * Copyright (C) 2010-2012 (see AUTHORS file for a list of contributors)
|
% -------------------------------------------------------------------------
|
||||||
% *
|
%
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
% * Satellite Systems receiver
|
%
|
||||||
% *
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
% * This file is part of GNSS-SDR.
|
% Satellite Systems receiver
|
||||||
% *
|
%
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
% This file is part of GNSS-SDR.
|
||||||
% * it under the terms of the GNU General Public License as published by
|
%
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% * at your option) any later version.
|
% it under the terms of the GNU General Public License as published by
|
||||||
% *
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
% at your option) any later version.
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
%
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% * GNU General Public License for more details.
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% *
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% * You should have received a copy of the GNU General Public License
|
% GNU General Public License for more details.
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
%
|
||||||
% *
|
% You should have received a copy of the GNU General Public License
|
||||||
% * -------------------------------------------------------------------------
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% */
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
|
||||||
function [GNSS_tracking] = dll_pll_veml_read_tracking_dump (filename, count)
|
function [GNSS_tracking] = dll_pll_veml_read_tracking_dump (filename, count)
|
||||||
%% usage: dll_pll_veml_read_tracking_dump (filename, [count])
|
|
||||||
%%
|
|
||||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
|
||||||
%%
|
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
m = nargchk (1,2,nargin);
|
||||||
|
|
||||||
num_float_vars = 17;
|
num_float_vars = 17;
|
||||||
num_unsigned_long_int_vars = 1;
|
num_unsigned_long_int_vars = 1;
|
||||||
num_double_vars = 1;
|
num_double_vars = 1;
|
||||||
num_unsigned_int_vars = 1;
|
num_unsigned_int_vars = 1;
|
||||||
|
|
||||||
if(~isempty(strfind(computer('arch'), '64')))
|
if(~isempty(strfind(computer('arch'), '64')))
|
||||||
% 64-bit computer
|
% 64-bit computer
|
||||||
double_size_bytes = 8;
|
double_size_bytes = 8;
|
||||||
unsigned_long_int_size_bytes = 8;
|
unsigned_long_int_size_bytes = 8;
|
||||||
float_size_bytes = 4;
|
float_size_bytes = 4;
|
||||||
unsigned_int_size_bytes = 4;
|
unsigned_int_size_bytes = 4;
|
||||||
else
|
else
|
||||||
double_size_bytes = 8;
|
double_size_bytes = 8;
|
||||||
unsigned_long_int_size_bytes = 4;
|
unsigned_long_int_size_bytes = 4;
|
||||||
float_size_bytes = 4;
|
float_size_bytes = 4;
|
||||||
unsigned_int_size_bytes = 4;
|
unsigned_int_size_bytes = 4;
|
||||||
end
|
end
|
||||||
|
|
||||||
skip_bytes_each_read = float_size_bytes * num_float_vars + unsigned_long_int_size_bytes * num_unsigned_long_int_vars + ...
|
skip_bytes_each_read = float_size_bytes * num_float_vars + unsigned_long_int_size_bytes * num_unsigned_long_int_vars + ...
|
||||||
double_size_bytes * num_double_vars + num_unsigned_int_vars*unsigned_int_size_bytes;
|
double_size_bytes * num_double_vars + num_unsigned_int_vars*unsigned_int_size_bytes;
|
||||||
|
|
||||||
bytes_shift = 0;
|
bytes_shift = 0;
|
||||||
|
|
||||||
if (m)
|
if (m)
|
||||||
usage (m);
|
usage (m);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 2)
|
if (nargin < 2)
|
||||||
count = Inf;
|
count = Inf;
|
||||||
end
|
end
|
||||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||||
f = fopen (filename, 'rb');
|
f = fopen (filename, 'rb');
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
else
|
else
|
||||||
v1 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
v1 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
bytes_shift = bytes_shift + float_size_bytes;
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
fseek(f,bytes_shift,'bof'); % move to next float
|
||||||
@ -149,5 +147,5 @@ function [GNSS_tracking] = dll_pll_veml_read_tracking_dump (filename, count)
|
|||||||
GNSS_tracking.var1 = v18;
|
GNSS_tracking.var1 = v18;
|
||||||
GNSS_tracking.var2 = v19;
|
GNSS_tracking.var2 = v19;
|
||||||
GNSS_tracking.PRN = v20;
|
GNSS_tracking.PRN = v20;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,153 +0,0 @@
|
|||||||
% /*!
|
|
||||||
% * \file galileo_e1_dll_pll_veml_read_tracking_dump.m
|
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file into MATLAB.
|
|
||||||
% * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% *
|
|
||||||
% * Copyright (C) 2010-2012 (see AUTHORS file for a list of contributors)
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
|
||||||
% * Satellite Systems receiver
|
|
||||||
% *
|
|
||||||
% * This file is part of GNSS-SDR.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
|
||||||
% * it under the terms of the GNU General Public License as published by
|
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
|
||||||
% * at your option) any later version.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
% * GNU General Public License for more details.
|
|
||||||
% *
|
|
||||||
% * You should have received a copy of the GNU General Public License
|
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
% *
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
|
|
||||||
function [GNSS_tracking] = galileo_e1_dll_pll_veml_read_tracking_dump (filename, count)
|
|
||||||
%% usage: galileo_e1_dll_pll_veml_read_tracking_dump (filename, [count])
|
|
||||||
%%
|
|
||||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
|
||||||
%%
|
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
|
||||||
|
|
||||||
num_float_vars = 17;
|
|
||||||
num_unsigned_long_int_vars = 1;
|
|
||||||
num_double_vars = 1;
|
|
||||||
num_unsigned_int_vars = 1;
|
|
||||||
|
|
||||||
if(~isempty(strfind(computer('arch'), '64')))
|
|
||||||
% 64-bit computer
|
|
||||||
double_size_bytes = 8;
|
|
||||||
unsigned_long_int_size_bytes = 8;
|
|
||||||
float_size_bytes = 4;
|
|
||||||
unsigned_int_size_bytes = 4;
|
|
||||||
else
|
|
||||||
double_size_bytes = 8;
|
|
||||||
unsigned_long_int_size_bytes = 4;
|
|
||||||
float_size_bytes = 4;
|
|
||||||
unsigned_int_size_bytes = 4;
|
|
||||||
end
|
|
||||||
|
|
||||||
skip_bytes_each_read = float_size_bytes * num_float_vars + unsigned_long_int_size_bytes * num_unsigned_long_int_vars + ...
|
|
||||||
double_size_bytes * num_double_vars + num_unsigned_int_vars*unsigned_int_size_bytes;
|
|
||||||
|
|
||||||
bytes_shift = 0;
|
|
||||||
|
|
||||||
if (m)
|
|
||||||
usage (m);
|
|
||||||
end
|
|
||||||
|
|
||||||
if (nargin < 2)
|
|
||||||
count = Inf;
|
|
||||||
end
|
|
||||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
|
||||||
f = fopen (filename, 'rb');
|
|
||||||
if (f < 0)
|
|
||||||
else
|
|
||||||
v1 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v2 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v3 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v4 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v5 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v6 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v7 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v8 = fread (f, count, 'long', skip_bytes_each_read - unsigned_long_int_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + unsigned_long_int_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v9 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v10 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v11 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v12 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v13 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v14 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v15 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v16 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v17 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next float
|
|
||||||
v18 = fread (f, count, 'float', skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next double
|
|
||||||
v19 = fread (f, count, 'double', skip_bytes_each_read - double_size_bytes);
|
|
||||||
bytes_shift = bytes_shift + double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next unsigned int
|
|
||||||
v20 = fread (f, count, 'uint', skip_bytes_each_read - unsigned_int_size_bytes);
|
|
||||||
fclose (f);
|
|
||||||
|
|
||||||
GNSS_tracking.VE = v1;
|
|
||||||
GNSS_tracking.E = v2;
|
|
||||||
GNSS_tracking.P = v3;
|
|
||||||
GNSS_tracking.L = v4;
|
|
||||||
GNSS_tracking.VL = v5;
|
|
||||||
GNSS_tracking.prompt_I = v6;
|
|
||||||
GNSS_tracking.prompt_Q = v7;
|
|
||||||
GNSS_tracking.PRN_start_sample = v8;
|
|
||||||
GNSS_tracking.acc_carrier_phase_rad = v9;
|
|
||||||
GNSS_tracking.carrier_doppler_hz = v10;
|
|
||||||
GNSS_tracking.code_freq_hz = v11;
|
|
||||||
GNSS_tracking.carr_error = v12;
|
|
||||||
GNSS_tracking.carr_nco = v13;
|
|
||||||
GNSS_tracking.code_error = v14;
|
|
||||||
GNSS_tracking.code_nco = v15;
|
|
||||||
GNSS_tracking.CN0_SNV_dB_Hz = v16;
|
|
||||||
GNSS_tracking.carrier_lock_test = v17;
|
|
||||||
GNSS_tracking.var1 = v18;
|
|
||||||
GNSS_tracking.var2 = v19;
|
|
||||||
GNSS_tracking.PRN = v20;
|
|
||||||
end
|
|
||||||
|
|
@ -1,191 +0,0 @@
|
|||||||
% /*!
|
|
||||||
% * \file glonass_ca_dll_pll_read_tracking_dump.m
|
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file into MATLAB.
|
|
||||||
% * \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% *
|
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
|
||||||
% * Satellite Systems receiver
|
|
||||||
% *
|
|
||||||
% * This file is part of GNSS-SDR.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
|
||||||
% * it under the terms of the GNU General Public License as published by
|
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
|
||||||
% * at your option) any later version.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
% * GNU General Public License for more details.
|
|
||||||
% *
|
|
||||||
% * You should have received a copy of the GNU General Public License
|
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
% *
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
function [GNSS_tracking] = glonass_ca_dll_pll_read_tracking_dump (filename, count)
|
|
||||||
|
|
||||||
%% usage: gps_l1_ca_dll_pll_read_tracking_dump_64bits (filename, [count])
|
|
||||||
%%
|
|
||||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
|
||||||
%%
|
|
||||||
|
|
||||||
narginchk (1,2);
|
|
||||||
num_float_vars=5;
|
|
||||||
num_unsigned_long_int_vars=1;
|
|
||||||
num_double_vars=11;
|
|
||||||
num_unsigned_int_vars=1;
|
|
||||||
double_size_bytes=8;
|
|
||||||
unsigned_long_int_size_bytes=8;
|
|
||||||
float_size_bytes=4;
|
|
||||||
long_int_size_bytes=4;
|
|
||||||
|
|
||||||
skip_bytes_each_read=float_size_bytes*num_float_vars+unsigned_long_int_size_bytes*num_unsigned_long_int_vars+double_size_bytes*num_double_vars+long_int_size_bytes*num_unsigned_int_vars;
|
|
||||||
bytes_shift=0;
|
|
||||||
|
|
||||||
if (nargin < 2)
|
|
||||||
%count = Inf;
|
|
||||||
file_stats = dir(filename);
|
|
||||||
%round num bytes to read to integer number of samples (to protect the script from binary
|
|
||||||
%dump end file transitory)
|
|
||||||
count = (file_stats.bytes - mod(file_stats.bytes,skip_bytes_each_read))/skip_bytes_each_read;
|
|
||||||
end
|
|
||||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
|
||||||
f = fopen (filename, 'rb');
|
|
||||||
if (f < 0)
|
|
||||||
else
|
|
||||||
v1 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v2 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v3 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v4 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v5 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved unsigned_long_int
|
|
||||||
v6 = fread (f, count, 'uint64',skip_bytes_each_read-unsigned_long_int_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+unsigned_long_int_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v7 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v8 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v9 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v10 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v11 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v12 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v13 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v14 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v15 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v16 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v17 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
|
||||||
v18 = fread (f, count, 'uint32',skip_bytes_each_read-double_size_bytes);
|
|
||||||
fclose (f);
|
|
||||||
|
|
||||||
%%%%%%%% output vars %%%%%%%%
|
|
||||||
|
|
||||||
% // EPR
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_E), sizeof(float));
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_P), sizeof(float));
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_L), sizeof(float));
|
|
||||||
% // PROMPT I and Q (to analyze navigation symbols)
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&prompt_I), sizeof(float));
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&prompt_Q), sizeof(float));
|
|
||||||
% // PRN start sample stamp
|
|
||||||
% //tmp_float=(float)d_sample_counter;
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_sample_counter), sizeof(unsigned long int));
|
|
||||||
% // accumulated carrier phase
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_acc_carrier_phase_rad), sizeof(double));
|
|
||||||
%
|
|
||||||
% // carrier and code frequency
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_code_freq_chips), sizeof(double));
|
|
||||||
%
|
|
||||||
% //PLL commands
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&carr_phase_error_secs_Ti), sizeof(double));
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
|
||||||
%
|
|
||||||
% //DLL commands
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&code_error_chips_Ti), sizeof(double));
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&code_error_filt_chips), sizeof(double));
|
|
||||||
%
|
|
||||||
% // CN0 and carrier lock test
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_CN0_SNV_dB_Hz), sizeof(double));
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_lock_test), sizeof(double));
|
|
||||||
%
|
|
||||||
% // AUX vars (for debug purposes)
|
|
||||||
% tmp_double = d_rem_code_phase_samples;
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
|
||||||
% tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
|
||||||
% // PRN
|
|
||||||
% unsigned int prn_ = d_acquisition_gnss_synchro->PRN;
|
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&prn_), sizeof(unsigned int));
|
|
||||||
E=v1;
|
|
||||||
P=v2;
|
|
||||||
L=v3;
|
|
||||||
prompt_I=v4;
|
|
||||||
prompt_Q=v5;
|
|
||||||
PRN_start_sample=v6;
|
|
||||||
acc_carrier_phase_rad=v7;
|
|
||||||
carrier_freq_hz=v8;
|
|
||||||
code_freq_hz=v9;
|
|
||||||
carr_error=v10;
|
|
||||||
carr_nco=v11;
|
|
||||||
code_error=v12;
|
|
||||||
code_nco=v13;
|
|
||||||
CN0_SNV_dB_Hz=v14;
|
|
||||||
carrier_lock_test=v15;
|
|
||||||
var1=v16;
|
|
||||||
var2=v17;
|
|
||||||
PRN=v18;
|
|
||||||
|
|
||||||
GNSS_tracking.E=E;
|
|
||||||
GNSS_tracking.P=P;
|
|
||||||
GNSS_tracking.L=L;
|
|
||||||
GNSS_tracking.prompt_I=prompt_I;
|
|
||||||
GNSS_tracking.prompt_Q=prompt_Q;
|
|
||||||
GNSS_tracking.PRN_start_sample=PRN_start_sample;
|
|
||||||
GNSS_tracking.acc_carrier_phase_rad=acc_carrier_phase_rad;
|
|
||||||
GNSS_tracking.carrier_freq_hz=carrier_freq_hz;
|
|
||||||
GNSS_tracking.code_freq_hz=code_freq_hz;
|
|
||||||
GNSS_tracking.carr_error=carr_error;
|
|
||||||
GNSS_tracking.carr_nco=carr_nco;
|
|
||||||
GNSS_tracking.code_error=code_error;
|
|
||||||
GNSS_tracking.code_nco=code_nco;
|
|
||||||
GNSS_tracking.CN0_SNV_dB_Hz=CN0_SNV_dB_Hz;
|
|
||||||
GNSS_tracking.carrier_lock_test=carrier_lock_test;
|
|
||||||
GNSS_tracking.d_rem_code_phase_samples=var1;
|
|
||||||
GNSS_tracking.var2=var2;
|
|
||||||
GNSS_tracking.PRN=PRN;
|
|
||||||
end
|
|
||||||
|
|
@ -1,178 +0,0 @@
|
|||||||
% /*!
|
|
||||||
% * \file gps_l1_ca_dll_fll_pll_read_tracking_dump.m
|
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file into MATLAB.
|
|
||||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% *
|
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
|
||||||
% * Satellite Systems receiver
|
|
||||||
% *
|
|
||||||
% * This file is part of GNSS-SDR.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
|
||||||
% * it under the terms of the GNU General Public License as published by
|
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
|
||||||
% * at your option) any later version.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
% * GNU General Public License for more details.
|
|
||||||
% *
|
|
||||||
% * You should have received a copy of the GNU General Public License
|
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
% *
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
function [GNSS_tracking] = gps_l1_ca_dll_fll_pll_read_tracking_dump (filename, samplingFreq, count)
|
|
||||||
|
|
||||||
%% usage: gps_l1_ca_dll_fll_pll_read_tracking_dump (filename, [count])
|
|
||||||
%%
|
|
||||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
|
||||||
%%
|
|
||||||
|
|
||||||
m = nargchk (1,3,nargin);
|
|
||||||
num_float_vars=16;
|
|
||||||
num_double_vars=1;
|
|
||||||
double_size_bytes=8;
|
|
||||||
float_size_bytes=4;
|
|
||||||
skip_bytes_each_read=float_size_bytes*num_float_vars+double_size_bytes*num_double_vars;
|
|
||||||
bytes_shift=0;
|
|
||||||
if (m)
|
|
||||||
usage (m);
|
|
||||||
end
|
|
||||||
|
|
||||||
if (nargin < 3)
|
|
||||||
count = Inf;
|
|
||||||
end
|
|
||||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
|
||||||
f = fopen (filename, 'rb');
|
|
||||||
if (f < 0)
|
|
||||||
else
|
|
||||||
v1 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v2 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v3 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v4 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v5 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v6 = fread (f, count, 'uint32',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v7 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v8 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v9 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v10 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v11 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v12 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v13 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v14 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v15 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v16 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
|
||||||
v17 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
fclose (f);
|
|
||||||
|
|
||||||
%%%%%%%% output vars %%%%%%%%
|
|
||||||
|
|
||||||
% // EPR
|
|
||||||
% d_dump_file.write((char*)&tmp_E, sizeof(float));
|
|
||||||
% d_dump_file.write((char*)&tmp_P, sizeof(float));
|
|
||||||
% d_dump_file.write((char*)&tmp_L, sizeof(float));
|
|
||||||
% // PROMPT I and Q (to analyze navigation symbols)
|
|
||||||
% d_dump_file.write((char*)&prompt_I, sizeof(float));
|
|
||||||
% d_dump_file.write((char*)&prompt_Q, sizeof(float));
|
|
||||||
% // PRN start sample stamp
|
|
||||||
% //tmp_float=(float)d_sample_counter;
|
|
||||||
% d_dump_file.write((char*)&d_sample_counter, sizeof(unsigned long int));
|
|
||||||
% // accumulated carrier phase
|
|
||||||
% d_dump_file.write((char*)&d_acc_carrier_phase_rad, sizeof(float));
|
|
||||||
%
|
|
||||||
% // carrier and code frequency
|
|
||||||
% d_dump_file.write((char*)&d_carrier_doppler_hz, sizeof(float));
|
|
||||||
% d_dump_file.write((char*)&d_code_freq_hz, sizeof(float));
|
|
||||||
%
|
|
||||||
% //PLL commands
|
|
||||||
% d_dump_file.write((char*)&PLL_discriminator_hz, sizeof(float));
|
|
||||||
% d_dump_file.write((char*)&carr_nco_hz, sizeof(float));
|
|
||||||
%
|
|
||||||
% //DLL commands
|
|
||||||
% d_dump_file.write((char*)&code_error_chips, sizeof(float));
|
|
||||||
% d_dump_file.write((char*)&d_code_phase_samples, sizeof(float));
|
|
||||||
%
|
|
||||||
% // CN0 and carrier lock test
|
|
||||||
% d_dump_file.write((char*)&d_CN0_SNV_dB_Hz, sizeof(float));
|
|
||||||
% d_dump_file.write((char*)&d_carrier_lock_test, sizeof(float));
|
|
||||||
%
|
|
||||||
% // AUX vars (for debug purposes)
|
|
||||||
% tmp_float=0;
|
|
||||||
% d_dump_file.write((char*)&tmp_float, sizeof(float));
|
|
||||||
% d_dump_file.write((char*)&d_sample_counter_seconds, sizeof(double));
|
|
||||||
|
|
||||||
E=v1;
|
|
||||||
P=v2;
|
|
||||||
L=v3;
|
|
||||||
prompt_I=v4;
|
|
||||||
prompt_Q=v5;
|
|
||||||
PRN_start_sample=v6;
|
|
||||||
acc_carrier_phase_rad=v7;
|
|
||||||
carrier_doppler_hz=v8;
|
|
||||||
code_freq_hz=v9;
|
|
||||||
PLL_discriminator_hz=v10;
|
|
||||||
carr_nco_hz=v11;
|
|
||||||
code_error_chips=v12;
|
|
||||||
code_phase_samples=v13;
|
|
||||||
CN0_SNV_dB_Hz=v14;
|
|
||||||
carrier_lock_test=v15;
|
|
||||||
var1=v16;
|
|
||||||
var2=v17;
|
|
||||||
|
|
||||||
GNSS_tracking.E=E;
|
|
||||||
GNSS_tracking.P=P;
|
|
||||||
GNSS_tracking.L=L;
|
|
||||||
GNSS_tracking.prompt_I=prompt_I;
|
|
||||||
GNSS_tracking.prompt_Q=prompt_Q;
|
|
||||||
GNSS_tracking.PRN_start_sample=PRN_start_sample;
|
|
||||||
GNSS_tracking.acc_carrier_phase_rad=acc_carrier_phase_rad;
|
|
||||||
GNSS_tracking.carrier_doppler_hz=carrier_doppler_hz;
|
|
||||||
GNSS_tracking.code_freq_hz=code_freq_hz;
|
|
||||||
GNSS_tracking.PLL_discriminator_hz=PLL_discriminator_hz;
|
|
||||||
GNSS_tracking.carr_nco=carr_nco_hz;
|
|
||||||
GNSS_tracking.code_error_chips=code_error_chips;
|
|
||||||
GNSS_tracking.code_phase_samples=code_phase_samples;
|
|
||||||
GNSS_tracking.CN0_SNV_dB_Hz=CN0_SNV_dB_Hz;
|
|
||||||
GNSS_tracking.carrier_lock_test=carrier_lock_test;
|
|
||||||
GNSS_tracking.var1=var1;
|
|
||||||
GNSS_tracking.var2=var2;
|
|
||||||
GNSS_tracking.prn_delay_ms=1000*(GNSS_tracking.var2+GNSS_tracking.var1)./samplingFreq;
|
|
||||||
end
|
|
||||||
|
|
@ -1,65 +1,63 @@
|
|||||||
% /*!
|
% Usage: gps_l1_ca_dll_pll_read_tracking_dump_64bits (filename, [count])
|
||||||
% * \file gps_l1_ca_dll_pll_read_tracking_dump.m
|
%
|
||||||
% * \brief Read GNSS-SDR Tracking dump binary file into MATLAB.
|
% Opens GNSS-SDR tracking binary log file .dat and returns the contents
|
||||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
|
||||||
% * -------------------------------------------------------------------------
|
% Read GNSS-SDR Tracking dump binary file into MATLAB.
|
||||||
% *
|
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
% -------------------------------------------------------------------------
|
||||||
% *
|
%
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
% * Satellite Systems receiver
|
%
|
||||||
% *
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
% * This file is part of GNSS-SDR.
|
% Satellite Systems receiver
|
||||||
% *
|
%
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
% This file is part of GNSS-SDR.
|
||||||
% * it under the terms of the GNU General Public License as published by
|
%
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% * at your option) any later version.
|
% it under the terms of the GNU General Public License as published by
|
||||||
% *
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
% at your option) any later version.
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
%
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% * GNU General Public License for more details.
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% *
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% * You should have received a copy of the GNU General Public License
|
% GNU General Public License for more details.
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
%
|
||||||
% *
|
% You should have received a copy of the GNU General Public License
|
||||||
% * -------------------------------------------------------------------------
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% */
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
|
||||||
function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count)
|
function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count)
|
||||||
|
|
||||||
%% usage: gps_l1_ca_dll_pll_read_tracking_dump_64bits (filename, [count])
|
m = nargchk (1,2,nargin);
|
||||||
%%
|
num_float_vars=5;
|
||||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
num_unsigned_long_int_vars=1;
|
||||||
%%
|
num_double_vars=11;
|
||||||
|
num_unsigned_int_vars=1;
|
||||||
|
double_size_bytes=8;
|
||||||
|
unsigned_long_int_size_bytes=8;
|
||||||
|
float_size_bytes=4;
|
||||||
|
long_int_size_bytes=4;
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
skip_bytes_each_read=float_size_bytes*num_float_vars+unsigned_long_int_size_bytes*num_unsigned_long_int_vars+double_size_bytes*num_double_vars+long_int_size_bytes*num_unsigned_int_vars;
|
||||||
num_float_vars=5;
|
bytes_shift=0;
|
||||||
num_unsigned_long_int_vars=1;
|
if (m)
|
||||||
num_double_vars=11;
|
|
||||||
num_unsigned_int_vars=1;
|
|
||||||
double_size_bytes=8;
|
|
||||||
unsigned_long_int_size_bytes=8;
|
|
||||||
float_size_bytes=4;
|
|
||||||
long_int_size_bytes=4;
|
|
||||||
|
|
||||||
skip_bytes_each_read=float_size_bytes*num_float_vars+unsigned_long_int_size_bytes*num_unsigned_long_int_vars+double_size_bytes*num_double_vars+long_int_size_bytes*num_unsigned_int_vars;
|
|
||||||
bytes_shift=0;
|
|
||||||
if (m)
|
|
||||||
usage (m);
|
usage (m);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 2)
|
if (nargin < 2)
|
||||||
%count = Inf;
|
%count = Inf;
|
||||||
file_stats = dir(filename);
|
file_stats = dir(filename);
|
||||||
%round num bytes to read to integer number of samples (to protect the script from binary
|
%round num bytes to read to integer number of samples (to protect the script from binary
|
||||||
%dump end file transitory)
|
%dump end file transitory)
|
||||||
count = (file_stats.bytes - mod(file_stats.bytes,skip_bytes_each_read))/skip_bytes_each_read;
|
count = (file_stats.bytes - mod(file_stats.bytes,skip_bytes_each_read))/skip_bytes_each_read;
|
||||||
end
|
end
|
||||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||||
f = fopen (filename, 'rb');
|
f = fopen (filename, 'rb');
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
else
|
else
|
||||||
v1 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
v1 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
bytes_shift=bytes_shift+float_size_bytes;
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||||
@ -116,43 +114,43 @@ function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count
|
|||||||
|
|
||||||
%%%%%%%% output vars %%%%%%%%
|
%%%%%%%% output vars %%%%%%%%
|
||||||
|
|
||||||
% // EPR
|
% // EPR
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_E), sizeof(float));
|
% d_dump_file.write(reinterpret_cast<char*>(&tmp_E), sizeof(float));
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_P), sizeof(float));
|
% d_dump_file.write(reinterpret_cast<char*>(&tmp_P), sizeof(float));
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_L), sizeof(float));
|
% d_dump_file.write(reinterpret_cast<char*>(&tmp_L), sizeof(float));
|
||||||
% // PROMPT I and Q (to analyze navigation symbols)
|
% // PROMPT I and Q (to analyze navigation symbols)
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&prompt_I), sizeof(float));
|
% d_dump_file.write(reinterpret_cast<char*>(&prompt_I), sizeof(float));
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&prompt_Q), sizeof(float));
|
% d_dump_file.write(reinterpret_cast<char*>(&prompt_Q), sizeof(float));
|
||||||
% // PRN start sample stamp
|
% // PRN start sample stamp
|
||||||
% //tmp_float=(float)d_sample_counter;
|
% //tmp_float=(float)d_sample_counter;
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_sample_counter), sizeof(unsigned long int));
|
% d_dump_file.write(reinterpret_cast<char*>(&d_sample_counter), sizeof(unsigned long int));
|
||||||
% // accumulated carrier phase
|
% // accumulated carrier phase
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_acc_carrier_phase_rad), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&d_acc_carrier_phase_rad), sizeof(double));
|
||||||
%
|
%
|
||||||
% // carrier and code frequency
|
% // carrier and code frequency
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_code_freq_chips), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&d_code_freq_chips), sizeof(double));
|
||||||
%
|
%
|
||||||
% //PLL commands
|
% //PLL commands
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&carr_phase_error_secs_Ti), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&carr_phase_error_secs_Ti), sizeof(double));
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
||||||
%
|
%
|
||||||
% //DLL commands
|
% //DLL commands
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&code_error_chips_Ti), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&code_error_chips_Ti), sizeof(double));
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&code_error_filt_chips), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&code_error_filt_chips), sizeof(double));
|
||||||
%
|
%
|
||||||
% // CN0 and carrier lock test
|
% // CN0 and carrier lock test
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_CN0_SNV_dB_Hz), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&d_CN0_SNV_dB_Hz), sizeof(double));
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_lock_test), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_lock_test), sizeof(double));
|
||||||
%
|
%
|
||||||
% // AUX vars (for debug purposes)
|
% // AUX vars (for debug purposes)
|
||||||
% tmp_double = d_rem_code_phase_samples;
|
% tmp_double = d_rem_code_phase_samples;
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
||||||
% tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
% tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
||||||
% // PRN
|
% // PRN
|
||||||
% unsigned int prn_ = d_acquisition_gnss_synchro->PRN;
|
% unsigned int prn_ = d_acquisition_gnss_synchro->PRN;
|
||||||
% d_dump_file.write(reinterpret_cast<char*>(&prn_), sizeof(unsigned int));
|
% d_dump_file.write(reinterpret_cast<char*>(&prn_), sizeof(unsigned int));
|
||||||
E=v1;
|
E=v1;
|
||||||
P=v2;
|
P=v2;
|
||||||
L=v3;
|
L=v3;
|
||||||
@ -190,5 +188,5 @@ function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count
|
|||||||
GNSS_tracking.d_rem_code_phase_samples=var1;
|
GNSS_tracking.d_rem_code_phase_samples=var1;
|
||||||
GNSS_tracking.var2=var2;
|
GNSS_tracking.var2=var2;
|
||||||
GNSS_tracking.PRN=PRN;
|
GNSS_tracking.PRN=PRN;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,38 +1,39 @@
|
|||||||
% /*!
|
%
|
||||||
% * \file gps_l1_ca_pvt_read_pvt_dump.m
|
% \file gps_l1_ca_pvt_read_pvt_dump.m
|
||||||
% * \brief Read GNSS-SDR PVT lib dump binary file into MATLAB. The resulting
|
% \brief Read GNSS-SDR PVT lib dump binary file into MATLAB. The resulting
|
||||||
% structure is compatible with the K.Borre MATLAB-based receiver.
|
% structure is compatible with the K.Borre MATLAB-based receiver.
|
||||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
% \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||||
% * -------------------------------------------------------------------------
|
% -------------------------------------------------------------------------
|
||||||
% *
|
%
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
% *
|
%
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
% * Satellite Systems receiver
|
% Satellite Systems receiver
|
||||||
% *
|
%
|
||||||
% * This file is part of GNSS-SDR.
|
% This file is part of GNSS-SDR.
|
||||||
% *
|
%
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% * it under the terms of the GNU General Public License as published by
|
% it under the terms of the GNU General Public License as published by
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% * at your option) any later version.
|
% at your option) any later version.
|
||||||
% *
|
%
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% * GNU General Public License for more details.
|
% GNU General Public License for more details.
|
||||||
% *
|
%
|
||||||
% * You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% *
|
%
|
||||||
% * -------------------------------------------------------------------------
|
% -------------------------------------------------------------------------
|
||||||
% */
|
%
|
||||||
|
|
||||||
function [navSolutions] = gps_l1_ca_pvt_read_pvt_dump (filename, count)
|
function [navSolutions] = gps_l1_ca_pvt_read_pvt_dump (filename, count)
|
||||||
|
|
||||||
%% usage: gps_l1_ca_pvt_read_pvt_dump (filename, [count])
|
%% usage: gps_l1_ca_pvt_read_pvt_dump (filename, [count])
|
||||||
%%
|
%%
|
||||||
%% open GNSS-SDR PVT binary log file .dat and return the contents
|
%% open GNSS-SDR PVT binary log file .dat and return the contents
|
||||||
%%
|
%%
|
||||||
%
|
%
|
||||||
% // PVT GPS time
|
% // PVT GPS time
|
||||||
% tmp_double=GPS_current_time;
|
% tmp_double=GPS_current_time;
|
||||||
@ -59,22 +60,22 @@ function [navSolutions] = gps_l1_ca_pvt_read_pvt_dump (filename, count)
|
|||||||
% tmp_double=d_height_m;
|
% tmp_double=d_height_m;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
m = nargchk (1,2,nargin);
|
||||||
num_double_vars=8;
|
num_double_vars=8;
|
||||||
double_size_bytes=8;
|
double_size_bytes=8;
|
||||||
skip_bytes_each_read=double_size_bytes*num_double_vars;
|
skip_bytes_each_read=double_size_bytes*num_double_vars;
|
||||||
bytes_shift=0;
|
bytes_shift=0;
|
||||||
if (m)
|
if (m)
|
||||||
usage (m);
|
usage (m);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 3)
|
if (nargin < 3)
|
||||||
count = Inf;
|
count = Inf;
|
||||||
end
|
end
|
||||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||||
f = fopen (filename, 'rb');
|
f = fopen (filename, 'rb');
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
else
|
else
|
||||||
GPS_current_time = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
GPS_current_time = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
bytes_shift=bytes_shift+double_size_bytes;
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||||
@ -100,15 +101,14 @@ function [navSolutions] = gps_l1_ca_pvt_read_pvt_dump (filename, count)
|
|||||||
bytes_shift=bytes_shift+double_size_bytes;
|
bytes_shift=bytes_shift+double_size_bytes;
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||||
fclose (f);
|
fclose (f);
|
||||||
end
|
end
|
||||||
|
|
||||||
navSolutions.X=ECEF_X.';
|
|
||||||
navSolutions.Y=ECEF_Y.';
|
|
||||||
navSolutions.Z=ECEF_Z.';
|
|
||||||
navSolutions.dt=Clock_Offset.';
|
|
||||||
navSolutions.latitude=Lat.';
|
|
||||||
navSolutions.longitude=Long.';
|
|
||||||
navSolutions.height=Height.';
|
|
||||||
navSolutions.TransmitTime=GPS_current_time.';
|
|
||||||
|
|
||||||
|
navSolutions.X=ECEF_X.';
|
||||||
|
navSolutions.Y=ECEF_Y.';
|
||||||
|
navSolutions.Z=ECEF_Z.';
|
||||||
|
navSolutions.dt=Clock_Offset.';
|
||||||
|
navSolutions.latitude=Lat.';
|
||||||
|
navSolutions.longitude=Long.';
|
||||||
|
navSolutions.height=Height.';
|
||||||
|
navSolutions.TransmitTime=GPS_current_time.';
|
||||||
|
|
@ -1,27 +1,52 @@
|
|||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
% Javier Arribas 2011
|
% Javier Arribas 2011
|
||||||
|
|
||||||
function [pvt_raw] = gps_l1_ca_read_pvt_raw_dump (channels, filename, count)
|
function [pvt_raw] = gps_l1_ca_read_pvt_raw_dump (channels, filename, count)
|
||||||
|
|
||||||
%% usage: read_tracking_dat (filename, [count])
|
%% usage: read_tracking_dat (filename, [count])
|
||||||
%%
|
%%
|
||||||
%% open GNSS-SDR pvt binary log file .dat and return the contents
|
%% open GNSS-SDR pvt binary log file .dat and return the contents
|
||||||
%%
|
%%
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
m = nargchk (1,2,nargin);
|
||||||
num_double_vars=3;
|
num_double_vars=3;
|
||||||
double_size_bytes=8;
|
double_size_bytes=8;
|
||||||
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
||||||
bytes_shift=0;
|
bytes_shift=0;
|
||||||
if (m)
|
if (m)
|
||||||
usage (m);
|
usage (m);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 3)
|
if (nargin < 3)
|
||||||
count = Inf;
|
count = Inf;
|
||||||
end
|
end
|
||||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||||
f = fopen (filename, 'rb');
|
f = fopen (filename, 'rb');
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
else
|
else
|
||||||
for N=1:1:channels
|
for N=1:1:channels
|
||||||
pvt_raw.Pseudorange_m(N,:) = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
pvt_raw.Pseudorange_m(N,:) = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
bytes_shift=bytes_shift+double_size_bytes;
|
||||||
@ -37,13 +62,13 @@ function [pvt_raw] = gps_l1_ca_read_pvt_raw_dump (channels, filename, count)
|
|||||||
fclose (f);
|
fclose (f);
|
||||||
|
|
||||||
%%%%%%%% output vars %%%%%%%%
|
%%%%%%%% output vars %%%%%%%%
|
||||||
% for (unsigned int i=0; i<d_nchannels ; i++)
|
% for (unsigned int i=0; i<d_nchannels ; i++)
|
||||||
% {
|
% {
|
||||||
% tmp_double = in[i][0].Pseudorange_m;
|
% tmp_double = in[i][0].Pseudorange_m;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% tmp_double = in[i][0].Pseudorange_symbol_shift;
|
% tmp_double = in[i][0].Pseudorange_symbol_shift;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% d_dump_file.write((char*)&d_tx_time, sizeof(double));
|
% d_dump_file.write((char*)&d_tx_time, sizeof(double));
|
||||||
% }
|
% }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,27 +1,52 @@
|
|||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
% Javier Arribas 2011
|
% Javier Arribas 2011
|
||||||
|
|
||||||
function [telemetry] = gps_l1_ca_read_telemetry_dump (filename, count)
|
function [telemetry] = gps_l1_ca_read_telemetry_dump (filename, count)
|
||||||
|
|
||||||
%% usage: read_tracking_dat (filename, [count])
|
%% usage: read_tracking_dat (filename, [count])
|
||||||
%%
|
%%
|
||||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
||||||
%%
|
%%
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
m = nargchk (1,2,nargin);
|
||||||
num_double_vars=3;
|
num_double_vars=3;
|
||||||
double_size_bytes=8;
|
double_size_bytes=8;
|
||||||
skip_bytes_each_read=double_size_bytes*num_double_vars;
|
skip_bytes_each_read=double_size_bytes*num_double_vars;
|
||||||
bytes_shift=0;
|
bytes_shift=0;
|
||||||
if (m)
|
if (m)
|
||||||
usage (m);
|
usage (m);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 3)
|
if (nargin < 3)
|
||||||
count = Inf;
|
count = Inf;
|
||||||
end
|
end
|
||||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||||
f = fopen (filename, 'rb');
|
f = fopen (filename, 'rb');
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
else
|
else
|
||||||
telemetry.preamble_delay_ms = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
telemetry.preamble_delay_ms = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
bytes_shift=bytes_shift+double_size_bytes;
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||||
@ -35,14 +60,14 @@ function [telemetry] = gps_l1_ca_read_telemetry_dump (filename, count)
|
|||||||
fclose (f);
|
fclose (f);
|
||||||
|
|
||||||
%%%%%%%% output vars %%%%%%%%
|
%%%%%%%% output vars %%%%%%%%
|
||||||
% {
|
% {
|
||||||
% double tmp_double;
|
% double tmp_double;
|
||||||
% tmp_double = current_synchro_data.Preamble_delay_ms;
|
% tmp_double = current_synchro_data.Preamble_delay_ms;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% tmp_double = current_synchro_data.Prn_delay_ms;
|
% tmp_double = current_synchro_data.Prn_delay_ms;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% tmp_double = current_synchro_data.Preamble_symbol_counter;
|
% tmp_double = current_synchro_data.Preamble_symbol_counter;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% }
|
% }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,42 +1,8 @@
|
|||||||
% /*!
|
% Function plots variations of coordinates over time and a 3D position
|
||||||
% * \file plotNavigation.m
|
|
||||||
% * \brief
|
|
||||||
% Functions plots variations of coordinates over time and a 3D position
|
|
||||||
% plot. It plots receiver coordinates in UTM system or coordinate offsets if
|
% plot. It plots receiver coordinates in UTM system or coordinate offsets if
|
||||||
% the true UTM receiver coordinates are provided.
|
% the true UTM receiver coordinates are provided.
|
||||||
% * \author Darius Plausinaitis
|
|
||||||
% * Modified by Javier Arribas, 2011. jarribas(at)cttc.es
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% *
|
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
|
||||||
% * Satellite Systems receiver
|
|
||||||
% *
|
|
||||||
% * This file is part of GNSS-SDR.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
|
||||||
% * it under the terms of the GNU General Public License as published by
|
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
|
||||||
% * at your option) any later version.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
% * GNU General Public License for more details.
|
|
||||||
% *
|
|
||||||
% * You should have received a copy of the GNU General Public License
|
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
% *
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
|
|
||||||
function plotNavigation(navSolutions, settings,plot_skyplot)
|
|
||||||
%Functions plots variations of coordinates over time and a 3D position
|
|
||||||
%plot. It plots receiver coordinates in UTM system or coordinate offsets if
|
|
||||||
%the true UTM receiver coordinates are provided.
|
|
||||||
%
|
%
|
||||||
%plotNavigation(navSolutions, settings)
|
% plotNavigation(navSolutions, settings)
|
||||||
%
|
%
|
||||||
% Inputs:
|
% Inputs:
|
||||||
% navSolutions - Results from navigation solution function. It
|
% navSolutions - Results from navigation solution function. It
|
||||||
@ -47,6 +13,36 @@ function plotNavigation(navSolutions, settings,plot_skyplot)
|
|||||||
% plot_skyplot - If ==1 then use satellite coordinates to plot the
|
% plot_skyplot - If ==1 then use satellite coordinates to plot the
|
||||||
% the satellite positions
|
% the satellite positions
|
||||||
|
|
||||||
|
% Darius Plausinaitis
|
||||||
|
% Modified by Javier Arribas, 2011. jarribas(at)cttc.es
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
|
||||||
|
function plotNavigation(navSolutions, settings,plot_skyplot)
|
||||||
|
|
||||||
|
|
||||||
%% Plot results in the necessary data exists ==============================
|
%% Plot results in the necessary data exists ==============================
|
||||||
if (~isempty(navSolutions))
|
if (~isempty(navSolutions))
|
||||||
|
|
||||||
@ -67,11 +63,11 @@ if (~isempty(navSolutions))
|
|||||||
meanLatitude = dms2mat(deg2dms(...
|
meanLatitude = dms2mat(deg2dms(...
|
||||||
mean(navSolutions.latitude(~isnan(navSolutions.latitude)))), -5);
|
mean(navSolutions.latitude(~isnan(navSolutions.latitude)))), -5);
|
||||||
|
|
||||||
LatLong_str=[num2str(meanLatitude(1)), 'º', ...
|
LatLong_str=[num2str(meanLatitude(1)), '??', ...
|
||||||
num2str(meanLatitude(2)), '''', ...
|
num2str(meanLatitude(2)), '''', ...
|
||||||
num2str(meanLatitude(3)), '''''', ...
|
num2str(meanLatitude(3)), '''''', ...
|
||||||
',', ...
|
',', ...
|
||||||
num2str(meanLongitude(1)), 'º', ...
|
num2str(meanLongitude(1)), '??', ...
|
||||||
num2str(meanLongitude(2)), '''', ...
|
num2str(meanLongitude(2)), '''', ...
|
||||||
num2str(meanLongitude(3)), '''''']
|
num2str(meanLongitude(3)), '''''']
|
||||||
|
|
||||||
@ -118,7 +114,7 @@ if (~isempty(navSolutions))
|
|||||||
handles(3, 1) = subplot(4, 2, [5, 7]);
|
handles(3, 1) = subplot(4, 2, [5, 7]);
|
||||||
handles(3, 2) = subplot(4, 2, [6, 8]);
|
handles(3, 2) = subplot(4, 2, [6, 8]);
|
||||||
|
|
||||||
%% Plot all figures =======================================================
|
%% Plot all figures =======================================================
|
||||||
|
|
||||||
%--- Coordinate differences in UTM system -----------------------------
|
%--- Coordinate differences in UTM system -----------------------------
|
||||||
plot(handles(1, 1), [(navSolutions.E - refCoord.E)', ...
|
plot(handles(1, 1), [(navSolutions.E - refCoord.E)', ...
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
function plotTracking(channelList, trackResults, settings)
|
function plotTracking(channelList, trackResults, settings)
|
||||||
%This function plots the tracking results for the given channel list.
|
% This function plots the tracking results for the given channel list.
|
||||||
%
|
%
|
||||||
%plotTracking(channelList, trackResults, settings)
|
% plotTracking(channelList, trackResults, settings)
|
||||||
%
|
%
|
||||||
% Inputs:
|
% Inputs:
|
||||||
% channelList - list of channels to be plotted.
|
% channelList - list of channels to be plotted.
|
||||||
@ -30,8 +30,6 @@ function plotTracking(channelList, trackResults, settings)
|
|||||||
%USA.
|
%USA.
|
||||||
%--------------------------------------------------------------------------
|
%--------------------------------------------------------------------------
|
||||||
|
|
||||||
%CVS record:
|
|
||||||
%$Id: plotTracking.m,v 1.5.2.23 2006/08/14 14:45:14 dpl Exp $
|
|
||||||
|
|
||||||
% Protection - if the list contains incorrect channel numbers
|
% Protection - if the list contains incorrect channel numbers
|
||||||
channelList = intersect(channelList, 1:settings.numberOfChannels);
|
channelList = intersect(channelList, 1:settings.numberOfChannels);
|
||||||
@ -39,7 +37,7 @@ channelList = intersect(channelList, 1:settings.numberOfChannels);
|
|||||||
%=== For all listed channels ==============================================
|
%=== For all listed channels ==============================================
|
||||||
for channelNr = channelList
|
for channelNr = channelList
|
||||||
|
|
||||||
%% Select (or create) and clear the figure ================================
|
%% Select (or create) and clear the figure ================================
|
||||||
% The number 200 is added just for more convenient handling of the open
|
% The number 200 is added just for more convenient handling of the open
|
||||||
% figure windows, when many figures are closed and reopened.
|
% figure windows, when many figures are closed and reopened.
|
||||||
% Figures drawn or opened by the user, will not be "overwritten" by
|
% Figures drawn or opened by the user, will not be "overwritten" by
|
||||||
@ -52,7 +50,7 @@ for channelNr = channelList
|
|||||||
num2str(trackResults(channelNr).PRN(end-1)), ...
|
num2str(trackResults(channelNr).PRN(end-1)), ...
|
||||||
') results']);
|
') results']);
|
||||||
|
|
||||||
%% Draw axes ==============================================================
|
%% Draw axes ==============================================================
|
||||||
% Row 1
|
% Row 1
|
||||||
handles(1, 1) = subplot(4, 3, 1);
|
handles(1, 1) = subplot(4, 3, 1);
|
||||||
handles(1, 2) = subplot(4, 3, [2 3]);
|
handles(1, 2) = subplot(4, 3, [2 3]);
|
||||||
@ -69,7 +67,7 @@ for channelNr = channelList
|
|||||||
handles(4, 3) = subplot(4, 3, 12);
|
handles(4, 3) = subplot(4, 3, 12);
|
||||||
|
|
||||||
|
|
||||||
%% Plot all figures =======================================================
|
%% Plot all figures =======================================================
|
||||||
|
|
||||||
timeAxisInSeconds = (1:settings.msToProcess)/1000;
|
timeAxisInSeconds = (1:settings.msToProcess)/1000;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
function plotVEMLTracking(channelList, trackResults, settings)
|
function plotVEMLTracking(channelList, trackResults, settings)
|
||||||
%This function plots the tracking results for the given channel list.
|
% This function plots the tracking results for the given channel list.
|
||||||
%
|
%
|
||||||
%plotTracking(channelList, trackResults, settings)
|
% plotTracking(channelList, trackResults, settings)
|
||||||
%
|
%
|
||||||
% Inputs:
|
% Inputs:
|
||||||
% channelList - list of channels to be plotted.
|
% channelList - list of channels to be plotted.
|
||||||
@ -30,16 +30,13 @@ function plotVEMLTracking(channelList, trackResults, settings)
|
|||||||
%USA.
|
%USA.
|
||||||
%--------------------------------------------------------------------------
|
%--------------------------------------------------------------------------
|
||||||
|
|
||||||
%CVS record:
|
|
||||||
%$Id: plotTracking.m,v 1.5.2.23 2006/08/14 14:45:14 dpl Exp $
|
|
||||||
|
|
||||||
% Protection - if the list contains incorrect channel numbers
|
% Protection - if the list contains incorrect channel numbers
|
||||||
channelList = intersect(channelList, 1:settings.numberOfChannels);
|
channelList = intersect(channelList, 1:settings.numberOfChannels);
|
||||||
|
|
||||||
%=== For all listed channels ==============================================
|
%=== For all listed channels ==============================================
|
||||||
for channelNr = channelList
|
for channelNr = channelList
|
||||||
|
|
||||||
%% Select (or create) and clear the figure ================================
|
%% Select (or create) and clear the figure ================================
|
||||||
% The number 200 is added just for more convenient handling of the open
|
% The number 200 is added just for more convenient handling of the open
|
||||||
% figure windows, when many figures are closed and reopened.
|
% figure windows, when many figures are closed and reopened.
|
||||||
% Figures drawn or opened by the user, will not be "overwritten" by
|
% Figures drawn or opened by the user, will not be "overwritten" by
|
||||||
@ -52,7 +49,7 @@ for channelNr = channelList
|
|||||||
num2str(trackResults(channelNr).PRN(end-1)), ...
|
num2str(trackResults(channelNr).PRN(end-1)), ...
|
||||||
') results']);
|
') results']);
|
||||||
|
|
||||||
%% Draw axes ==============================================================
|
%% Draw axes ==============================================================
|
||||||
% Row 1
|
% Row 1
|
||||||
handles(1, 1) = subplot(3, 3, 1);
|
handles(1, 1) = subplot(3, 3, 1);
|
||||||
handles(1, 2) = subplot(3, 3, [2 3]);
|
handles(1, 2) = subplot(3, 3, [2 3]);
|
||||||
@ -64,7 +61,7 @@ for channelNr = channelList
|
|||||||
handles(3, 2) = subplot(3, 3, 8);
|
handles(3, 2) = subplot(3, 3, 8);
|
||||||
handles(3, 3) = subplot(3, 3, 9);
|
handles(3, 3) = subplot(3, 3, 9);
|
||||||
|
|
||||||
%% Plot all figures =======================================================
|
%% Plot all figures =======================================================
|
||||||
|
|
||||||
timeAxisInSeconds = (1:4:settings.msToProcess)/1000;
|
timeAxisInSeconds = (1:4:settings.msToProcess)/1000;
|
||||||
|
|
||||||
|
@ -1,50 +1,54 @@
|
|||||||
|
% Usage: read_complex_binary (filename, [count], [start_sample])
|
||||||
%
|
%
|
||||||
% Copyright 2001 Free Software Foundation, Inc.
|
% Opens filename and returns the contents as a column vector,
|
||||||
|
% treating them as 32 bit complex numbers
|
||||||
%
|
%
|
||||||
% This file is part of GNU Radio
|
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
% GNU Radio is free software; you can redistribute it and/or modify
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% it under the terms of the GNU General Public License as published by
|
% it under the terms of the GNU General Public License as published by
|
||||||
% the Free Software Foundation; either version 3, or (at your option)
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% any later version.
|
% at your option) any later version.
|
||||||
%
|
%
|
||||||
% GNU Radio is distributed in the hope that it will be useful,
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% GNU General Public License for more details.
|
% GNU General Public License for more details.
|
||||||
%
|
%
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with GNU Radio; see the file COPYING. If not, write to
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% the Free Software Foundation, Inc., 51 Franklin Street,
|
%
|
||||||
% Boston, MA 02110-1301, USA.
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
|
|
||||||
function v = read_complex_binary (filename, count, start_sample)
|
function v = read_complex_binary (filename, count, start_sample)
|
||||||
|
|
||||||
%% usage: read_complex_binary (filename, [count], [start_sample])
|
m = nargchk (1,2,nargin);
|
||||||
%%
|
if (m)
|
||||||
%% open filename and return the contents as a column vector,
|
|
||||||
%% treating them as 32 bit complex numbers
|
|
||||||
%%
|
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
|
||||||
if (m)
|
|
||||||
%usage (m);
|
%usage (m);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 2)
|
if (nargin < 2)
|
||||||
count = Inf;
|
count = Inf;
|
||||||
start_sample=0;
|
start_sample=0;
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 3)
|
if (nargin < 3)
|
||||||
start_sample=0;
|
start_sample=0;
|
||||||
end
|
end
|
||||||
|
|
||||||
f = fopen (filename, 'rb');
|
f = fopen (filename, 'rb');
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
v = 0;
|
v = 0;
|
||||||
else
|
else
|
||||||
if (start_sample>0)
|
if (start_sample>0)
|
||||||
bytes_per_sample=4;
|
bytes_per_sample=4;
|
||||||
fseek(f,start_sample*bytes_per_sample,'bof');
|
fseek(f,start_sample*bytes_per_sample,'bof');
|
||||||
@ -54,4 +58,4 @@ function v = read_complex_binary (filename, count, start_sample)
|
|||||||
v = t(1,:) + t(2,:)*i;
|
v = t(1,:) + t(2,:)*i;
|
||||||
[r, c] = size (v);
|
[r, c] = size (v);
|
||||||
v = reshape (v, c, r);
|
v = reshape (v, c, r);
|
||||||
end
|
end
|
||||||
|
@ -1,48 +1,52 @@
|
|||||||
|
% Usage: read_complex_binary (filename, [count])
|
||||||
%
|
%
|
||||||
% Copyright 2001 Free Software Foundation, Inc.
|
% Opens filename and returns the contents as a column vector,
|
||||||
|
% treating them as 32 bit complex numbers
|
||||||
%
|
%
|
||||||
% This file is part of GNU Radio
|
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
% GNU Radio is free software; you can redistribute it and/or modify
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% it under the terms of the GNU General Public License as published by
|
% it under the terms of the GNU General Public License as published by
|
||||||
% the Free Software Foundation; either version 3, or (at your option)
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% any later version.
|
% at your option) any later version.
|
||||||
%
|
%
|
||||||
% GNU Radio is distributed in the hope that it will be useful,
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% GNU General Public License for more details.
|
% GNU General Public License for more details.
|
||||||
%
|
%
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with GNU Radio; see the file COPYING. If not, write to
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% the Free Software Foundation, Inc., 51 Franklin Street,
|
%
|
||||||
% Boston, MA 02110-1301, USA.
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
|
|
||||||
function v = read_complex_char_binary (filename, count)
|
function v = read_complex_char_binary (filename, count)
|
||||||
|
|
||||||
%% usage: read_complex_binary (filename, [count])
|
m = nargchk (1,2,nargin);
|
||||||
%%
|
if (m)
|
||||||
%% open filename and return the contents as a column vector,
|
|
||||||
%% treating them as 32 bit complex numbers
|
|
||||||
%%
|
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
|
||||||
if (m)
|
|
||||||
usage (m);
|
usage (m);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 2)
|
if (nargin < 2)
|
||||||
count = Inf;
|
count = Inf;
|
||||||
end
|
end
|
||||||
|
|
||||||
f = fopen (filename, 'rb');
|
f = fopen (filename, 'rb');
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
v = 0;
|
v = 0;
|
||||||
else
|
else
|
||||||
t = fread (f, [2, count], 'int8');
|
t = fread (f, [2, count], 'int8');
|
||||||
fclose (f);
|
fclose (f);
|
||||||
v = t(1,:) + t(2,:)*i;
|
v = t(1,:) + t(2,:)*i;
|
||||||
[r, c] = size (v);
|
[r, c] = size (v);
|
||||||
v = reshape (v, c, r);
|
v = reshape (v, c, r);
|
||||||
end
|
end
|
||||||
|
@ -1,48 +1,52 @@
|
|||||||
|
% Usage: read_complex_binary (filename, [count])
|
||||||
%
|
%
|
||||||
% Copyright 2001 Free Software Foundation, Inc.
|
% Opens filename and returns the contents as a column vector,
|
||||||
|
% treating them as 32 bit complex numbers
|
||||||
%
|
%
|
||||||
% This file is part of GNU Radio
|
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
% GNU Radio is free software; you can redistribute it and/or modify
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
% it under the terms of the GNU General Public License as published by
|
% it under the terms of the GNU General Public License as published by
|
||||||
% the Free Software Foundation; either version 3, or (at your option)
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
% any later version.
|
% at your option) any later version.
|
||||||
%
|
%
|
||||||
% GNU Radio is distributed in the hope that it will be useful,
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
% GNU General Public License for more details.
|
% GNU General Public License for more details.
|
||||||
%
|
%
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with GNU Radio; see the file COPYING. If not, write to
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
% the Free Software Foundation, Inc., 51 Franklin Street,
|
%
|
||||||
% Boston, MA 02110-1301, USA.
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
|
|
||||||
function v = read_complex_short_binary (filename, count)
|
function v = read_complex_short_binary (filename, count)
|
||||||
|
|
||||||
%% usage: read_complex_binary (filename, [count])
|
m = nargchk (1,2,nargin);
|
||||||
%%
|
if (m)
|
||||||
%% open filename and return the contents as a column vector,
|
|
||||||
%% treating them as 32 bit complex numbers
|
|
||||||
%%
|
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
|
||||||
if (m)
|
|
||||||
usage (m);
|
usage (m);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 2)
|
if (nargin < 2)
|
||||||
count = Inf;
|
count = Inf;
|
||||||
end
|
end
|
||||||
|
|
||||||
f = fopen (filename, 'rb');
|
f = fopen (filename, 'rb');
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
v = 0;
|
v = 0;
|
||||||
else
|
else
|
||||||
t = fread (f, [2, count], 'short');
|
t = fread (f, [2, count], 'short');
|
||||||
fclose (f);
|
fclose (f);
|
||||||
v = t(1,:) + t(2,:)*i;
|
v = t(1,:) + t(2,:)*i;
|
||||||
[r, c] = size (v);
|
[r, c] = size (v);
|
||||||
v = reshape (v, c, r);
|
v = reshape (v, c, r);
|
||||||
end
|
end
|
||||||
|
@ -1,27 +1,52 @@
|
|||||||
|
% Usage: read_tracking_dat (filename, [count])
|
||||||
|
%
|
||||||
|
% Opens GNSS-SDR tracking binary log file .dat and returns the contents
|
||||||
|
%
|
||||||
|
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
% Javier Arribas 2011
|
% Javier Arribas 2011
|
||||||
|
|
||||||
function [observables] = read_hybrid_observables_dump (channels, filename, count)
|
function [observables] = read_hybrid_observables_dump (channels, filename, count)
|
||||||
|
|
||||||
%% usage: read_tracking_dat (filename, [count])
|
m = nargchk (1,2,nargin);
|
||||||
%%
|
num_double_vars=7;
|
||||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
double_size_bytes=8;
|
||||||
%%
|
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
||||||
|
bytes_shift=0;
|
||||||
m = nargchk (1,2,nargin);
|
if (m)
|
||||||
num_double_vars=7;
|
|
||||||
double_size_bytes=8;
|
|
||||||
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
|
||||||
bytes_shift=0;
|
|
||||||
if (m)
|
|
||||||
usage (m);
|
usage (m);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 3)
|
if (nargin < 3)
|
||||||
count = Inf;
|
count = Inf;
|
||||||
end
|
end
|
||||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||||
f = fopen (filename, 'rb');
|
f = fopen (filename, 'rb');
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
else
|
else
|
||||||
for N=1:1:channels
|
for N=1:1:channels
|
||||||
observables.RX_time(N,:) = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
observables.RX_time(N,:) = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
bytes_shift=bytes_shift+double_size_bytes;
|
||||||
@ -49,23 +74,23 @@ function [observables] = read_hybrid_observables_dump (channels, filename, count
|
|||||||
fclose (f);
|
fclose (f);
|
||||||
|
|
||||||
%%%%%%%% output vars %%%%%%%%
|
%%%%%%%% output vars %%%%%%%%
|
||||||
% double tmp_double;
|
% double tmp_double;
|
||||||
% for (unsigned int i = 0; i < d_nchannels; i++)
|
% for (unsigned int i = 0; i < d_nchannels; i++)
|
||||||
% {
|
% {
|
||||||
% tmp_double = current_gnss_synchro[i].RX_time;
|
% tmp_double = current_gnss_synchro[i].RX_time;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% tmp_double = current_gnss_synchro[i].TOW_at_current_symbol_s;
|
% tmp_double = current_gnss_synchro[i].TOW_at_current_symbol_s;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% tmp_double = current_gnss_synchro[i].Carrier_Doppler_hz;
|
% tmp_double = current_gnss_synchro[i].Carrier_Doppler_hz;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% tmp_double = current_gnss_synchro[i].Carrier_phase_rads/GPS_TWO_PI;
|
% tmp_double = current_gnss_synchro[i].Carrier_phase_rads/GPS_TWO_PI;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% tmp_double = current_gnss_synchro[i].Pseudorange_m;
|
% tmp_double = current_gnss_synchro[i].Pseudorange_m;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% tmp_double = current_gnss_synchro[i].PRN;
|
% tmp_double = current_gnss_synchro[i].PRN;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% tmp_double = current_gnss_synchro[i].Flag_valid_pseudorange;
|
% tmp_double = current_gnss_synchro[i].Flag_valid_pseudorange;
|
||||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||||
% }
|
% }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,29 +1,54 @@
|
|||||||
|
% Usage: read_true_sim_observables_dump (filename, [count])
|
||||||
|
%
|
||||||
|
% Opens gnss-sdr-sim observables dump and reads all chennels
|
||||||
|
%
|
||||||
|
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
% Javier Arribas 2011
|
% Javier Arribas 2011
|
||||||
|
|
||||||
function [observables] = read_true_sim_observables_dump (filename, count)
|
function [observables] = read_true_sim_observables_dump (filename, count)
|
||||||
|
|
||||||
%% usage: read_true_sim_observables_dump (filename, [count])
|
m = nargchk (1,2,nargin);
|
||||||
%%
|
channels=12; %Simulator always use 12 channels
|
||||||
%% open gnss-sdr-sim observables dump and read all chennels
|
num_double_vars=7;
|
||||||
%%
|
double_size_bytes=8;
|
||||||
|
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
||||||
|
bytes_shift=0;
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
if (m)
|
||||||
channels=12; %Simulator always use 12 channels
|
|
||||||
num_double_vars=7;
|
|
||||||
double_size_bytes=8;
|
|
||||||
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
|
||||||
bytes_shift=0;
|
|
||||||
|
|
||||||
if (m)
|
|
||||||
usage (m);
|
usage (m);
|
||||||
end
|
end
|
||||||
|
|
||||||
if (nargin < 2)
|
if (nargin < 2)
|
||||||
count = Inf;
|
count = Inf;
|
||||||
end
|
end
|
||||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||||
f = fopen (filename, 'rb');
|
f = fopen (filename, 'rb');
|
||||||
if (f < 0)
|
if (f < 0)
|
||||||
else
|
else
|
||||||
for N=1:1:channels
|
for N=1:1:channels
|
||||||
observables.RX_time(N,:) = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
observables.RX_time(N,:) = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||||
bytes_shift=bytes_shift+double_size_bytes;
|
bytes_shift=bytes_shift+double_size_bytes;
|
||||||
@ -50,16 +75,16 @@ function [observables] = read_true_sim_observables_dump (filename, count)
|
|||||||
|
|
||||||
fclose (f);
|
fclose (f);
|
||||||
|
|
||||||
% %%%%%%%% output vars %%%%%%%%
|
% %%%%%%%% output vars %%%%%%%%
|
||||||
% for(int i=0;i<12;i++)
|
% for(int i=0;i<12;i++)
|
||||||
% {
|
% {
|
||||||
% d_dump_file.read((char *) &gps_time_sec[i], sizeof(double));
|
% d_dump_file.read((char *) &gps_time_sec[i], sizeof(double));
|
||||||
% d_dump_file.read((char *) &doppler_l1_hz, sizeof(double));
|
% d_dump_file.read((char *) &doppler_l1_hz, sizeof(double));
|
||||||
% d_dump_file.read((char *) &acc_carrier_phase_l1_cycles[i], sizeof(double));
|
% d_dump_file.read((char *) &acc_carrier_phase_l1_cycles[i], sizeof(double));
|
||||||
% d_dump_file.read((char *) &dist_m[i], sizeof(double));
|
% d_dump_file.read((char *) &dist_m[i], sizeof(double));
|
||||||
% d_dump_file.read((char *) &true_dist_m[i], sizeof(double));
|
% d_dump_file.read((char *) &true_dist_m[i], sizeof(double));
|
||||||
% d_dump_file.read((char *) &carrier_phase_l1_cycles[i], sizeof(double));
|
% d_dump_file.read((char *) &carrier_phase_l1_cycles[i], sizeof(double));
|
||||||
% d_dump_file.read((char *) &prn[i], sizeof(double));
|
% d_dump_file.read((char *) &prn[i], sizeof(double));
|
||||||
% }
|
% }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
function plotTracking(channelList, trackResults, settings)
|
function plotTracking(channelList, trackResults, settings)
|
||||||
%This function plots the tracking results for the given channel list.
|
% This function plots the tracking results for the given channel list.
|
||||||
%
|
%
|
||||||
%plotTracking(channelList, trackResults, settings)
|
% plotTracking(channelList, trackResults, settings)
|
||||||
%
|
%
|
||||||
% Inputs:
|
% Inputs:
|
||||||
% channelList - list of channels to be plotted.
|
% channelList - list of channels to be plotted.
|
||||||
@ -14,32 +14,29 @@ function plotTracking(channelList, trackResults, settings)
|
|||||||
% Copyright (C) Darius Plausinaitis
|
% Copyright (C) Darius Plausinaitis
|
||||||
% Written by Darius Plausinaitis
|
% Written by Darius Plausinaitis
|
||||||
%--------------------------------------------------------------------------
|
%--------------------------------------------------------------------------
|
||||||
%This program is free software; you can redistribute it and/or
|
% This program is free software; you can redistribute it and/or
|
||||||
%modify it under the terms of the GNU General Public License
|
% modify it under the terms of the GNU General Public License
|
||||||
%as published by the Free Software Foundation; either version 2
|
% as published by the Free Software Foundation; either version 2
|
||||||
%of the License, or (at your option) any later version.
|
% of the License, or (at your option) any later version.
|
||||||
%
|
%
|
||||||
%This program is distributed in the hope that it will be useful,
|
% This program is distributed in the hope that it will be useful,
|
||||||
%but WITHOUT ANY WARRANTY; without even the implied warranty of
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
%MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
%GNU General Public License for more details.
|
% GNU General Public License for more details.
|
||||||
%
|
%
|
||||||
%You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
%along with this program; if not, write to the Free Software
|
% along with this program; if not, write to the Free Software
|
||||||
%Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||||
%USA.
|
% USA.
|
||||||
%--------------------------------------------------------------------------
|
%--------------------------------------------------------------------------
|
||||||
|
|
||||||
%CVS record:
|
|
||||||
%$Id: plotTracking.m,v 1.5.2.23 2006/08/14 14:45:14 dpl Exp $
|
|
||||||
|
|
||||||
% Protection - if the list contains incorrect channel numbers
|
% Protection - if the list contains incorrect channel numbers
|
||||||
channelList = intersect(channelList, 1:settings.numberOfChannels);
|
channelList = intersect(channelList, 1:settings.numberOfChannels);
|
||||||
|
|
||||||
%=== For all listed channels ==============================================
|
%=== For all listed channels ==============================================
|
||||||
for channelNr = channelList
|
for channelNr = channelList
|
||||||
|
|
||||||
%% Select (or create) and clear the figure ================================
|
%% Select (or create) and clear the figure ================================
|
||||||
% The number 200 is added just for more convenient handling of the open
|
% The number 200 is added just for more convenient handling of the open
|
||||||
% figure windows, when many figures are closed and reopened.
|
% figure windows, when many figures are closed and reopened.
|
||||||
% Figures drawn or opened by the user, will not be "overwritten" by
|
% Figures drawn or opened by the user, will not be "overwritten" by
|
||||||
@ -52,7 +49,7 @@ for channelNr = channelList
|
|||||||
num2str(trackResults(channelNr).PRN), ...
|
num2str(trackResults(channelNr).PRN), ...
|
||||||
') results']);
|
') results']);
|
||||||
|
|
||||||
%% Draw axes ==============================================================
|
%% Draw axes ==============================================================
|
||||||
% Row 1
|
% Row 1
|
||||||
handles(1, 1) = subplot(3, 3, 1);
|
handles(1, 1) = subplot(3, 3, 1);
|
||||||
handles(1, 2) = subplot(3, 3, [2 3]);
|
handles(1, 2) = subplot(3, 3, [2 3]);
|
||||||
@ -64,7 +61,7 @@ for channelNr = channelList
|
|||||||
handles(3, 2) = subplot(3, 3, 8);
|
handles(3, 2) = subplot(3, 3, 8);
|
||||||
handles(3, 3) = subplot(3, 3, 9);
|
handles(3, 3) = subplot(3, 3, 9);
|
||||||
|
|
||||||
%% Plot all figures =======================================================
|
%% Plot all figures =======================================================
|
||||||
|
|
||||||
timeAxisInSeconds = (1:settings.msToProcess-1)/1000;
|
timeAxisInSeconds = (1:settings.msToProcess-1)/1000;
|
||||||
|
|
||||||
|
@ -1,36 +1,32 @@
|
|||||||
% /*!
|
% Reads GNSS-SDR Acquisition dump .mat file using the provided
|
||||||
% * \file plot_acq_grid.m
|
% function and plots acquisition grid of acquisition statistic of PRN sat
|
||||||
% * \brief Read GNSS-SDR Acquisition dump .mat file using the provided
|
% Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
||||||
% function and plot acquisition grid of acquisition statistic of PRN sat
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
% * \author Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% *
|
|
||||||
% * Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
|
||||||
% * Satellite Systems receiver
|
|
||||||
% *
|
|
||||||
% * This file is part of GNSS-SDR.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
|
||||||
% * it under the terms of the GNU General Public License as published by
|
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
|
||||||
% * at your option) any later version.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
% * GNU General Public License for more details.
|
|
||||||
% *
|
|
||||||
% * You should have received a copy of the GNU General Public License
|
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
% *
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
|
|
||||||
%%%%%%%%% ¡¡¡ CONFIGURE !!! %%%%%%%%%%%%%
|
%%%%%%%%% ?????? CONFIGURE !!! %%%%%%%%%%%%%
|
||||||
|
|
||||||
path = '/archive/';
|
path = '/archive/';
|
||||||
file = 'acq';
|
file = 'acq';
|
||||||
|
@ -1,37 +1,35 @@
|
|||||||
% /*!
|
% Reads GNSS-SDR Acquisition dump binary file using the provided
|
||||||
% * \file plot_acq_grid_gsoc.m
|
% function and plots acquisition grid of acquisition statistic of PRN sat
|
||||||
% * \brief Read GNSS-SDR Acquisition dump binary file using the provided
|
|
||||||
% function and plot acquisition grid of acquisition statistic of PRN sat
|
|
||||||
%
|
%
|
||||||
% This function analyzes a experiment performed by Luis Esteve in the framework
|
% This function analyzes a experiment performed by Luis Esteve in the framework
|
||||||
% of the Google Summer of Code (GSoC) 2012, with the collaboration of Javier Arribas
|
% of the Google Summer of Code (GSoC) 2012, with the collaboration of Javier Arribas
|
||||||
% and Carles Fernández, related to the extension of GNSS-SDR to Galileo.
|
% and Carles Fern??ndez, related to the extension of GNSS-SDR to Galileo.
|
||||||
|
%
|
||||||
|
% Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
% * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% *
|
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
|
||||||
% * Satellite Systems receiver
|
|
||||||
% *
|
|
||||||
% * This file is part of GNSS-SDR.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
|
||||||
% * it under the terms of the GNU General Public License as published by
|
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
|
||||||
% * at your option) any later version.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
% * GNU General Public License for more details.
|
|
||||||
% *
|
|
||||||
% * You should have received a copy of the GNU General Public License
|
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
% *
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
|
|
||||||
function plot_acq_grid_gsoc(sat)
|
function plot_acq_grid_gsoc(sat)
|
||||||
|
|
||||||
@ -61,7 +59,7 @@ for k=Doppler_min_Hz:Doppler_step_Hz:Doppler_max_Hz
|
|||||||
index=index+1;
|
index=index+1;
|
||||||
filename=['test_statistics_E_1C_sat_' num2str(sat) '_doppler_' num2str(k) '.dat'];
|
filename=['test_statistics_E_1C_sat_' num2str(sat) '_doppler_' num2str(k) '.dat'];
|
||||||
acq_grid(index,:)=abs(read_complex_binary (filename));
|
acq_grid(index,:)=abs(read_complex_binary (filename));
|
||||||
end
|
end
|
||||||
|
|
||||||
maximum_correlation_peak = max(max(acq_grid))
|
maximum_correlation_peak = max(max(acq_grid))
|
||||||
|
|
||||||
|
@ -1,39 +1,38 @@
|
|||||||
% /*!
|
% Reads GNSS-SDR Acquisition dump binary file using the provided
|
||||||
% * \file plot_acq_grid_gsoc_e5.m
|
|
||||||
% * \brief Read GNSS-SDR Acquisition dump binary file using the provided
|
|
||||||
% function and plot acquisition grid of acquisition statistic of PRN sat.
|
% function and plot acquisition grid of acquisition statistic of PRN sat.
|
||||||
% CAF input must be 0 or 1 depending if the user desires to read the file
|
% CAF input must be 0 or 1 depending if the user desires to read the file
|
||||||
% that resolves doppler ambiguity or not.
|
% that resolves doppler ambiguity or not.
|
||||||
%
|
%
|
||||||
% This function analyzes a experiment performed by Marc Sales in the framework
|
% This function analyzes a experiment performed by Marc Sales in the framework
|
||||||
% of the Google Summer of Code (GSoC) 2014, with the collaboration of Luis Esteve, Javier Arribas
|
% of the Google Summer of Code (GSoC) 2014, with the collaboration of Luis Esteve, Javier Arribas
|
||||||
% and Carles Fernández, related to the extension of GNSS-SDR to Galileo.
|
% and Carles Fernandez, related to the extension of GNSS-SDR to Galileo.
|
||||||
|
%
|
||||||
|
% Marc Sales marcsales92(at)gmail.com,
|
||||||
|
% Luis Esteve, 2014. luis(at)epsilon-formacion.com
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
% * \author Marc Sales marcsales92(at)gmail.com, Luis Esteve, 2014. luis(at)epsilon-formacion.com
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% *
|
|
||||||
% * Copyright (C) 2010-2014 (see AUTHORS file for a list of contributors)
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
|
||||||
% * Satellite Systems receiver
|
|
||||||
% *
|
|
||||||
% * This file is part of GNSS-SDR.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
|
||||||
% * it under the terms of the GNU General Public License as published by
|
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
|
||||||
% * at your option) any later version.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
% * GNU General Public License for more details.
|
|
||||||
% *
|
|
||||||
% * You should have received a copy of the GNU General Public License
|
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
% *
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
|
|
||||||
function plot_acq_grid_gsoc_e5(sat,CAF)
|
function plot_acq_grid_gsoc_e5(sat,CAF)
|
||||||
|
|
||||||
|
@ -1,37 +1,34 @@
|
|||||||
% /*!
|
% Reads GNSS-SDR Acquisition dump binary file using the provided
|
||||||
% * \file plot_acq_grid_gsoc.m
|
% function and plots acquisition grid of acquisition statistic of PRN sat
|
||||||
% * \brief Read GNSS-SDR Acquisition dump binary file using the provided
|
|
||||||
% function and plot acquisition grid of acquisition statistic of PRN sat
|
|
||||||
%
|
%
|
||||||
% This function analyzes a experiment performed by Luis Esteve in the framework
|
% This function analyzes a experiment performed by Luis Esteve in the framework
|
||||||
% of the Google Summer of Code (GSoC) 2012, with the collaboration of Javier Arribas
|
% of the Google Summer of Code (GSoC) 2012, with the collaboration of Javier Arribas
|
||||||
% and Carles Fernández, related to the extension of GNSS-SDR to Galileo.
|
% and Carles Fernandez, related to the extension of GNSS-SDR to Galileo.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
%
|
||||||
|
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
%
|
||||||
|
% GNSS-SDR is a software defined Global Navigation
|
||||||
|
% Satellite Systems receiver
|
||||||
|
%
|
||||||
|
% This file is part of GNSS-SDR.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
% it under the terms of the GNU General Public License as published by
|
||||||
|
% the Free Software Foundation, either version 3 of the License, or
|
||||||
|
% at your option) any later version.
|
||||||
|
%
|
||||||
|
% GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
% GNU General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU General Public License
|
||||||
|
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
% * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% *
|
|
||||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is a software defined Global Navigation
|
|
||||||
% * Satellite Systems receiver
|
|
||||||
% *
|
|
||||||
% * This file is part of GNSS-SDR.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is free software: you can redistribute it and/or modify
|
|
||||||
% * it under the terms of the GNU General Public License as published by
|
|
||||||
% * the Free Software Foundation, either version 3 of the License, or
|
|
||||||
% * at your option) any later version.
|
|
||||||
% *
|
|
||||||
% * GNSS-SDR is distributed in the hope that it will be useful,
|
|
||||||
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
% * GNU General Public License for more details.
|
|
||||||
% *
|
|
||||||
% * You should have received a copy of the GNU General Public License
|
|
||||||
% * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
% *
|
|
||||||
% * -------------------------------------------------------------------------
|
|
||||||
% */
|
|
||||||
|
|
||||||
function plot_acq_grid_gsoc_glonass(sat)
|
function plot_acq_grid_gsoc_glonass(sat)
|
||||||
|
|
||||||
@ -62,9 +59,9 @@ for k=Doppler_min_Hz:Doppler_step_Hz:Doppler_max_Hz
|
|||||||
index=index+1;
|
index=index+1;
|
||||||
filename=['acquisition_R_1G_sat_' num2str(sat) '_doppler_' num2str(k) '.dat'];
|
filename=['acquisition_R_1G_sat_' num2str(sat) '_doppler_' num2str(k) '.dat'];
|
||||||
acq_grid(index,:)=abs(read_complex_binary (filename));
|
acq_grid(index,:)=abs(read_complex_binary (filename));
|
||||||
end
|
end
|
||||||
|
|
||||||
acq_grid = acq_grid.^2;
|
acq_grid = acq_grid.^2;
|
||||||
|
|
||||||
maximum_correlation_peak = max(max(acq_grid))
|
maximum_correlation_peak = max(max(acq_grid))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user