mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 11:40:33 +00:00
Changes in src/test/test_main.cc
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@158 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
parent
6fb0a2e16e
commit
69db06356a
@ -17,7 +17,7 @@ ControlThread.wait_for_flowgraph=false
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
|
||||
;#filename: path to file with the captured GNSS signal samples to be processed
|
||||
SignalSource.filename=/media/DATALOGGER/signals/Agilent GPS Generator/cap2/agilent_cap2.dat
|
||||
SignalSource.filename=/home/luis/Project/signals/cap2/agilent_cap2.dat
|
||||
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
SignalSource.item_type=gr_complex
|
||||
@ -116,7 +116,7 @@ Channel0.system=GPS
|
||||
Channel0.signal=1C
|
||||
|
||||
;#satellite: Satellite PRN ID for this channel. Disable this option to random search
|
||||
Channel0.satellite=1
|
||||
Channel0.satellite=2
|
||||
|
||||
;######### CHANNEL 1 CONFIG ############
|
||||
|
||||
@ -134,7 +134,7 @@ Channel2.satellite=21
|
||||
|
||||
Channel3.system=GPS
|
||||
Channel3.signal=1C
|
||||
Channel3.satellite=2
|
||||
Channel3.satellite=13
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
@ -176,21 +176,21 @@ Acquisition0.doppler_step=250
|
||||
|
||||
;######### ACQUISITION CH 1 CONFIG ############
|
||||
Acquisition1.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition1.threshold=70
|
||||
Acquisition1.threshold=7000
|
||||
Acquisition1.doppler_max=10000
|
||||
Acquisition1.doppler_step=250
|
||||
;Acquisition1.repeat_satellite=true
|
||||
|
||||
;######### ACQUISITION CH 2 CONFIG ############
|
||||
Acquisition2.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition2.threshold=70
|
||||
Acquisition2.threshold=7000
|
||||
Acquisition2.doppler_max=10000
|
||||
Acquisition2.doppler_step=250
|
||||
;Acquisition2.repeat_satellite=true
|
||||
|
||||
;######### ACQUISITION CH 3 CONFIG ############
|
||||
Acquisition3.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition3.threshold=70
|
||||
Acquisition3.threshold=7000
|
||||
Acquisition3.doppler_max=10000
|
||||
Acquisition3.doppler_step=250
|
||||
;Acquisition3.repeat_satellite=true
|
||||
|
@ -1,71 +0,0 @@
|
||||
|
||||
/**
|
||||
* Copyright notice
|
||||
*/
|
||||
|
||||
/**
|
||||
* Author: Carlos Avilés, 2010. carlos.avilesr(at)googlemail.com
|
||||
*/
|
||||
|
||||
/**
|
||||
* Executes a resampler based on some input parameters.
|
||||
* This is intended to check performance of resampling implementations.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <gflags/gflags.h>
|
||||
|
||||
#include <glog/log_severity.h>
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
#include <gr_top_block.h>
|
||||
#include <gr_file_source.h>
|
||||
#include <gr_null_sink.h>
|
||||
#include <gr_rational_resampler_base_ccf.h>
|
||||
#include <gr_firdes.h>
|
||||
|
||||
#include "gnss_sdr_direct_resampler_ccf.h"
|
||||
|
||||
DEFINE_string(signal_file, "signal_samples/signal.dat",
|
||||
"Path to the file containing the signal samples");
|
||||
|
||||
DEFINE_int64(fs_in, 8000000, "FS of the signal in Hz");
|
||||
DEFINE_int64(fs_out, 2048000, "FS of the resampled signal in Hz");
|
||||
|
||||
int mcd(int a, int b){
|
||||
if (a==0) return b;
|
||||
return mcd(b%a,a);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
google::InitGoogleLogging(argv[0]);
|
||||
|
||||
LOG_AT_LEVEL(INFO) << "Frequency IN " << FLAGS_fs_in;
|
||||
LOG_AT_LEVEL(INFO) << "Frequency OUT " << FLAGS_fs_out;
|
||||
|
||||
gr_top_block_sptr top_block = gr_make_top_block("gnss_sdr_direct_resampler_test");
|
||||
gr_file_source_sptr source = gr_make_file_source(sizeof(gr_complex),FLAGS_signal_file.c_str());
|
||||
|
||||
gnss_sdr_direct_resampler_ccf_sptr resampler = gnss_sdr_make_direct_resampler_ccf(FLAGS_fs_in, FLAGS_fs_out);
|
||||
gr_block_sptr sink = gr_make_null_sink(sizeof(gr_complex));
|
||||
|
||||
top_block->connect(source, 0, resampler, 0);
|
||||
top_block->connect(resampler, 0, sink, 0);
|
||||
|
||||
LOG_AT_LEVEL(INFO) << "Run";
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
long long int begin = tv.tv_sec * 1000000 + tv.tv_usec;
|
||||
top_block->run(); // Start threads and wait
|
||||
gettimeofday(&tv, NULL);
|
||||
long long int end = tv.tv_sec *1000000 + tv.tv_usec;
|
||||
LOG_AT_LEVEL(INFO) << "Finished in " << (end - begin) << " microseconds";
|
||||
std::cout << (end - begin) << std::endl;
|
||||
top_block->stop();
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* \file test_main.cc
|
||||
* \brief This file implements tests for the ControlMessageFactory.
|
||||
* \brief This file implements all system tests.
|
||||
* \author Carles Fernandez-Prades, 2012. cfernandez(at)cttc.es
|
||||
*
|
||||
*
|
||||
@ -56,6 +56,7 @@
|
||||
//#include "gnss_block/file_output_filter_test.cc"
|
||||
//#include "gnss_block/gnss_block_factory_test.cc"
|
||||
#include "gnuradio_block/gnss_sdr_valve_test.cc"
|
||||
#include "gnuradio_block/direct_resampler_conditioner_cc_test.cc"
|
||||
#include "string_converter/string_converter_test.cc"
|
||||
#include "arithmetic/complex_arithmetic_libc.cc"
|
||||
#include "arithmetic/correlations_libc.cc"
|
||||
|
Loading…
Reference in New Issue
Block a user