1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-26 00:46:59 +00:00

GPS L2C M acquisition and tracking ready. Old configuration file format.

Bug fix on GPS L1 DLL PLL that prevented the output of gnss_synchro
during the acqusition to tracking transition.
This commit is contained in:
Javier 2015-05-06 16:33:51 +02:00
parent 4c5efd1e8b
commit d8d5daa5d8
10 changed files with 26 additions and 28 deletions

View File

@ -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=../data/agilent_cap2.dat
SignalSource.filename=/datalogger/signals/Agilent/New York/4msps.dat
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
SignalSource.item_type=gr_complex
@ -210,7 +210,7 @@ Acquisition_GPS.sampled_ms=1
;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
Acquisition_GPS.implementation=GPS_L1_CA_PCPS_Acquisition
;#threshold: Acquisition threshold
Acquisition_GPS.threshold=0.008
Acquisition_GPS.threshold=0.005
;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
;Acquisition_GPS.pfa=0.01
;#doppler_max: Maximum expected Doppler shift [Hz]
@ -289,7 +289,7 @@ PVT.dump_filename=./PVT
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
;#flag_nmea_tty_port: Enable or disable the NMEA log to a serial TTY port (Can be used with real hardware or virtual one)
PVT.flag_nmea_tty_port=true;
PVT.flag_nmea_tty_port=false;
;#nmea_dump_devname: serial device descriptor for NMEA logging
PVT.nmea_dump_devname=/dev/pts/4

View File

@ -267,11 +267,11 @@ Resampler2.implementation=Pass_Through
;######### CHANNELS GLOBAL CONFIG ############
;#count: Number of available GPS satellite channels.
Channels_GPS.count=9
Channels_GPS.count=16
;#count: Number of available Galileo satellite channels.
Channels_Galileo.count=0
;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
Channels.in_acquisition=1
Channels.in_acquisition=2
;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS
;#if the option is disabled by default is assigned GPS
Channel.system=GPS, GPS L2C M

View File

@ -54,13 +54,12 @@ void gps_l1_ca_code_gen_complex(std::complex<float>* _dest, signed int _prn, uns
// compute delay array index for given PRN number
if(120 <= _prn && _prn <= 138)
{
//prn_idx = _prn - 88; // SBAS PRNs are at array indices 31 to 50 (offset: -120+33-1 =-88)
prn_idx = _prn - 87; // SBAS PRNs are at array indices 31 to 50 (offset: -120+33 =-87)
prn_idx = _prn - 88; // SBAS PRNs are at array indices 31 to 50 (offset: -120+33-1 =-88)
//prn_idx = _prn - 87; // SBAS PRNs are at array indices 31 to 50 (offset: -120+33 =-87)
}
else
{
//prn_idx = _prn-1;
prn_idx = _prn;
prn_idx = _prn-1;
}
/* A simple error check */

View File

@ -509,7 +509,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_in
{
d_last_seg = floor(d_sample_counter / d_fs_in);
std::cout << "Current input signal time = " << d_last_seg << " [s]" << std::endl;
std::cout << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
<< ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
//if (d_last_seg==5) d_carrier_lock_fail_counter=500; //DEBUG: force unlock!
}
@ -519,7 +519,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_in
if (floor(d_sample_counter / d_fs_in) != d_last_seg)
{
d_last_seg = floor(d_sample_counter / d_fs_in);
std::cout<< "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
<< ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]"<< std::endl;
//std::cout<<"TRK CH "<<d_channel<<" Carrier_lock_test="<<d_carrier_lock_test<< std::endl;
}

View File

@ -521,7 +521,7 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_int
if (floor(d_sample_counter / d_fs_in) != d_last_seg)
{
d_last_seg = floor(d_sample_counter / d_fs_in);
std::cout << "GPS L2C M Tracking CH " << d_channel << ": Satellite "
std::cout << "GPS L2C M Tracking CH " << d_channel << ": Satellite "
<< Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
<< ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]"<<std::endl;
//std::cout<<"TRK CH "<<d_channel<<" Carrier_lock_test="<<d_carrier_lock_test<< std::endl;

View File

@ -440,7 +440,7 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
for (unsigned int i = 0; i < channels_count_; i++)
{
LOG(INFO) << "Channel " << i << " in state " << channels_state_[i] << std::endl;
}channels_.at(who)->set_signal(available_GNSS_signals_.front());
}
break;
case 2:

View File

@ -1 +0,0 @@
/gps_l2c_m_prn7_5msps.dat

Binary file not shown.

View File

@ -85,9 +85,9 @@ void GpsL2MDllPllTrackingTest::init()
gnss_synchro.System = 'G';
std::string signal = "2S";
signal.copy(gnss_synchro.Signal, 2, 0);
gnss_synchro.PRN = 15;
gnss_synchro.PRN = 7;
config->set_property("GNSS-SDR.internal_fs_hz", "4000000");
config->set_property("GNSS-SDR.internal_fs_hz", "5000000");
config->set_property("Tracking_GPS.item_type", "gr_complex");
config->set_property("Tracking_GPS.dump", "true");
config->set_property("Tracking_GPS.dump_filename", "../data/L2m_tracking_ch_");
@ -103,8 +103,8 @@ TEST_F(GpsL2MDllPllTrackingTest, ValidationOfResults)
struct timeval tv;
long long int begin = 0;
long long int end = 0;
int fs_in = 4000000;
int nsamples = fs_in*30;
int fs_in = 5000000;
int nsamples = fs_in*9;
init();
queue = gr::msg_queue::make(0);
top_block = gr::make_top_block("Tracking test");
@ -112,8 +112,8 @@ TEST_F(GpsL2MDllPllTrackingTest, ValidationOfResults)
std::shared_ptr<TrackingInterface> tracking = std::make_shared<GpsL2MDllPllTracking>(config.get(), "Tracking_GPS", 1, 1, queue);
//REAL
gnss_synchro.Acq_delay_samples = 2004;
gnss_synchro.Acq_doppler_hz = 2980;//1200;
gnss_synchro.Acq_delay_samples = 1;
gnss_synchro.Acq_doppler_hz = 1200;//1200;
gnss_synchro.Acq_samplestamp_samples = 0;
ASSERT_NO_THROW( {
@ -138,8 +138,8 @@ TEST_F(GpsL2MDllPllTrackingTest, ValidationOfResults)
std::string path = std::string(TEST_PATH);
//std::string file = path + "signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat";
std::string file = "/datalogger/signals/Fraunhofer/L125_III1b_210s_L2_resampled.bin";
//std::string file = "/home/gnss/git/gnss-sdr/src/tests/data/gps_l2c_m_prn7_5msps.dat";
//std::string file = "/datalogger/signals/Fraunhofer/L125_III1b_210s_L2_resampled.bin";
std::string file = path + "/data/gps_l2c_m_prn7_5msps.dat";
const char * file_name = file.c_str();
gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(gr_complex), file_name, false);

View File

@ -99,9 +99,9 @@ void GpsL2MPcpsAcquisitionTest::init()
gnss_synchro.System = 'G';
std::string signal = "2S";
strcpy(gnss_synchro.Signal,signal.c_str());
gnss_synchro.PRN = 15;
gnss_synchro.PRN = 7;
sampling_freqeuncy_hz = 4000000;
sampling_freqeuncy_hz = 5000000;
nsamples=round((double)sampling_freqeuncy_hz*GPS_L2_M_PERIOD)*2;
config->set_property("GNSS-SDR.internal_fs_hz", std::to_string(sampling_freqeuncy_hz));
config->set_property("Acquisition.item_type", "gr_complex");
@ -186,8 +186,8 @@ TEST_F(GpsL2MPcpsAcquisitionTest, ValidationOfResults)
queue = gr::msg_queue::make(0);
double expected_delay_samples = 2004;
double expected_doppler_hz = 3000;
double expected_delay_samples = 1;//2004;
double expected_doppler_hz = 1200;//3000;
init();
start_queue();
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition", 1, 1, queue);
@ -224,8 +224,8 @@ TEST_F(GpsL2MPcpsAcquisitionTest, ValidationOfResults)
ASSERT_NO_THROW( {
std::string path = std::string(TEST_PATH);
//std::string file = path + "signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat";
//std::string file = "/home/gnss/git/gnss-sdr/src/tests/data/gps_l2c_m_prn7_5msps.dat";
std::string file = "/datalogger/signals/Fraunhofer/L125_III1b_210s_L2_resampled.bin";
std::string file = path + "/data/gps_l2c_m_prn7_5msps.dat";
//std::string file = "/datalogger/signals/Fraunhofer/L125_III1b_210s_L2_resampled.bin";
const char * file_name = file.c_str();
gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(gr_complex), file_name, false);
//gr::blocks::interleaved_short_to_complex::sptr gr_interleaved_short_to_complex_ = gr::blocks::interleaved_short_to_complex::make();