SNACS requires a structured configuration file which defines all parameters necessary for performing the simulation. The following sections explain SNACS's configuration file and its command line parameters .
SNACS uses libconfig to read the configuration file. The detailed syntax can be found at http://www.hyperrealm.com/libconfig/.
The syntax of the configuration file is C-like, for example, every line has to end with a semicolon. Comments until the end of the line can be done with
//
and block-wise with
/* ... */
.
The general form of a configuration file is
Simulation: { <simulation parameters common to all snBlocks> ... SNBlocks = ( <definition of snBlocks> ); }; Plotting: { <parameters for plotting> };
SamplingFrequency:
sampling frequency in Hzc0:
speed of light in m/sSignalLength:
total simulation length in sIntermediateFrequency:
intermediate frequency in HzConcBufSize:
size of conbuf block in sresult_directory:
directory name where the result files will be saved (string)append_date_to_outdir: false|true
: if true, the date and time in the format YYYY-MM-DD_HH-MM-SS will be appended to the result_directory
nameUpdateInterval
: time interval at which the display is being updated in msPlotXSize
: amount of samples to be plottet per plot. format: long, e.g. 2000L
This snblock generates a C/A code GPS signal.
Type = "snSignalGenerateGPS";
SignalType = "C/A". Until now, only C/A code signal is supported
PRN:
number of PRN to be generated.
Type = "snLowPassFilter";
Order:
filter order.CutOffFrequency:
cut-off frequency.Type = "snChannel";
File:
HDF5 input file. Structure as defined in HDF5 channel impulse response input file structureinterpolation_frequency:
interpolation bandwidth for the sin(x)/x interpolation of the continuous channel impulse responses to discrete FIR coefficients.Type = "snNoise";
snr_db:
carrier to noise ratio in dB.start_sec:
defines the start time at which the noise samples are being added to the source signal.Type = "snADC";
adc_bits:
amount of quantization bits. The amount of quantization steps are given by 2^(adc_bits)enable_vga = true|false
: The variable gain amplifier (VGA) detects the size of the peak sample in the current concbuf and divides all samples by its inverse. This operation normalizes all samples to the peak sample and ensures that all quantization bits are excited.vga_lowest_amplification_dB:
the lowest amplification the VGA can use in dB.vga_highest_amplification_dB:
the highest amplification the VGA can use in dB.Type = "snSDRGPS";
SignalType:
only "C/A" is supported.PRN:
PRN numberCorrFuncSamples:
amount of additional samples on correlation functionCorrFuncStart:
start here with additional correlation func samples in chipsCorrFuncDist:
distance between correlation function samples in chipsWriteCorrFunc:
?enable_aquisition = true|false;
If enable_aquisition is set to false, StartSample
must be defined.StartSample:
The code tracking loop starts to track the signal starting with this sample.Plot3D = true|false
: defines if a window with a 3D-graph of the aquisition result should be opened.Length:
aquisition length in seconds.aq_freq_band:
the bandwidth in Hertz around which the aquisition is performedaq_freq_step:
the frequency steps in Hertz for the aquisition searchThreshold:
the smallest ration of the highest to the lowest peak in the aquisition search space for which aquisition successful is declared.enable_tracking = true|false;
CorrelationLength:
Correlation length in secondsDLL parameter section:
DiscriminatorType:
early minus late ("EML") and dot-product ("DP") are possible choicesEarlyLateSpacing:
the early late spacing in chipsDampingRatio:
the DLL damping ratioNoiseBandwidth:
the DLL noise bandwidthPLL parameter section:
DampingRatio:
the PLL damping ratioNoiseBandwidth:
the PLL noise bandwidth
Simulation: { SamplingFrequency = 40e6; // Hz c0 = 2.99e8; SignalLength = 10.0; // s IntermediateFrequency = 15e6; // Hz ConcBufSize = 0.001; // in s result_directory = "Result"; append_date_to_outdir = true; SNSets = ( { Title = "Signal Generation"; }, { Title = "Software Defined Receiver"; } ); SNBlocks = ( { Type = "snSignalGenerateGPS"; SNSet = 0; SignalType = "C/A"; PRN = 10; }, { Type = "snLowPassFilter"; Order = 64; CutOffFrequency = 10.23e6; SNSet = 0; }, { Type = "snChannel"; SNSet = 0; File = "/home/fschubert/CIRs/DLRLMS_test7.h5"; interpolation_bandwidth = 10.23e6; }, { Type = "snNoise"; SNSet = 0; snr_db = 45.0; start_sec = 0.0; }, { Type = "snADC"; SNSet = 0; adc_bits = 3; enable_agc = true; agc_lowest_amplification_dB = -6.0; agc_highest_amplification_dB = 42.5; }, { Type = "snSDRGPS"; SNSet = 1; SignalType = "C/A"; PRN = 10; CorrFuncSamples = 13; // amount of additional samples on correlation function CorrFuncStart = -1.5; // start here with additional corr func samples in chips CorrFuncDist = 0.25; // distance between corr func samples in chips WriteCorrFunc = false; DoGPSAquisition = false; StartSample = 10; Aquisition: { SNSet = 1; Plot3D = true; Length = 1e-3; aq_freq_band = 10000.0; // Hz aq_freq_step = 250.0; // Hz Threshold = 1.5; }; DoGPSTracking = true; Tracking: { SNSet = 1; CorrelationLength = 0.001; DLL: { DiscriminatorType = "EML"; EarlyLateSpacing = 1.0; DampingRatio = 0.707; NoiseBandwidth = 5.0; }; PLL: { DampingRatio = 0.707; NoiseBandwidth = 25.0; }; }; } ); // end SNBlocks }; // end Simulation Plotting: { UpdateInterval = 5000; // ms PlotXSize = 512L; // samples to be plottet. format: long (L) };
-f file
: read configuration from file-s
: start simulation after loading configuration file-d x
: set debug level to x