Example 02 - More Advanced Configuration File

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:

example-02-screenshot.png
SNACS screenshot of example 02

You can use the MATLAB script plot_snacs_results_example02.m to plots the results:

snacs-result_example02.png
SNACS simulation result of Example 02

This is the complete SNACS configuration file:

1 /*
2  * Example configuration file for
3  *
4  * SNACS - The Satellite Navigation Radio Channel Simulator
5  *
6  * example_02_gps.cfg
7  *
8  * Demonstration of a SNACS simulation with GPS signal generation
9  * and tracking loops.
10  *
11  * Copyright (C) 2010 F. M. Schubert
12  *
13  */
14 
15 Simulation:
16 {
17  sampling_frequency = 40e6; // Hz
18  c0 = 2.99e8;
19  length = 5.0; // s
20 
21  conc_buf_length = 0.001; // in s
22  buffers_per_concbuf = 16;
23 
24  result_directory = "/tmp/snacs-result_example02";
25  append_date_to_outdir = false;
26 
27  SNBlocks = (
28 
29  { Type = "snSignalGenerate";
30  start = 0.0001;
31  signal = {
32  inphase = {
33  code = "C/A";
34  prn = 1;
35  modulation = "BPSK(n)";
36  n = 1.0;
37  data_type = "none";
38  };
39  };
40  },
41 
42  { Type = "snLowPassFilter";
43  coefficients_type = "remez";
44  order = 64;
45  cut_off_frequency = 10.23e6;
46  },
47 
48  { Type = "snNoise";
49  seed_type = "time";
50  snr_db = 50.0;
51  start_sec = 1.0;
52  },
53 
54  { Type = "snADC";
55  intermediate_frequency = 15e6; // Hz
56  adc_enable = true;
57  adc_bits = 3;
58  vga_enable = true;
59  vga_lowest_amplification_dB = -6.0;
60  vga_highest_amplification_dB = 42.5;
61  },
62 
63  { Type = "snSDRStandard";
64  signal = {
65  inphase = {
66  code = "C/A";
67  prn = 1;
68  modulation = "BPSK(n)";
69  n = 1.0;
70  data_type = "none";
71  };
72  };
73 
74  intermediate_frequency = 15e6; // Hz
75  aquisition_enable = true;
76 
77  Aquisition:
78  {
79  plot_3d = true;
80  length = 1e-3;
81  aq_freq_band = 10000.0; // Hz
82  aq_freq_step = 250.0; // Hz
83  threshold = 1.5;
84  };
85 
86  tracking_enable = true;
87  Tracking:
88  {
89  DLL:
90  {
91  discriminator_type = "EML";
92  correlation_length = 0.001;
93  early_late_spacing = .5;
94  damping_ratio = 0.707;
95  noise_bandwidth = 5.0;
96 
97  corr_func_samples = 13; // amount of additional samples on correlation function
98  corr_func_start = -1.5; // start here with additional corr func samples in chips
99  corr_func_dist = 0.25; // distance between corr func samples in chips
100 
101  write_corr_func = false;
102  };
103  PLL:
104  {
105  damping_ratio = 0.707;
106  noise_bandwidth = 25.0;
107  };
108  };
109  }
110 
111  ); // end SNBlocks
112 }; // end Simulation
113 
114 Plotting:
115 {
116  UpdateInterval = 1000; // ms
117  PlotXSize = 512L; // pixel to be plottet. format: long (L)
118  plot_buffer_length = 0.0001; // s
119 };
120