mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-16 04:05:46 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
5eedb1975e
@ -107,14 +107,14 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
int samples_per_ms = round(code_length_);
|
||||
code_= new gr_complex[code_length_];
|
||||
code_ = new gr_complex[code_length_]();
|
||||
/*Object relevant information for debugging*/
|
||||
LOG(INFO) <<"Implementation: "<<this->implementation()
|
||||
<<", Vector Length: "<<vector_length_
|
||||
<<", Samples per ms: "<<samples_per_ms
|
||||
<<", Folding factor: "<<folding_factor_
|
||||
<<", Sampled ms: "<<sampled_ms_
|
||||
<<", Code Length: "<<code_length_;
|
||||
LOG(INFO) << "Implementation: " << this->implementation()
|
||||
<< ", Vector Length: " << vector_length_
|
||||
<< ", Samples per ms: " << samples_per_ms
|
||||
<< ", Folding factor: " << folding_factor_
|
||||
<< ", Sampled ms: " << sampled_ms_
|
||||
<< ", Code Length: " << code_length_;
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
@ -168,7 +168,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold)
|
||||
|
||||
if(pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_+".pfa", 0.0);
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
}
|
||||
if(pfa == 0.0)
|
||||
{
|
||||
@ -255,7 +255,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_local_code()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
std::complex<float>* code = new std::complex<float>[code_length_]();
|
||||
|
||||
gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
|
@ -119,7 +119,7 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
|
||||
d_corr_acumulator = 0;
|
||||
d_signal_folded = 0;
|
||||
d_code_folded = 0;
|
||||
d_code_folded = new gr_complex[d_fft_size]();
|
||||
d_noise_floor_power = 0;
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
@ -132,7 +132,7 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
d_test_statistics = 0;
|
||||
d_channel_internal_queue = 0;
|
||||
d_channel = 0;
|
||||
d_code_folded = 0;
|
||||
//d_code_folded = 0;
|
||||
|
||||
// DLOG(INFO) << "END CONSTRUCTOR";
|
||||
}
|
||||
@ -174,7 +174,7 @@ void pcps_quicksync_acquisition_cc::set_local_code(std::complex<float>* code)
|
||||
lation in time in the final steps of the acquisition stage*/
|
||||
memcpy(d_code, code, sizeof(gr_complex) * d_samples_per_code);
|
||||
|
||||
d_code_folded = new gr_complex[d_fft_size]();
|
||||
//d_code_folded = new gr_complex[d_fft_size]();
|
||||
memcpy(d_fft_if->get_inbuf(), d_code_folded, sizeof(gr_complex) * (d_fft_size));
|
||||
|
||||
/*perform folding of the code by the factorial factor parameter. Notice that
|
||||
@ -203,6 +203,8 @@ void pcps_quicksync_acquisition_cc::init()
|
||||
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
||||
d_mag = 0.0;
|
||||
d_input_power = 0.0;
|
||||
|
||||
if(d_doppler_step == 0) d_doppler_step = 250;
|
||||
|
||||
// Count the number of bins
|
||||
d_num_doppler_bins = 0;
|
||||
@ -472,7 +474,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
std::streamsize n = sizeof(float) * (d_fft_size); // complex file write
|
||||
filename.str("");
|
||||
filename << "../data/test_statistics_" << d_gnss_synchro->System
|
||||
<<"_" << d_gnss_synchro->Signal << "_sat_"
|
||||
<< "_" << d_gnss_synchro->Signal << "_sat_"
|
||||
<< d_gnss_synchro->PRN << "_doppler_" << doppler << ".dat";
|
||||
d_dump_file.open(filename.str().c_str(), std::ios::out | std::ios::binary);
|
||||
d_dump_file.write((char*)d_magnitude_folded, n); //write directly |abs(x)|^2 in this Doppler bin?
|
||||
|
@ -98,11 +98,10 @@ void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, signed in
|
||||
void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Signal[3],
|
||||
unsigned int _prn, signed int _fs, unsigned int _chip_shift)
|
||||
{
|
||||
// This function is based on the GNU software GPS for MATLAB in the Kay Borre book
|
||||
unsigned int _samplesPerCode;
|
||||
unsigned int delay;
|
||||
unsigned int _codeLength = Galileo_E5a_CODE_LENGTH_CHIPS;
|
||||
const int _codeFreqBasis = Galileo_E5a_CODE_CHIP_RATE_HZ; //Hz
|
||||
const unsigned int _codeLength = Galileo_E5a_CODE_LENGTH_CHIPS;
|
||||
const int _codeFreqBasis = Galileo_E5a_CODE_CHIP_RATE_HZ;
|
||||
|
||||
std::complex<float>* _code = new std::complex<float>[_codeLength]();
|
||||
|
||||
@ -114,17 +113,23 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
|
||||
|
||||
if (_fs != _codeFreqBasis)
|
||||
{
|
||||
std::complex<float>* _resampled_signal;
|
||||
if (posix_memalign((void**)&_resampled_signal, 16, _samplesPerCode * sizeof(gr_complex)) == 0){};
|
||||
resampler(_code, _resampled_signal, _codeFreqBasis, _fs, _codeLength, _samplesPerCode); //resamples code to fs
|
||||
delete[] _code;
|
||||
_code = _resampled_signal;
|
||||
std::complex<float>* _resampled_signal;
|
||||
if (posix_memalign((void**)&_resampled_signal, 16, _samplesPerCode * sizeof(gr_complex)) == 0){};
|
||||
resampler(_code, _resampled_signal, _codeFreqBasis, _fs, _codeLength, _samplesPerCode); //resamples code to fs
|
||||
delete[] _code;
|
||||
_code = _resampled_signal;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
_dest[(i + delay) % _samplesPerCode] = _code[i];
|
||||
}
|
||||
|
||||
delete[] _code;
|
||||
if (_fs != _codeFreqBasis)
|
||||
{
|
||||
free(_code);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete[] _code;
|
||||
}
|
||||
}
|
||||
|
@ -935,11 +935,11 @@ void ControlThread::galileo_utc_model_data_collector()
|
||||
void ControlThread::keyboard_listener()
|
||||
{
|
||||
bool read_keys = true;
|
||||
char c;
|
||||
char c = '0';
|
||||
while(read_keys)
|
||||
{
|
||||
std::cin.get(c);
|
||||
if (c =='q')
|
||||
if (c == 'q')
|
||||
{
|
||||
std::cout << "Quit keystroke order received, stopping GNSS-SDR !!" << std::endl;
|
||||
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
||||
|
Loading…
Reference in New Issue
Block a user