2018-02-07 13:26:25 +00:00
|
|
|
/*!
|
|
|
|
* \file galileo_e5a_pcps_acquisition.h
|
|
|
|
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
|
|
|
* Galileo E5a data and pilot Signals
|
|
|
|
* \author Antonio Ramos, 2018. antonio.ramos(at)cttc.es
|
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2018-02-07 13:26:25 +00:00
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2018-02-07 13:26:25 +00:00
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
2020-02-08 00:20:02 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2018-02-07 13:26:25 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2018-02-07 13:26:25 +00:00
|
|
|
*/
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#ifndef GNSS_SDR_GALILEO_E5A_PCPS_ACQUISITION_H
|
|
|
|
#define GNSS_SDR_GALILEO_E5A_PCPS_ACQUISITION_H
|
2018-02-07 13:26:25 +00:00
|
|
|
|
2018-02-26 02:15:53 +00:00
|
|
|
|
2019-03-20 14:13:17 +00:00
|
|
|
#include "channel_fsm.h"
|
2018-02-26 02:15:53 +00:00
|
|
|
#include "gnss_synchro.h"
|
2018-02-07 13:26:25 +00:00
|
|
|
#include "pcps_acquisition.h"
|
2021-10-11 16:31:16 +00:00
|
|
|
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
2019-06-30 02:47:15 +00:00
|
|
|
#include <memory>
|
2018-02-26 02:15:53 +00:00
|
|
|
#include <string>
|
2018-02-07 13:26:25 +00:00
|
|
|
|
2020-11-01 12:37:19 +00:00
|
|
|
/** \addtogroup Acquisition
|
|
|
|
* \{ */
|
|
|
|
/** \addtogroup Acq_adapters
|
|
|
|
* \{ */
|
|
|
|
|
|
|
|
|
2018-02-07 13:26:25 +00:00
|
|
|
class ConfigurationInterface;
|
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
class GalileoE5aPcpsAcquisition : public AcquisitionInterface
|
2018-02-07 13:26:25 +00:00
|
|
|
{
|
|
|
|
public:
|
2020-06-29 07:07:41 +00:00
|
|
|
GalileoE5aPcpsAcquisition(
|
|
|
|
const ConfigurationInterface* configuration,
|
2018-12-02 04:29:11 +00:00
|
|
|
const std::string& role,
|
|
|
|
unsigned int in_streams,
|
2018-03-03 01:03:39 +00:00
|
|
|
unsigned int out_streams);
|
2018-02-07 13:26:25 +00:00
|
|
|
|
2019-07-21 17:32:52 +00:00
|
|
|
~GalileoE5aPcpsAcquisition() = default;
|
2018-02-07 13:26:25 +00:00
|
|
|
|
|
|
|
inline std::string role() override
|
|
|
|
{
|
|
|
|
return role_;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline std::string implementation() override
|
|
|
|
{
|
|
|
|
return "Galileo_E5a_Pcps_Acquisition";
|
|
|
|
}
|
|
|
|
|
|
|
|
inline size_t item_size() override
|
|
|
|
{
|
|
|
|
return item_size_;
|
|
|
|
}
|
|
|
|
|
|
|
|
void connect(gr::top_block_sptr top_block) override;
|
|
|
|
void disconnect(gr::top_block_sptr top_block) override;
|
|
|
|
gr::basic_block_sptr get_left_block() override;
|
|
|
|
gr::basic_block_sptr get_right_block() override;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
|
|
|
* to efficiently exchange synchronization data between acquisition and
|
|
|
|
* tracking blocks
|
|
|
|
*/
|
|
|
|
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Set acquisition channel unique ID
|
|
|
|
*/
|
2019-03-20 14:44:59 +00:00
|
|
|
inline void set_channel(unsigned int channel) override
|
2019-03-20 14:13:17 +00:00
|
|
|
{
|
|
|
|
channel_ = channel;
|
|
|
|
acquisition_->set_channel(channel_);
|
|
|
|
}
|
2018-02-07 13:26:25 +00:00
|
|
|
|
2019-03-20 14:13:17 +00:00
|
|
|
/*!
|
2019-06-30 02:47:15 +00:00
|
|
|
* \brief Set channel fsm associated to this acquisition instance
|
|
|
|
*/
|
2019-04-09 15:39:48 +00:00
|
|
|
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
2019-03-20 14:13:17 +00:00
|
|
|
{
|
|
|
|
channel_fsm_ = channel_fsm;
|
|
|
|
acquisition_->set_channel_fsm(channel_fsm);
|
|
|
|
}
|
2019-06-30 02:47:15 +00:00
|
|
|
|
2018-02-07 13:26:25 +00:00
|
|
|
/*!
|
|
|
|
* \brief Set statistics threshold of PCPS algorithm
|
|
|
|
*/
|
|
|
|
void set_threshold(float threshold) override;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Set maximum Doppler off grid search
|
|
|
|
*/
|
|
|
|
void set_doppler_max(unsigned int doppler_max) override;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Set Doppler steps for the grid search
|
|
|
|
*/
|
|
|
|
void set_doppler_step(unsigned int doppler_step) override;
|
|
|
|
|
2019-07-23 15:56:02 +00:00
|
|
|
/*!
|
|
|
|
* \brief Set Doppler center for the grid search
|
|
|
|
*/
|
|
|
|
void set_doppler_center(int doppler_center) override;
|
|
|
|
|
2018-02-07 13:26:25 +00:00
|
|
|
/*!
|
|
|
|
* \brief Initializes acquisition algorithm.
|
|
|
|
*/
|
|
|
|
void init() override;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Sets local Galileo E5a code for PCPS acquisition algorithm.
|
|
|
|
*/
|
|
|
|
void set_local_code() override;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Returns the maximum peak of grid search
|
|
|
|
*/
|
|
|
|
signed int mag() override;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Restart acquisition algorithm
|
|
|
|
*/
|
|
|
|
void reset() override;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief If set to 1, ensures that acquisition starts at the
|
|
|
|
* first available sample.
|
|
|
|
* \param state - int=1 forces start of acquisition
|
|
|
|
*/
|
2018-07-04 11:05:44 +00:00
|
|
|
void set_state(int state) override;
|
2018-02-07 13:26:25 +00:00
|
|
|
|
2018-10-28 10:07:53 +00:00
|
|
|
/*!
|
|
|
|
* \brief Stop running acquisition
|
|
|
|
*/
|
|
|
|
void stop_acquisition() override;
|
|
|
|
|
2018-12-05 15:50:32 +00:00
|
|
|
/*!
|
|
|
|
* \brief Sets the resampler latency to account it in the acquisition code delay estimation
|
|
|
|
*/
|
|
|
|
void set_resampler_latency(uint32_t latency_samples) override;
|
|
|
|
|
2018-02-07 13:26:25 +00:00
|
|
|
private:
|
|
|
|
pcps_acquisition_sptr acquisition_;
|
2021-10-11 16:31:16 +00:00
|
|
|
volk_gnsssdr::vector<std::complex<float>> code_;
|
2020-06-25 00:50:07 +00:00
|
|
|
std::weak_ptr<ChannelFsm> channel_fsm_;
|
|
|
|
Gnss_Synchro* gnss_synchro_;
|
2018-12-05 15:50:32 +00:00
|
|
|
Acq_Conf acq_parameters_;
|
2018-02-07 13:26:25 +00:00
|
|
|
std::string item_type_;
|
|
|
|
std::string dump_filename_;
|
|
|
|
std::string role_;
|
2020-06-25 00:50:07 +00:00
|
|
|
int64_t fs_in_;
|
|
|
|
size_t item_size_;
|
|
|
|
float threshold_;
|
|
|
|
int doppler_center_;
|
2018-02-07 13:26:25 +00:00
|
|
|
unsigned int vector_length_;
|
|
|
|
unsigned int code_length_;
|
|
|
|
unsigned int channel_;
|
|
|
|
unsigned int doppler_max_;
|
|
|
|
unsigned int doppler_step_;
|
|
|
|
unsigned int sampled_ms_;
|
|
|
|
unsigned int in_streams_;
|
|
|
|
unsigned int out_streams_;
|
2020-06-25 00:50:07 +00:00
|
|
|
bool acq_pilot_;
|
|
|
|
bool acq_iq_;
|
2018-02-07 13:26:25 +00:00
|
|
|
};
|
2019-06-30 02:47:15 +00:00
|
|
|
|
2020-11-01 12:37:19 +00:00
|
|
|
|
|
|
|
/** \} */
|
|
|
|
/** \} */
|
2020-02-08 09:10:46 +00:00
|
|
|
#endif // GNSS_SDR_GALILEO_E5A_PCPS_ACQUISITION_H
|