1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00
This commit is contained in:
Carles Fernandez 2019-03-23 00:43:27 +01:00
commit aecea6fd16
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
4 changed files with 36 additions and 5 deletions

View File

@ -1335,6 +1335,9 @@ if(OS_IS_MACOSX)
# Avoid using the implementation that comes with the Accelerate framework
include(AvoidAccelerate)
else()
if(NOT BLA_VENDOR)
set(BLA_VENDOR "Generic")
endif()
find_package(BLAS)
set_package_properties(BLAS PROPERTIES
URL "http://www.netlib.org/blas/"

View File

@ -56,6 +56,7 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::s
channel_fsm_ = std::make_shared<ChannelFsm>();
flag_enable_fpga = configuration->property("GNSS-SDR.enable_FPGA", false);
acq_->set_channel(channel_);
acq_->set_channel_fsm(channel_fsm_);
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_.System = gnss_signal_.get_satellite().get_system_short().c_str()[0];
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());
}
@ -236,7 +242,15 @@ void Channel::start_acquisition()
{
std::lock_guard<std::mutex> lk(mx);
bool result = false;
result = channel_fsm_->Event_start_acquisition();
if (!flag_enable_fpga)
{
result = channel_fsm_->Event_start_acquisition();
}
else
{
result = channel_fsm_->Event_start_acquisition_fpga();
channel_fsm_->start_acquisition();
}
if (!result)
{
LOG(WARNING) << "Invalid channel event";

View File

@ -1,7 +1,8 @@
/*!
* \file channel_fsm.cc
* \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
*
* -------------------------------------------------------------------------
@ -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()
{
std::lock_guard<std::mutex> lk(mx);

View File

@ -1,7 +1,8 @@
/*!
* \file channel_fsm.h
* \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
*
* -------------------------------------------------------------------------
@ -55,9 +56,10 @@ public:
void set_telemetry(std::shared_ptr<TelemetryDecoderInterface> telemetry);
void set_queue(gr::msg_queue::sptr queue);
void set_channel(uint32_t channel);
void start_acquisition();
// FSM EVENTS
bool Event_start_acquisition();
bool Event_start_acquisition_fpga();
bool Event_valid_acquisition();
bool Event_stop_channel();
bool Event_failed_acquisition_repeat();
@ -65,7 +67,6 @@ public:
bool Event_failed_tracking_standby();
private:
void start_acquisition();
void start_tracking();
void stop_acquisition();
void stop_tracking();