mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-09 19:40:04 +00:00
Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
commit
aecea6fd16
@ -1335,6 +1335,9 @@ if(OS_IS_MACOSX)
|
|||||||
# Avoid using the implementation that comes with the Accelerate framework
|
# Avoid using the implementation that comes with the Accelerate framework
|
||||||
include(AvoidAccelerate)
|
include(AvoidAccelerate)
|
||||||
else()
|
else()
|
||||||
|
if(NOT BLA_VENDOR)
|
||||||
|
set(BLA_VENDOR "Generic")
|
||||||
|
endif()
|
||||||
find_package(BLAS)
|
find_package(BLAS)
|
||||||
set_package_properties(BLAS PROPERTIES
|
set_package_properties(BLAS PROPERTIES
|
||||||
URL "http://www.netlib.org/blas/"
|
URL "http://www.netlib.org/blas/"
|
||||||
|
@ -56,6 +56,7 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::s
|
|||||||
channel_fsm_ = std::make_shared<ChannelFsm>();
|
channel_fsm_ = std::make_shared<ChannelFsm>();
|
||||||
|
|
||||||
flag_enable_fpga = configuration->property("GNSS-SDR.enable_FPGA", false);
|
flag_enable_fpga = configuration->property("GNSS-SDR.enable_FPGA", false);
|
||||||
|
|
||||||
acq_->set_channel(channel_);
|
acq_->set_channel(channel_);
|
||||||
acq_->set_channel_fsm(channel_fsm_);
|
acq_->set_channel_fsm(channel_fsm_);
|
||||||
trk_->set_channel(channel_);
|
trk_->set_channel(channel_);
|
||||||
@ -215,6 +216,11 @@ void Channel::set_signal(const Gnss_Signal& gnss_signal)
|
|||||||
gnss_synchro_.PRN = gnss_signal_.get_satellite().get_PRN();
|
gnss_synchro_.PRN = gnss_signal_.get_satellite().get_PRN();
|
||||||
gnss_synchro_.System = gnss_signal_.get_satellite().get_system_short().c_str()[0];
|
gnss_synchro_.System = gnss_signal_.get_satellite().get_system_short().c_str()[0];
|
||||||
acq_->set_local_code();
|
acq_->set_local_code();
|
||||||
|
if (flag_enable_fpga)
|
||||||
|
{
|
||||||
|
//set again the gnss_synchro pointer to trigger the preloading of the current PRN code to the FPGA fabric
|
||||||
|
trk_->set_gnss_synchro(&gnss_synchro_);
|
||||||
|
}
|
||||||
nav_->set_satellite(gnss_signal_.get_satellite());
|
nav_->set_satellite(gnss_signal_.get_satellite());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +242,15 @@ void Channel::start_acquisition()
|
|||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(mx);
|
std::lock_guard<std::mutex> lk(mx);
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
if (!flag_enable_fpga)
|
||||||
|
{
|
||||||
result = channel_fsm_->Event_start_acquisition();
|
result = channel_fsm_->Event_start_acquisition();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = channel_fsm_->Event_start_acquisition_fpga();
|
||||||
|
channel_fsm_->start_acquisition();
|
||||||
|
}
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "Invalid channel event";
|
LOG(WARNING) << "Invalid channel event";
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file channel_fsm.cc
|
* \file channel_fsm.cc
|
||||||
* \brief Implementation of a State Machine for channel
|
* \brief Implementation of a State Machine for channel
|
||||||
* \authors Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
* \authors Javier Arribas, 2019. javiarribas@gmail.com
|
||||||
|
* Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
||||||
* Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
* Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -74,6 +75,18 @@ bool ChannelFsm::Event_stop_channel()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool ChannelFsm::Event_start_acquisition_fpga()
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lk(mx);
|
||||||
|
if ((d_state == 1) || (d_state == 2))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
d_state = 1;
|
||||||
|
DLOG(INFO) << "CH = " << channel_ << ". Ev start acquisition FPGA";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool ChannelFsm::Event_start_acquisition()
|
bool ChannelFsm::Event_start_acquisition()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(mx);
|
std::lock_guard<std::mutex> lk(mx);
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file channel_fsm.h
|
* \file channel_fsm.h
|
||||||
* \brief Interface of the State Machine for channel
|
* \brief Interface of the State Machine for channel
|
||||||
* \authors Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
* \authors Javier Arribas, 2019. javiarribas@gmail.com
|
||||||
|
* Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
||||||
* Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
* Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -55,9 +56,10 @@ public:
|
|||||||
void set_telemetry(std::shared_ptr<TelemetryDecoderInterface> telemetry);
|
void set_telemetry(std::shared_ptr<TelemetryDecoderInterface> telemetry);
|
||||||
void set_queue(gr::msg_queue::sptr queue);
|
void set_queue(gr::msg_queue::sptr queue);
|
||||||
void set_channel(uint32_t channel);
|
void set_channel(uint32_t channel);
|
||||||
|
void start_acquisition();
|
||||||
// FSM EVENTS
|
// FSM EVENTS
|
||||||
bool Event_start_acquisition();
|
bool Event_start_acquisition();
|
||||||
|
bool Event_start_acquisition_fpga();
|
||||||
bool Event_valid_acquisition();
|
bool Event_valid_acquisition();
|
||||||
bool Event_stop_channel();
|
bool Event_stop_channel();
|
||||||
bool Event_failed_acquisition_repeat();
|
bool Event_failed_acquisition_repeat();
|
||||||
@ -65,7 +67,6 @@ public:
|
|||||||
bool Event_failed_tracking_standby();
|
bool Event_failed_tracking_standby();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void start_acquisition();
|
|
||||||
void start_tracking();
|
void start_tracking();
|
||||||
void stop_acquisition();
|
void stop_acquisition();
|
||||||
void stop_tracking();
|
void stop_tracking();
|
||||||
|
Loading…
Reference in New Issue
Block a user