1
0
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:
Carles Fernandez 2015-05-25 18:47:26 +02:00
commit 5eedb1975e
4 changed files with 32 additions and 25 deletions

View File

@ -107,7 +107,7 @@ 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_
@ -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);

View File

@ -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
@ -204,6 +204,8 @@ void pcps_quicksync_acquisition_cc::init()
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;
for (int doppler = static_cast<int>(-d_doppler_max);

View File

@ -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]();
@ -125,6 +124,12 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
{
_dest[(i + delay) % _samplesPerCode] = _code[i];
}
if (_fs != _codeFreqBasis)
{
free(_code);
}
else
{
delete[] _code;
}
}

View File

@ -935,7 +935,7 @@ 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);