mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Added Galileo almanac management (credits to Javier Arribas)
This commit is contained in:
parent
990112b9b7
commit
5c867e084e
@ -48,6 +48,7 @@ using google::LogMessage;
|
||||
extern concurrent_map<Galileo_Ephemeris> global_galileo_ephemeris_map;
|
||||
extern concurrent_map<Galileo_Iono> global_galileo_iono_map;
|
||||
extern concurrent_map<Galileo_Utc_Model> global_galileo_utc_model_map;
|
||||
extern concurrent_map<Galileo_Almanac> global_galileo_almanac_map;
|
||||
|
||||
galileo_e1_pvt_cc_sptr
|
||||
galileo_e1_make_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname)
|
||||
@ -163,6 +164,11 @@ int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_it
|
||||
global_galileo_iono_map.read(0, d_ls_pvt->galileo_iono);
|
||||
}
|
||||
|
||||
if (global_galileo_almanac_map.size() > 0)
|
||||
{
|
||||
// Almanac data is shared for all the Galileo satellites. Read always at ID=0
|
||||
global_galileo_almanac_map.read(0, d_ls_pvt->galileo_almanac);
|
||||
}
|
||||
// ############ 2 COMPUTE THE PVT ################################
|
||||
if (gnss_pseudoranges_map.size() > 0 and d_ls_pvt->galileo_ephemeris_map.size() > 0)
|
||||
{
|
||||
|
@ -77,6 +77,7 @@ public:
|
||||
std::map<int,Galileo_Ephemeris> galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris
|
||||
Galileo_Utc_Model galileo_utc_model;
|
||||
Galileo_Iono galileo_iono;
|
||||
Galileo_Almanac galileo_almanac;
|
||||
|
||||
double d_galileo_current_time;
|
||||
boost::posix_time::ptime d_position_UTC_time;
|
||||
|
@ -162,6 +162,7 @@ void ControlThread::run()
|
||||
|
||||
galileo_ephemeris_data_collector_thread_ = boost::thread(&ControlThread::galileo_ephemeris_data_collector, this);
|
||||
galileo_iono_data_collector_thread_ = boost::thread(&ControlThread::galileo_iono_data_collector, this);
|
||||
galileo_almanac_data_collector_thread_ = boost::thread(&ControlThread::galileo_almanac_data_collector, this);
|
||||
galileo_utc_model_data_collector_thread_ = boost::thread(&ControlThread::galileo_utc_model_data_collector, this);
|
||||
// Main loop to read and process the control messages
|
||||
while (flowgraph_->running() && !stop_)
|
||||
@ -729,6 +730,20 @@ void ControlThread::gps_iono_data_collector()
|
||||
}
|
||||
|
||||
|
||||
void ControlThread::galileo_almanac_data_collector()
|
||||
{
|
||||
// ############ 1.bis READ ALMANAC QUEUE ####################
|
||||
Galileo_Almanac galileo_almanac;
|
||||
while(stop_ == false)
|
||||
{
|
||||
global_galileo_almanac_queue.wait_and_pop(galileo_almanac);
|
||||
|
||||
LOG(INFO) << "New galileo_almanac record has arrived ";
|
||||
// there is no timestamp for the galileo_almanac data, new entries must always be added
|
||||
global_galileo_almanac_map.write(0, galileo_almanac);
|
||||
}
|
||||
}
|
||||
|
||||
void ControlThread::galileo_iono_data_collector()
|
||||
{
|
||||
Galileo_Iono galileo_iono;
|
||||
|
@ -178,6 +178,11 @@ private:
|
||||
*/
|
||||
void galileo_iono_data_collector();
|
||||
|
||||
/*
|
||||
* Blocking function that reads the galileo_almanac queue and updates the shared map, accessible from the PVT block
|
||||
*/
|
||||
void galileo_almanac_data_collector();
|
||||
|
||||
void apply_action(unsigned int what);
|
||||
std::shared_ptr<GNSSFlowgraph> flowgraph_;
|
||||
std::shared_ptr<ConfigurationInterface> configuration_;
|
||||
@ -200,6 +205,7 @@ private:
|
||||
boost::thread galileo_ephemeris_data_collector_thread_;
|
||||
boost::thread galileo_utc_model_data_collector_thread_;
|
||||
boost::thread galileo_iono_data_collector_thread_;
|
||||
boost::thread galileo_almanac_data_collector_thread_;
|
||||
void keyboard_listener();
|
||||
|
||||
// default filename for assistance data
|
||||
|
Loading…
Reference in New Issue
Block a user