This example shows a real simulation of a GPS signal generation and a software receiver tracking loop. The configuration file incorporates the following modules: "snSignalGenerate", "snLowPassFilter", "snNoise", "snADC", and "snSDRGPS".
The signal is defined as
signal = {
inphase = {
code = "C/A";
prn = 1;
modulation = "BPSK(n)";
n = 1.0;
data_type = "none";
data_bps = 50.0;
};
};
The same signal is defined for both signal generation and tracking. The configuration file example_02_gps.cfg is printed at the end of this page.
You can start it by running
cd snacs/trunk/release
./SNACS-release -f ../../examples/example_02/example_02_gps.cfg
This is a screenshot of the running simulation:
SNACS screenshot of example 02
You can use the MATLAB script plot_snacs_results_example02.m to plots the results:
SNACS simulation result of Example 02
This is the complete SNACS configuration file:
17 sampling_frequency = 40e6;
21 conc_buf_length = 0.001;
22 buffers_per_concbuf = 16;
24 result_directory =
"/tmp/snacs-result_example02";
25 append_date_to_outdir =
false;
29 { Type =
"snSignalGenerate";
35 modulation =
"BPSK(n)";
42 { Type =
"snLowPassFilter";
43 coefficients_type =
"remez";
45 cut_off_frequency = 10.23e6;
55 intermediate_frequency = 15e6;
59 vga_lowest_amplification_dB = -6.0;
60 vga_highest_amplification_dB = 42.5;
63 { Type =
"snSDRStandard";
68 modulation =
"BPSK(n)";
74 intermediate_frequency = 15e6;
75 aquisition_enable =
true;
81 aq_freq_band = 10000.0;
86 tracking_enable =
true;
91 discriminator_type =
"EML";
92 correlation_length = 0.001;
93 early_late_spacing = .5;
94 damping_ratio = 0.707;
95 noise_bandwidth = 5.0;
97 corr_func_samples = 13;
98 corr_func_start = -1.5;
99 corr_func_dist = 0.25;
101 write_corr_func =
false;
105 damping_ratio = 0.707;
106 noise_bandwidth = 25.0;
116 UpdateInterval = 1000;
118 plot_buffer_length = 0.0001;