mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-09-30 08:32:24 +00:00
Fixed gps l1 ca tracking dump Matlab reader
This commit is contained in:
@@ -34,11 +34,15 @@ function [GNSS_tracking] = gps_l1_ca_dll_fll_pll_read_tracking_dump (filename, s
|
|||||||
%%
|
%%
|
||||||
|
|
||||||
m = nargchk (1,3,nargin);
|
m = nargchk (1,3,nargin);
|
||||||
num_float_vars=16;
|
num_float_vars=15;
|
||||||
num_double_vars=1;
|
num_double_vars=1;
|
||||||
double_size_bytes=8;
|
double_size_bytes=8;
|
||||||
float_size_bytes=4;
|
float_size_bytes=4;
|
||||||
skip_bytes_each_read=float_size_bytes*num_float_vars+double_size_bytes*num_double_vars;
|
unsigned_long_int_size_bytes=8;
|
||||||
|
num_unsigned_long_int_vars = 1;
|
||||||
|
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;
|
||||||
bytes_shift=0;
|
bytes_shift=0;
|
||||||
if (m)
|
if (m)
|
||||||
usage (m);
|
usage (m);
|
||||||
@@ -66,8 +70,8 @@ function [GNSS_tracking] = gps_l1_ca_dll_fll_pll_read_tracking_dump (filename, s
|
|||||||
v5 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
v5 = 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
|
||||||
v6 = fread (f, count, 'uint32',skip_bytes_each_read-float_size_bytes);
|
v6 = fread (f, count, 'uint64',skip_bytes_each_read-unsigned_long_int_size_bytes);
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
bytes_shift=bytes_shift+unsigned_long_int_size_bytes;
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||||
v7 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
v7 = 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;
|
||||||
|
@@ -34,11 +34,14 @@ function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count
|
|||||||
%%
|
%%
|
||||||
|
|
||||||
m = nargchk (1,2,nargin);
|
m = nargchk (1,2,nargin);
|
||||||
num_float_vars=16;
|
num_float_vars=15;
|
||||||
num_double_vars=2;
|
num_double_vars=1;
|
||||||
|
num_long_int=1;
|
||||||
double_size_bytes=8;
|
double_size_bytes=8;
|
||||||
float_size_bytes=4;
|
float_size_bytes=4;
|
||||||
skip_bytes_each_read=float_size_bytes*num_float_vars+double_size_bytes*num_double_vars;
|
long_int_size_bytes=8;
|
||||||
|
skip_bytes_each_read=float_size_bytes*num_float_vars+double_size_bytes*num_double_vars + ...
|
||||||
|
num_long_int*long_int_size_bytes;
|
||||||
bytes_shift=0;
|
bytes_shift=0;
|
||||||
if (m)
|
if (m)
|
||||||
usage (m);
|
usage (m);
|
||||||
@@ -66,8 +69,8 @@ function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count
|
|||||||
v5 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
v5 = 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
|
||||||
v6 = fread (f, count, 'uint32',skip_bytes_each_read-float_size_bytes);
|
v6 = fread (f, count, 'uint64',skip_bytes_each_read-long_int_size_bytes);
|
||||||
bytes_shift=bytes_shift+float_size_bytes;
|
bytes_shift=bytes_shift+long_int_size_bytes;
|
||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||||
v7 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
v7 = 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;
|
||||||
@@ -101,8 +104,6 @@ function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count
|
|||||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||||
v17 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
v17 = 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 float
|
|
||||||
v18 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
|
||||||
fclose (f);
|
fclose (f);
|
||||||
|
|
||||||
%%%%%%%% output vars %%%%%%%%
|
%%%%%%%% output vars %%%%%%%%
|
||||||
@@ -158,7 +159,6 @@ function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count
|
|||||||
carrier_lock_test=v15;
|
carrier_lock_test=v15;
|
||||||
var1=v16;
|
var1=v16;
|
||||||
var2=v17;
|
var2=v17;
|
||||||
var3=v18;
|
|
||||||
|
|
||||||
GNSS_tracking.E=E;
|
GNSS_tracking.E=E;
|
||||||
GNSS_tracking.P=P;
|
GNSS_tracking.P=P;
|
||||||
@@ -177,6 +177,5 @@ function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count
|
|||||||
GNSS_tracking.carrier_lock_test=carrier_lock_test;
|
GNSS_tracking.carrier_lock_test=carrier_lock_test;
|
||||||
GNSS_tracking.var1=var1;
|
GNSS_tracking.var1=var1;
|
||||||
GNSS_tracking.var2=var2;
|
GNSS_tracking.var2=var2;
|
||||||
GNSS_tracking.var3=var3;
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user