mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-12 13:23:09 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into kf
This commit is contained in:
@@ -94,6 +94,8 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
{
|
||||
rinex_version = 2;
|
||||
}
|
||||
int rinexobs_rate_ms = boost::math::lcm(configuration->property(role + ".rinexobs_rate_ms", 1000), output_rate_ms);
|
||||
int rinexnav_rate_ms = boost::math::lcm(configuration->property(role + ".rinexnav_rate_ms", 6000), output_rate_ms);
|
||||
|
||||
// RTCM Printer settings
|
||||
bool flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false);
|
||||
@@ -208,8 +210,8 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 21;
|
||||
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count = 0)) type_of_receiver = 22;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0)) type_of_receiver = 23;
|
||||
if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) type_of_receiver = 24;
|
||||
if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0)) type_of_receiver = 25;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) type_of_receiver = 24;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0)) type_of_receiver = 25;
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) type_of_receiver = 26;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) type_of_receiver = 27;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) type_of_receiver = 28;
|
||||
@@ -471,10 +473,10 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
0, /* initialize by restart */
|
||||
1, /* output single by dgps/float/fix/ppp outage */
|
||||
{"", ""}, /* char rnxopt[2][256] rinex options {rover,base} */
|
||||
{sat_PCV, rec_PCV, phwindup, reject_GPS_IIA, raim_fde}, /* posopt[6] positioning options [0]: satellite and receiver antenna PCV model; [1]: interpolate antenna parameters; [2]: apply phase wind-up correction for PPP modes; [3]: exclude measurements of GPS Block IIA satellites satellite [4]: RAIM FDE (fault detection and exclusion) [5]: handle day-boundary clock jump */
|
||||
{sat_PCV, rec_PCV, phwindup, reject_GPS_IIA, raim_fde}, /* posopt[6] positioning options [0]: satellite and receiver antenna PCV model; [1]: interpolate antenna parameters; [2]: apply phase wind-up correction for PPP modes; [3]: exclude measurements of GPS Block IIA satellites satellite [4]: RAIM FDE (fault detection and exclusion) [5]: handle day-boundary clock jump */
|
||||
0, /* solution sync mode (0:off,1:on) */
|
||||
{{}, {}}, /* odisp[2][6*11] ocean tide loading parameters {rov,base} */
|
||||
{{}, {{}, {}}, {{}, {}}, {}, {}}, /* exterr_t exterr extended receiver error model */
|
||||
{{}, {}}, /* odisp[2][6*11] ocean tide loading parameters {rov,base} */
|
||||
{{}, {{}, {}}, {{}, {}}, {}, {}}, /* exterr_t exterr extended receiver error model */
|
||||
0, /* disable L2-AR */
|
||||
{} /* char pppopt[256] ppp option "-GAP_RESION=" default gap to reset iono parameters (ep) */
|
||||
};
|
||||
@@ -482,8 +484,12 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
rtkinit(&rtk, &rtklib_configuration_options);
|
||||
|
||||
// make PVT object
|
||||
pvt_ = rtklib_make_pvt_cc(in_streams_, dump_, dump_filename_, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, rinex_version, flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_msg_rate_ms, rtcm_dump_devname, type_of_receiver, rtk);
|
||||
pvt_ = rtklib_make_pvt_cc(in_streams_, dump_, dump_filename_, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, rinex_version, rinexobs_rate_ms, rinexnav_rate_ms, flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_msg_rate_ms, rtcm_dump_devname, type_of_receiver, rtk);
|
||||
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "The PVT block does not have an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int nchannels,
|
||||
std::string nmea_dump_filename,
|
||||
std::string nmea_dump_devname,
|
||||
int rinex_version,
|
||||
int rinexobs_rate_ms,
|
||||
int rinexnav_rate_ms,
|
||||
bool flag_rtcm_server,
|
||||
bool flag_rtcm_tty_port,
|
||||
unsigned short rtcm_tcp_port,
|
||||
@@ -75,6 +77,8 @@ rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int nchannels,
|
||||
nmea_dump_filename,
|
||||
nmea_dump_devname,
|
||||
rinex_version,
|
||||
rinexobs_rate_ms,
|
||||
rinexnav_rate_ms,
|
||||
flag_rtcm_server,
|
||||
flag_rtcm_tty_port,
|
||||
rtcm_tcp_port,
|
||||
@@ -90,7 +94,7 @@ void rtklib_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
//************* GPS telemetry *****************
|
||||
// ************* GPS telemetry *****************
|
||||
if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Ephemeris>))
|
||||
{
|
||||
// ### GPS EPHEMERIS ###
|
||||
@@ -146,7 +150,7 @@ void rtklib_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
|
||||
DLOG(INFO) << "New CNAV UTC record has arrived ";
|
||||
}
|
||||
|
||||
//**************** Galileo telemetry ********************
|
||||
// **************** Galileo telemetry ********************
|
||||
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Ephemeris>))
|
||||
{
|
||||
// ### Galileo EPHEMERIS ###
|
||||
@@ -185,7 +189,7 @@ void rtklib_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
|
||||
DLOG(INFO) << "New Galileo Almanac has arrived ";
|
||||
}
|
||||
|
||||
//**************** GLONASS GNAV Telemetry **************************
|
||||
// **************** GLONASS GNAV Telemetry **************************
|
||||
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Glonass_Gnav_Ephemeris>))
|
||||
{
|
||||
// ### GLONASS GNAV EPHEMERIS ###
|
||||
@@ -235,13 +239,27 @@ std::map<int, Gps_Ephemeris> rtklib_pvt_cc::get_GPS_L1_ephemeris_map()
|
||||
}
|
||||
|
||||
|
||||
rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump_filename,
|
||||
int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port,
|
||||
std::string nmea_dump_filename, std::string nmea_dump_devname, int rinex_version,
|
||||
bool flag_rtcm_server, bool flag_rtcm_tty_port, unsigned short rtcm_tcp_port,
|
||||
unsigned short rtcm_station_id, std::map<int, int> rtcm_msg_rate_ms, std::string rtcm_dump_devname, const unsigned int type_of_receiver, rtk_t& rtk) : gr::sync_block("rtklib_pvt_cc",
|
||||
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
|
||||
gr::io_signature::make(0, 0, 0))
|
||||
rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
int output_rate_ms,
|
||||
int display_rate_ms,
|
||||
bool flag_nmea_tty_port,
|
||||
std::string nmea_dump_filename,
|
||||
std::string nmea_dump_devname,
|
||||
int rinex_version,
|
||||
int rinexobs_rate_ms,
|
||||
int rinexnav_rate_ms,
|
||||
bool flag_rtcm_server,
|
||||
bool flag_rtcm_tty_port,
|
||||
unsigned short rtcm_tcp_port,
|
||||
unsigned short rtcm_station_id,
|
||||
std::map<int, int> rtcm_msg_rate_ms,
|
||||
std::string rtcm_dump_devname,
|
||||
const unsigned int type_of_receiver,
|
||||
rtk_t& rtk) : gr::sync_block("rtklib_pvt_cc",
|
||||
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
|
||||
gr::io_signature::make(0, 0, 0))
|
||||
{
|
||||
d_output_rate_ms = output_rate_ms;
|
||||
d_display_rate_ms = display_rate_ms;
|
||||
@@ -255,28 +273,28 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
|
||||
this->message_port_register_in(pmt::mp("telemetry"));
|
||||
this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&rtklib_pvt_cc::msg_handler_telemetry, this, _1));
|
||||
|
||||
//initialize kml_printer
|
||||
// initialize kml_printer
|
||||
std::string kml_dump_filename;
|
||||
kml_dump_filename = d_dump_filename;
|
||||
d_kml_dump = std::make_shared<Kml_Printer>();
|
||||
d_kml_dump->set_headers(kml_dump_filename);
|
||||
|
||||
//initialize gpx_printer
|
||||
// initialize gpx_printer
|
||||
std::string gpx_dump_filename;
|
||||
gpx_dump_filename = d_dump_filename;
|
||||
d_gpx_dump = std::make_shared<Gpx_Printer>();
|
||||
d_gpx_dump->set_headers(gpx_dump_filename);
|
||||
|
||||
//initialize geojson_printer
|
||||
// initialize geojson_printer
|
||||
std::string geojson_dump_filename;
|
||||
geojson_dump_filename = d_dump_filename;
|
||||
d_geojson_printer = std::make_shared<GeoJSON_Printer>();
|
||||
d_geojson_printer->set_headers(geojson_dump_filename);
|
||||
|
||||
//initialize nmea_printer
|
||||
// initialize nmea_printer
|
||||
d_nmea_printer = std::make_shared<Nmea_Printer>(nmea_dump_filename, flag_nmea_tty_port, nmea_dump_devname);
|
||||
|
||||
//initialize rtcm_printer
|
||||
// initialize rtcm_printer
|
||||
std::string rtcm_dump_filename;
|
||||
rtcm_dump_filename = d_dump_filename;
|
||||
d_rtcm_printer = std::make_shared<Rtcm_Printer>(rtcm_dump_filename, flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_dump_devname);
|
||||
@@ -332,6 +350,14 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
|
||||
}
|
||||
b_rtcm_writing_started = false;
|
||||
|
||||
// initialize RINEX printer
|
||||
b_rinex_header_written = false;
|
||||
b_rinex_header_updated = false;
|
||||
d_rinex_version = rinex_version;
|
||||
rp = std::make_shared<Rinex_Printer>(d_rinex_version);
|
||||
d_rinexobs_rate_ms = rinexobs_rate_ms;
|
||||
d_rinexnav_rate_ms = rinexnav_rate_ms;
|
||||
|
||||
d_dump_filename.append("_raw.dat");
|
||||
dump_ls_pvt_filename.append("_ls_pvt.dat");
|
||||
|
||||
@@ -339,21 +365,6 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
|
||||
d_ls_pvt->set_averaging_depth(1);
|
||||
|
||||
d_rx_time = 0.0;
|
||||
last_pvt_display_T_rx_s = 0.0;
|
||||
last_RTCM_1019_output_time = 0.0;
|
||||
last_RTCM_1020_output_time = 0.0;
|
||||
last_RTCM_1045_output_time = 0.0;
|
||||
last_RTCM_1077_output_time = 0.0;
|
||||
last_RTCM_1087_output_time = 0.0;
|
||||
last_RTCM_1097_output_time = 0.0;
|
||||
last_RTCM_MSM_output_time = 0.0;
|
||||
last_RINEX_obs_output_time = 0.0;
|
||||
last_RINEX_nav_output_time = 0.0;
|
||||
|
||||
b_rinex_header_written = false;
|
||||
b_rinex_header_updated = false;
|
||||
d_rinex_version = rinex_version;
|
||||
rp = std::make_shared<Rinex_Printer>(d_rinex_version);
|
||||
|
||||
d_last_status_print_seg = 0;
|
||||
|
||||
@@ -392,7 +403,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
|
||||
{
|
||||
msgctl(sysv_msqid, IPC_RMID, NULL);
|
||||
|
||||
//save GPS L2CM ephemeris to XML file
|
||||
// save GPS L2CM ephemeris to XML file
|
||||
std::string file_name = "eph_GPS_CNAV.xml";
|
||||
|
||||
if (d_ls_pvt->gps_cnav_ephemeris_map.size() > 0)
|
||||
@@ -415,7 +426,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
|
||||
LOG(WARNING) << "Failed to save GPS L2CM or L5 Ephemeris, map is empty";
|
||||
}
|
||||
|
||||
//save GPS L1 CA ephemeris to XML file
|
||||
// save GPS L1 CA ephemeris to XML file
|
||||
file_name = "eph_GPS_L1CA.xml";
|
||||
|
||||
if (d_ls_pvt->gps_ephemeris_map.size() > 0)
|
||||
@@ -438,7 +449,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
|
||||
LOG(WARNING) << "Failed to save GPS L1 CA Ephemeris, map is empty";
|
||||
}
|
||||
|
||||
//save Galileo E1 ephemeris to XML file
|
||||
// save Galileo E1 ephemeris to XML file
|
||||
file_name = "eph_Galileo_E1.xml";
|
||||
|
||||
if (d_ls_pvt->galileo_ephemeris_map.size() > 0)
|
||||
@@ -461,7 +472,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
|
||||
LOG(WARNING) << "Failed to save Galileo E1 Ephemeris, map is empty";
|
||||
}
|
||||
|
||||
//save GLONASS GNAV ephemeris to XML file
|
||||
// save GLONASS GNAV ephemeris to XML file
|
||||
file_name = "eph_GLONASS_GNAV.xml";
|
||||
|
||||
if (d_ls_pvt->glonass_gnav_ephemeris_map.size() > 0)
|
||||
@@ -483,6 +494,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
|
||||
{
|
||||
LOG(WARNING) << "Failed to save GLONASS GNAV Ephemeris, map is empty";
|
||||
}
|
||||
|
||||
if (d_dump_file.is_open() == true)
|
||||
{
|
||||
try
|
||||
@@ -505,15 +517,15 @@ bool rtklib_pvt_cc::observables_pairCompare_min(const std::pair<int, Gnss_Synchr
|
||||
|
||||
bool rtklib_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff)
|
||||
{
|
||||
/* Fill Sys V message structures */
|
||||
// Fill Sys V message structures
|
||||
int msgsend_size;
|
||||
ttff_msgbuf msg;
|
||||
msg.ttff = ttff.ttff;
|
||||
msgsend_size = sizeof(msg.ttff);
|
||||
msg.mtype = 1; /* default message ID */
|
||||
msg.mtype = 1; // default message ID
|
||||
|
||||
/* SEND SOLUTION OVER A MESSAGE QUEUE */
|
||||
/* non-blocking Sys V message send */
|
||||
// SEND SOLUTION OVER A MESSAGE QUEUE
|
||||
// non-blocking Sys V message send
|
||||
msgsnd(sysv_msqid, &msg, msgsend_size, IPC_NOWAIT);
|
||||
return true;
|
||||
}
|
||||
@@ -601,75 +613,73 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
if (gnss_observables_map.size() > 0)
|
||||
{
|
||||
double current_RX_time = gnss_observables_map.begin()->second.RX_time;
|
||||
|
||||
if (std::fabs(current_RX_time - d_rx_time) * 1000.0 >= static_cast<double>(d_output_rate_ms))
|
||||
unsigned int current_RX_time_ms = static_cast<unsigned int>(current_RX_time * 1000.0);
|
||||
if (current_RX_time_ms % d_output_rate_ms == 0)
|
||||
{
|
||||
flag_compute_pvt_output = true;
|
||||
d_rx_time = current_RX_time;
|
||||
// std::cout.precision(17);
|
||||
// std::cout << "current_RX_time: " << current_RX_time << " map time: " << gnss_observables_map.begin()->second.RX_time << std::endl;
|
||||
}
|
||||
|
||||
// compute on the fly PVT solution
|
||||
if (flag_compute_pvt_output == true)
|
||||
{
|
||||
if (d_ls_pvt->get_PVT(gnss_observables_map, d_rx_time, false))
|
||||
// receiver clock correction is disabled to be coherent with the RINEX and RTCM standard
|
||||
// std::cout << TEXT_RED << "(internal) accumulated RX clock offset: " << d_ls_pvt->get_time_offset_s() << "[s]" << TEXT_RESET << std::endl;
|
||||
// for (std::map<int, Gnss_Synchro>::iterator it = gnss_observables_map.begin(); it != gnss_observables_map.end(); ++it)
|
||||
// {
|
||||
// todo: check if it has effect to correct the receiver time for the internal pvt solution
|
||||
// take into account that the RINEX obs with the RX time (integer ms) CAN NOT be corrected to keep the coherence in obs time
|
||||
// it->second.Pseudorange_m = it->second.Pseudorange_m - d_ls_pvt->get_time_offset_s() * GPS_C_m_s;
|
||||
// }
|
||||
|
||||
if (d_ls_pvt->get_PVT(gnss_observables_map, false))
|
||||
{
|
||||
if (std::fabs(current_RX_time - last_pvt_display_T_rx_s) * 1000.0 >= static_cast<double>(d_display_rate_ms))
|
||||
if (current_RX_time_ms % d_display_rate_ms == 0)
|
||||
{
|
||||
flag_display_pvt = true;
|
||||
last_pvt_display_T_rx_s = current_RX_time;
|
||||
}
|
||||
if ((std::fabs(current_RX_time - last_RTCM_1019_output_time) * 1000.0 >= static_cast<double>(d_rtcm_MT1019_rate_ms)) and (d_rtcm_MT1019_rate_ms != 0)) // allows deactivating messages by setting rate = 0
|
||||
if (current_RX_time_ms % d_rtcm_MT1019_rate_ms == 0 and d_rtcm_MT1019_rate_ms != 0) // allows deactivating messages by setting rate = 0
|
||||
{
|
||||
flag_write_RTCM_1019_output = true;
|
||||
last_RTCM_1019_output_time = current_RX_time;
|
||||
}
|
||||
if ((std::fabs(current_RX_time - last_RTCM_1020_output_time) * 1000.0 >= static_cast<double>(d_rtcm_MT1020_rate_ms)) and (d_rtcm_MT1020_rate_ms != 0)) // allows deactivating messages by setting rate = 0
|
||||
if (current_RX_time_ms % d_rtcm_MT1020_rate_ms == 0 and d_rtcm_MT1020_rate_ms != 0) // allows deactivating messages by setting rate = 0
|
||||
{
|
||||
flag_write_RTCM_1020_output = true;
|
||||
last_RTCM_1020_output_time = current_RX_time;
|
||||
}
|
||||
if ((std::fabs(current_RX_time - last_RTCM_1045_output_time) * 1000.0 >= static_cast<double>(d_rtcm_MT1045_rate_ms)) and (d_rtcm_MT1045_rate_ms != 0))
|
||||
if (current_RX_time_ms % d_rtcm_MT1045_rate_ms == 0 and d_rtcm_MT1045_rate_ms != 0)
|
||||
{
|
||||
flag_write_RTCM_1045_output = true;
|
||||
last_RTCM_1045_output_time = current_RX_time;
|
||||
}
|
||||
// TODO: RTCM 1077, 1087 and 1097 are not used, so, disable the output rates
|
||||
// if (current_RX_time_ms % d_rtcm_MT1077_rate_ms==0 and d_rtcm_MT1077_rate_ms != 0)
|
||||
// {
|
||||
// last_RTCM_1077_output_time = current_RX_time;
|
||||
// }
|
||||
// if (current_RX_time_ms % d_rtcm_MT1087_rate_ms==0 and d_rtcm_MT1087_rate_ms != 0)
|
||||
// {
|
||||
// last_RTCM_1087_output_time = current_RX_time;
|
||||
// }
|
||||
// if (current_RX_time_ms % d_rtcm_MT1097_rate_ms==0 and d_rtcm_MT1097_rate_ms != 0)
|
||||
// {
|
||||
// last_RTCM_1097_output_time = current_RX_time;
|
||||
// }
|
||||
|
||||
if ((std::fabs(current_RX_time - last_RTCM_1077_output_time) * 1000.0 >= static_cast<double>(d_rtcm_MT1077_rate_ms)) and (d_rtcm_MT1077_rate_ms != 0))
|
||||
{
|
||||
last_RTCM_1077_output_time = current_RX_time;
|
||||
}
|
||||
if ((std::fabs(current_RX_time - last_RTCM_1087_output_time) * 1000.0 >= static_cast<double>(d_rtcm_MT1087_rate_ms)) and (d_rtcm_MT1087_rate_ms != 0))
|
||||
{
|
||||
last_RTCM_1087_output_time = current_RX_time;
|
||||
}
|
||||
if ((std::fabs(current_RX_time - last_RTCM_1097_output_time) * 1000.0 >= static_cast<double>(d_rtcm_MT1097_rate_ms)) and (d_rtcm_MT1097_rate_ms != 0))
|
||||
{
|
||||
last_RTCM_1097_output_time = current_RX_time;
|
||||
}
|
||||
|
||||
if ((std::fabs(current_RX_time - last_RTCM_MSM_output_time) * 1000.0 >= static_cast<double>(d_rtcm_MSM_rate_ms)) and (d_rtcm_MSM_rate_ms != 0))
|
||||
if (current_RX_time_ms % d_rtcm_MSM_rate_ms == 0 and d_rtcm_MSM_rate_ms != 0)
|
||||
{
|
||||
flag_write_RTCM_MSM_output = true;
|
||||
last_RTCM_MSM_output_time = current_RX_time;
|
||||
}
|
||||
if ((std::fabs(current_RX_time - last_RINEX_obs_output_time) >= 1.0)) // TODO: Make it configurable
|
||||
if (current_RX_time_ms % static_cast<unsigned int>(d_rinexobs_rate_ms) == 0)
|
||||
{
|
||||
flag_write_RINEX_obs_output = true;
|
||||
last_RINEX_obs_output_time = current_RX_time;
|
||||
}
|
||||
|
||||
if ((std::fabs(current_RX_time - last_RINEX_nav_output_time) >= 6.0)) // TODO: Make it configurable
|
||||
if (current_RX_time_ms % static_cast<unsigned int>(d_rinexnav_rate_ms) == 0)
|
||||
{
|
||||
flag_write_RINEX_nav_output = true;
|
||||
last_RINEX_nav_output_time = current_RX_time;
|
||||
}
|
||||
|
||||
// correct the observable to account for the receiver clock offset
|
||||
|
||||
for (std::map<int, Gnss_Synchro>::iterator it = gnss_observables_map.begin(); it != gnss_observables_map.end(); ++it)
|
||||
{
|
||||
it->second.Pseudorange_m = it->second.Pseudorange_m - d_ls_pvt->get_time_offset_s() * GPS_C_m_s;
|
||||
}
|
||||
if (first_fix == true)
|
||||
{
|
||||
std::cout << "First position fix at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time())
|
||||
@@ -1523,8 +1533,8 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
}
|
||||
if (flag_write_RTCM_MSM_output == true)
|
||||
{
|
||||
//gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
|
||||
//galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
|
||||
// gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
|
||||
// galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
|
||||
unsigned int i = 0;
|
||||
for (gnss_observables_iter = gnss_observables_map.cbegin(); gnss_observables_iter != gnss_observables_map.cend(); gnss_observables_iter++)
|
||||
{
|
||||
@@ -1588,8 +1598,8 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
}
|
||||
if (flag_write_RTCM_MSM_output == true)
|
||||
{
|
||||
//gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
|
||||
//galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
|
||||
// gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
|
||||
// galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
|
||||
unsigned int i = 0;
|
||||
for (gnss_observables_iter = gnss_observables_map.begin(); gnss_observables_iter != gnss_observables_map.end(); gnss_observables_iter++)
|
||||
{
|
||||
@@ -1653,8 +1663,8 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
}
|
||||
if (flag_write_RTCM_MSM_output == true)
|
||||
{
|
||||
//gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
|
||||
//galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
|
||||
// gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
|
||||
// galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
|
||||
unsigned int i = 0;
|
||||
for (gnss_observables_iter = gnss_observables_map.cbegin(); gnss_observables_iter != gnss_observables_map.cend(); gnss_observables_iter++)
|
||||
{
|
||||
@@ -1840,8 +1850,8 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
}
|
||||
}
|
||||
|
||||
//gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
|
||||
//galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
|
||||
// gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
|
||||
// galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
|
||||
unsigned int i = 0;
|
||||
for (gnss_observables_iter = gnss_observables_map.cbegin(); gnss_observables_iter != gnss_observables_map.cend(); gnss_observables_iter++)
|
||||
{
|
||||
@@ -1955,8 +1965,8 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
}
|
||||
}
|
||||
|
||||
//gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
|
||||
//galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
|
||||
// gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
|
||||
// galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
|
||||
unsigned int i = 0;
|
||||
for (gnss_observables_iter = gnss_observables_map.cbegin(); gnss_observables_iter != gnss_observables_map.cend(); gnss_observables_iter++)
|
||||
{
|
||||
@@ -2072,18 +2082,36 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
// DEBUG MESSAGE: Display position in console output
|
||||
if (d_ls_pvt->is_valid_position() and flag_display_pvt)
|
||||
{
|
||||
std::cout << TEXT_BOLD_GREEN << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time())
|
||||
<< " UTC using " << d_ls_pvt->get_num_valid_observations() << " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude()
|
||||
<< " [deg], Height= " << d_ls_pvt->get_height() << " [m]" << TEXT_RESET << std::endl;
|
||||
std::streamsize ss = std::cout.precision(); // save current precision
|
||||
std::cout.setf(std::ios::fixed, std::ios::floatfield);
|
||||
|
||||
auto facet = new boost::posix_time::time_facet("%Y-%b-%d %H:%M:%S.%f %z");
|
||||
std::cout.imbue(std::locale(std::cout.getloc(), facet));
|
||||
|
||||
std::cout << TEXT_BOLD_GREEN
|
||||
<< "Position at " << d_ls_pvt->get_position_UTC_time()
|
||||
<< " UTC using " << d_ls_pvt->get_num_valid_observations()
|
||||
<< std::fixed << std::setprecision(9)
|
||||
<< " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude()
|
||||
<< std::fixed << std::setprecision(3)
|
||||
<< " [deg], Height = " << d_ls_pvt->get_height() << " [m]" << TEXT_RESET << std::endl;
|
||||
std::cout << std::setprecision(ss);
|
||||
LOG(INFO) << "RX clock offset: " << d_ls_pvt->get_time_offset_s() << "[s]";
|
||||
|
||||
// boost::posix_time::ptime p_time;
|
||||
// gtime_t rtklib_utc_time = gpst2time(adjgpsweek(d_ls_pvt->gps_ephemeris_map.cbegin()->second.i_GPS_week), d_rx_time);
|
||||
// p_time = boost::posix_time::from_time_t(rtklib_utc_time.time);
|
||||
// p_time += boost::posix_time::microseconds(round(rtklib_utc_time.sec * 1e6));
|
||||
// std::cout << TEXT_MAGENTA << "Observable RX time (GPST) " << boost::posix_time::to_simple_string(p_time) << TEXT_RESET << std::endl;
|
||||
|
||||
LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time())
|
||||
<< " UTC using " << d_ls_pvt->get_num_valid_observations() << " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude()
|
||||
<< " [deg], Height= " << d_ls_pvt->get_height() << " [m]";
|
||||
<< " [deg], Height = " << d_ls_pvt->get_height() << " [m]";
|
||||
|
||||
/* std::cout << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time())
|
||||
<< " UTC using "<< d_ls_pvt->get_num_valid_observations()<<" observations is HDOP = " << d_ls_pvt->get_HDOP() << " VDOP = "
|
||||
<< d_ls_pvt->get_VDOP() <<" TDOP = " << d_ls_pvt->get_TDOP()
|
||||
<< " GDOP = " << d_ls_pvt->get_GDOP() << std::endl; */
|
||||
<< " UTC using "<< d_ls_pvt->get_num_valid_observations() <<" observations is HDOP = " << d_ls_pvt->get_hdop() << " VDOP = "
|
||||
<< d_ls_pvt->get_vdop()
|
||||
<< " GDOP = " << d_ls_pvt->get_gdop() << std::endl; */
|
||||
}
|
||||
|
||||
// MULTIPLEXED FILE RECORDING - Record results to file
|
||||
|
||||
@@ -62,6 +62,8 @@ rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int n_channels,
|
||||
std::string nmea_dump_filename,
|
||||
std::string nmea_dump_devname,
|
||||
int rinex_version,
|
||||
int rinexobs_rate_ms,
|
||||
int rinexnav_rate_ms,
|
||||
bool flag_rtcm_server,
|
||||
bool flag_rtcm_tty_port,
|
||||
unsigned short rtcm_tcp_port,
|
||||
@@ -86,6 +88,8 @@ private:
|
||||
std::string nmea_dump_filename,
|
||||
std::string nmea_dump_devname,
|
||||
int rinex_version,
|
||||
int rinexobs_rate_ms,
|
||||
int rinexnav_rate_ms,
|
||||
bool flag_rtcm_server,
|
||||
bool flag_rtcm_tty_port,
|
||||
unsigned short rtcm_tcp_port,
|
||||
@@ -101,6 +105,9 @@ private:
|
||||
bool b_rinex_header_written;
|
||||
bool b_rinex_header_updated;
|
||||
double d_rinex_version;
|
||||
int d_rinexobs_rate_ms;
|
||||
int d_rinexnav_rate_ms;
|
||||
|
||||
bool b_rtcm_writing_started;
|
||||
int d_rtcm_MT1045_rate_ms; //!< Galileo Broadcast Ephemeris
|
||||
int d_rtcm_MT1019_rate_ms; //!< GPS Broadcast Ephemeris (orbits)
|
||||
@@ -126,16 +133,7 @@ private:
|
||||
std::shared_ptr<GeoJSON_Printer> d_geojson_printer;
|
||||
std::shared_ptr<Rtcm_Printer> d_rtcm_printer;
|
||||
double d_rx_time;
|
||||
double last_pvt_display_T_rx_s;
|
||||
double last_RTCM_1019_output_time;
|
||||
double last_RTCM_1020_output_time;
|
||||
double last_RTCM_1045_output_time;
|
||||
double last_RTCM_1077_output_time;
|
||||
double last_RTCM_1087_output_time;
|
||||
double last_RTCM_1097_output_time;
|
||||
double last_RTCM_MSM_output_time;
|
||||
double last_RINEX_obs_output_time;
|
||||
double last_RINEX_nav_output_time;
|
||||
|
||||
std::shared_ptr<rtklib_solver> d_ls_pvt;
|
||||
|
||||
std::map<int, Gnss_Synchro> gnss_observables_map;
|
||||
@@ -163,6 +161,8 @@ public:
|
||||
std::string nmea_dump_filename,
|
||||
std::string nmea_dump_devname,
|
||||
int rinex_version,
|
||||
int rinexobs_rate_ms,
|
||||
int rinexnav_rate_ms,
|
||||
bool flag_rtcm_server,
|
||||
bool flag_rtcm_tty_port,
|
||||
unsigned short rtcm_tcp_port,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* \file gpx_printer.cc
|
||||
* \brief Interface of a class that prints PVT information to a gpx file
|
||||
* \brief Implementation of a class that prints PVT information to a gpx file
|
||||
* \author Álvaro Cebrián Juan, 2018. acebrianjuan(at)gmail.com
|
||||
*
|
||||
*
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "Galileo_E1.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
@@ -338,7 +339,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
|
||||
}
|
||||
|
||||
// get time string Gregorian calendar
|
||||
boost::posix_time::time_duration t = boost::posix_time::seconds(utc);
|
||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<long>(utc * 1000.0));
|
||||
// 22 August 1999 00:00 last Galileo start GST epoch (ICD sec 5.1.2)
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
this->set_position_UTC_time(p_time);
|
||||
|
||||
@@ -8247,7 +8247,7 @@ boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Gps_Navigation_Me
|
||||
// if we are processing a file -> wait to leap second to resolve the ambiguity else take the week from the local system time
|
||||
//: idea resolve the ambiguity with the leap second http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm
|
||||
const double utc_t = nav_msg.utc_time(nav_msg.d_TOW);
|
||||
boost::posix_time::time_duration t = boost::posix_time::millisec((utc_t + 604800 * static_cast<double>(nav_msg.i_GPS_week)) * 1000);
|
||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<long>((utc_t + 604800 * static_cast<double>(nav_msg.i_GPS_week)) * 1000));
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
return p_time;
|
||||
}
|
||||
@@ -8260,7 +8260,7 @@ boost::posix_time::ptime Rinex_Printer::compute_GPS_time(const Gps_Ephemeris& ep
|
||||
// (see Pag. 17 in http://igscb.jpl.nasa.gov/igscb/data/format/rinex300.pdf)
|
||||
// --??? No time correction here, since it will be done in the RINEX processor
|
||||
const double gps_t = obs_time;
|
||||
boost::posix_time::time_duration t = boost::posix_time::millisec((gps_t + 604800 * static_cast<double>(eph.i_GPS_week % 1024)) * 1000);
|
||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<long>((gps_t + 604800 * static_cast<double>(eph.i_GPS_week % 1024)) * 1000));
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
return p_time;
|
||||
}
|
||||
@@ -8273,7 +8273,7 @@ boost::posix_time::ptime Rinex_Printer::compute_GPS_time(const Gps_CNAV_Ephemeri
|
||||
// (see Pag. 17 in http://igscb.jpl.nasa.gov/igscb/data/format/rinex300.pdf)
|
||||
// --??? No time correction here, since it will be done in the RINEX processor
|
||||
const double gps_t = obs_time;
|
||||
boost::posix_time::time_duration t = boost::posix_time::millisec((gps_t + 604800 * static_cast<double>(eph.i_GPS_week % 1024)) * 1000);
|
||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<long>((gps_t + 604800 * static_cast<double>(eph.i_GPS_week % 1024)) * 1000));
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
return p_time;
|
||||
}
|
||||
@@ -8285,7 +8285,7 @@ boost::posix_time::ptime Rinex_Printer::compute_Galileo_time(const Galileo_Ephem
|
||||
// (see Pag. 17 in http://igscb.jpl.nasa.gov/igscb/data/format/rinex301.pdf)
|
||||
// --??? No time correction here, since it will be done in the RINEX processor
|
||||
double galileo_t = obs_time;
|
||||
boost::posix_time::time_duration t = boost::posix_time::millisec((galileo_t + 604800 * static_cast<double>(eph.WN_5)) * 1000); //
|
||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<long>((galileo_t + 604800 * static_cast<double>(eph.WN_5)) * 1000)); //
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
return p_time;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag
|
||||
count_valid_position = 0;
|
||||
this->set_averaging_flag(false);
|
||||
rtk_ = rtk;
|
||||
for (unsigned int i = 0; i > 4; i++) dop_[i] = 0.0;
|
||||
for (unsigned int i = 0; i < 4; i++) dop_[i] = 0.0;
|
||||
pvt_sol = {{0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, '0', '0', '0', 0, 0, 0};
|
||||
|
||||
// ############# ENABLE DATA FILE LOG #################
|
||||
@@ -133,7 +133,7 @@ double rtklib_solver::get_vdop() const
|
||||
}
|
||||
|
||||
|
||||
bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, double Rx_time, bool flag_averaging)
|
||||
bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging)
|
||||
{
|
||||
std::map<int, Gnss_Synchro>::const_iterator gnss_observables_iter;
|
||||
std::map<int, Galileo_Ephemeris>::const_iterator galileo_ephemeris_iter;
|
||||
@@ -147,16 +147,45 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
// ********************************************************************************
|
||||
// ****** PREPARE THE DATA (SV EPHEMERIS AND OBSERVATIONS) ************************
|
||||
// ********************************************************************************
|
||||
int valid_obs = 0; //valid observations counter
|
||||
int glo_valid_obs = 0; //GLONASS L1/L2 valid observations counter
|
||||
int valid_obs = 0; // valid observations counter
|
||||
int glo_valid_obs = 0; // GLONASS L1/L2 valid observations counter
|
||||
|
||||
obsd_t obs_data[MAXOBS];
|
||||
eph_t eph_data[MAXOBS];
|
||||
geph_t geph_data[MAXOBS];
|
||||
|
||||
// Workaround for NAV/CNAV clash problem
|
||||
bool gps_dual_band = false;
|
||||
bool band1 = false;
|
||||
bool band2 = false;
|
||||
for (gnss_observables_iter = gnss_observables_map.cbegin();
|
||||
gnss_observables_iter != gnss_observables_map.cend();
|
||||
gnss_observables_iter++) //CHECK INCONSISTENCY when combining GLONASS + other system
|
||||
++gnss_observables_iter)
|
||||
{
|
||||
switch (gnss_observables_iter->second.System)
|
||||
{
|
||||
case 'G':
|
||||
{
|
||||
std::string sig_(gnss_observables_iter->second.Signal);
|
||||
if (sig_.compare("1C") == 0)
|
||||
{
|
||||
band1 = true;
|
||||
}
|
||||
if (sig_.compare("2S") == 0)
|
||||
{
|
||||
band2 = true;
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
if (band1 == true and band2 == true) gps_dual_band = true;
|
||||
|
||||
for (gnss_observables_iter = gnss_observables_map.cbegin();
|
||||
gnss_observables_iter != gnss_observables_map.cend();
|
||||
++gnss_observables_iter) // CHECK INCONSISTENCY when combining GLONASS + other system
|
||||
{
|
||||
switch (gnss_observables_iter->second.System)
|
||||
{
|
||||
@@ -170,9 +199,9 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
galileo_ephemeris_iter = galileo_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||
if (galileo_ephemeris_iter != galileo_ephemeris_map.cend())
|
||||
{
|
||||
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
eph_data[valid_obs] = eph_to_rtklib(galileo_ephemeris_iter->second);
|
||||
//convert observation from GNSS-SDR class to RTKLIB structure
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {}, {}, {}, {}, {}};
|
||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||
gnss_observables_iter->second,
|
||||
@@ -201,17 +230,17 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs],
|
||||
gnss_observables_iter->second,
|
||||
galileo_ephemeris_iter->second.WN_5,
|
||||
2); //Band 3 (L5/E5)
|
||||
2); // Band 3 (L5/E5)
|
||||
found_E1_obs = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found_E1_obs)
|
||||
{
|
||||
//insert Galileo E5 obs as new obs and also insert its ephemeris
|
||||
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
// insert Galileo E5 obs as new obs and also insert its ephemeris
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
eph_data[valid_obs] = eph_to_rtklib(galileo_ephemeris_iter->second);
|
||||
//convert observation from GNSS-SDR class to RTKLIB structure
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
unsigned char default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||
{default_code_, default_code_, default_code_},
|
||||
@@ -219,7 +248,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||
gnss_observables_iter->second,
|
||||
galileo_ephemeris_iter->second.WN_5,
|
||||
2); //Band 3 (L5/E5)
|
||||
2); // Band 3 (L5/E5)
|
||||
valid_obs++;
|
||||
}
|
||||
}
|
||||
@@ -240,9 +269,9 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
gps_ephemeris_iter = gps_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||
if (gps_ephemeris_iter != gps_ephemeris_map.cend())
|
||||
{
|
||||
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
eph_data[valid_obs] = eph_to_rtklib(gps_ephemeris_iter->second);
|
||||
//convert observation from GNSS-SDR class to RTKLIB structure
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {}, {}, {}, {}, {}};
|
||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||
gnss_observables_iter->second,
|
||||
@@ -255,8 +284,8 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->first;
|
||||
}
|
||||
}
|
||||
//GPS L2
|
||||
if (sig_.compare("2S") == 0)
|
||||
// GPS L2 (todo: solve NAV/CNAV clash)
|
||||
if ((sig_.compare("2S") == 0) and (gps_dual_band == false))
|
||||
{
|
||||
gps_cnav_ephemeris_iter = gps_cnav_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||
if (gps_cnav_ephemeris_iter != gps_cnav_ephemeris_map.cend())
|
||||
@@ -276,7 +305,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs],
|
||||
gnss_observables_iter->second,
|
||||
eph_data[i].week,
|
||||
1); //Band 2 (L2)
|
||||
1); // Band 2 (L2)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -285,9 +314,9 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
else
|
||||
{
|
||||
// 3. If not found, insert the GPS L2 ephemeris and the observation
|
||||
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
||||
//convert observation from GNSS-SDR class to RTKLIB structure
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
unsigned char default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||
{default_code_, default_code_, default_code_},
|
||||
@@ -295,7 +324,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||
gnss_observables_iter->second,
|
||||
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
||||
1); //Band 2 (L2)
|
||||
1); // Band 2 (L2)
|
||||
valid_obs++;
|
||||
}
|
||||
}
|
||||
@@ -304,7 +333,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
||||
}
|
||||
}
|
||||
//GPS L5
|
||||
// GPS L5
|
||||
if (sig_.compare("L5") == 0)
|
||||
{
|
||||
gps_cnav_ephemeris_iter = gps_cnav_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||
@@ -324,7 +353,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i],
|
||||
gnss_observables_iter->second,
|
||||
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
||||
2); //Band 3 (L5)
|
||||
2); // Band 3 (L5)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -332,9 +361,9 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
else
|
||||
{
|
||||
// 3. If not found, insert the GPS L5 ephemeris and the observation
|
||||
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
||||
//convert observation from GNSS-SDR class to RTKLIB structure
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
unsigned char default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||
{default_code_, default_code_, default_code_},
|
||||
@@ -342,7 +371,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||
gnss_observables_iter->second,
|
||||
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
||||
2); //Band 3 (L5)
|
||||
2); // Band 3 (L5)
|
||||
valid_obs++;
|
||||
}
|
||||
}
|
||||
@@ -363,14 +392,14 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
glonass_gnav_ephemeris_iter = glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||
if (glonass_gnav_ephemeris_iter != glonass_gnav_ephemeris_map.cend())
|
||||
{
|
||||
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
geph_data[glo_valid_obs] = eph_to_rtklib(glonass_gnav_ephemeris_iter->second, gnav_utc);
|
||||
//convert observation from GNSS-SDR class to RTKLIB structure
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {}, {}, {}, {}, {}};
|
||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||
gnss_observables_iter->second,
|
||||
glonass_gnav_ephemeris_iter->second.d_WN,
|
||||
0); //Band 0 (L1)
|
||||
0); // Band 0 (L1)
|
||||
glo_valid_obs++;
|
||||
}
|
||||
else // the ephemeris are not available for this SV
|
||||
@@ -400,15 +429,15 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
}
|
||||
if (!found_L1_obs)
|
||||
{
|
||||
//insert GLONASS GNAV L2 obs as new obs and also insert its ephemeris
|
||||
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
// insert GLONASS GNAV L2 obs as new obs and also insert its ephemeris
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
geph_data[glo_valid_obs] = eph_to_rtklib(glonass_gnav_ephemeris_iter->second, gnav_utc);
|
||||
//convert observation from GNSS-SDR class to RTKLIB structure
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {}, {}, {}, {}, {}};
|
||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||
gnss_observables_iter->second,
|
||||
glonass_gnav_ephemeris_iter->second.d_WN,
|
||||
1); //Band 1 (L2)
|
||||
1); // Band 1 (L2)
|
||||
glo_valid_obs++;
|
||||
}
|
||||
}
|
||||
@@ -463,14 +492,14 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
unsigned int used_sats = 0;
|
||||
for (unsigned int i = 0; i < MAXSAT; i++)
|
||||
{
|
||||
if (int vsat = rtk_.ssat[i].vsat[0] == 1) used_sats++;
|
||||
if (rtk_.ssat[i].vsat[0] == 1) used_sats++;
|
||||
}
|
||||
|
||||
double azel[used_sats * 2];
|
||||
unsigned int index_aux = 0;
|
||||
for (unsigned int i = 0; i < MAXSAT; i++)
|
||||
{
|
||||
if (int vsat = rtk_.ssat[i].vsat[0] == 1)
|
||||
if (rtk_.ssat[i].vsat[0] == 1)
|
||||
{
|
||||
azel[2 * index_aux] = rtk_.ssat[i].azel[0];
|
||||
azel[2 * index_aux + 1] = rtk_.ssat[i].azel[1];
|
||||
@@ -481,19 +510,35 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
|
||||
this->set_valid_position(true);
|
||||
arma::vec rx_position_and_time(4);
|
||||
rx_position_and_time(0) = pvt_sol.rr[0];
|
||||
rx_position_and_time(1) = pvt_sol.rr[1];
|
||||
rx_position_and_time(2) = pvt_sol.rr[2];
|
||||
rx_position_and_time(3) = pvt_sol.dtr[0];
|
||||
rx_position_and_time(0) = pvt_sol.rr[0]; // [m]
|
||||
rx_position_and_time(1) = pvt_sol.rr[1]; // [m]
|
||||
rx_position_and_time(2) = pvt_sol.rr[2]; // [m]
|
||||
|
||||
//todo: fix this ambiguity in the RTKLIB units in receiver clock offset!
|
||||
if (rtk_.opt.mode == PMODE_SINGLE)
|
||||
{
|
||||
rx_position_and_time(3) = pvt_sol.dtr[0]; // if the RTKLIB solver is set to SINGLE, the dtr is already expressed in [s]
|
||||
}
|
||||
else
|
||||
{
|
||||
rx_position_and_time(3) = pvt_sol.dtr[0] / GPS_C_m_s; // the receiver clock offset is expressed in [meters], so we convert it into [s]
|
||||
}
|
||||
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
|
||||
double offset_s = this->get_time_offset_s();
|
||||
this->set_time_offset_s(offset_s + (rx_position_and_time(3) / GPS_C_m_s)); // accumulate the rx time error for the next iteration [meters]->[seconds]
|
||||
DLOG(INFO) << "RTKLIB Position at TOW=" << Rx_time << " in ECEF (X,Y,Z,t[meters]) = " << rx_position_and_time;
|
||||
//observable fix:
|
||||
//double offset_s = this->get_time_offset_s();
|
||||
//this->set_time_offset_s(offset_s + (rx_position_and_time(3) / GPS_C_m_s)); // accumulate the rx time error for the next iteration [meters]->[seconds]
|
||||
this->set_time_offset_s(rx_position_and_time(3));
|
||||
|
||||
DLOG(INFO) << "RTKLIB Position at RX TOW = " << gnss_observables_map.begin()->second.RX_time
|
||||
<< " in ECEF (X,Y,Z,t[meters]) = " << rx_position_and_time;
|
||||
|
||||
boost::posix_time::ptime p_time;
|
||||
gtime_t rtklib_utc_time = gpst2utc(pvt_sol.time);
|
||||
// gtime_t rtklib_utc_time = gpst2utc(pvt_sol.time); //Corrected RX Time (Non integer multiply of 1 ms of granularity)
|
||||
// Uncorrected RX Time (integer multiply of 1 ms and the same observables time reported in RTCM and RINEX)
|
||||
gtime_t rtklib_time = gpst2time(adjgpsweek(nav_data.eph[0].week), gnss_observables_map.begin()->second.RX_time);
|
||||
gtime_t rtklib_utc_time = gpst2utc(rtklib_time);
|
||||
p_time = boost::posix_time::from_time_t(rtklib_utc_time.time);
|
||||
p_time += boost::posix_time::microseconds(round(rtklib_utc_time.sec * 1e6));
|
||||
p_time += boost::posix_time::microseconds(static_cast<long>(round(rtklib_utc_time.sec * 1e6)));
|
||||
this->set_position_UTC_time(p_time);
|
||||
cart2geo(static_cast<double>(rx_position_and_time(0)), static_cast<double>(rx_position_and_time(1)), static_cast<double>(rx_position_and_time(2)), 4);
|
||||
|
||||
@@ -509,8 +554,8 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
try
|
||||
{
|
||||
double tmp_double;
|
||||
// PVT GPS time
|
||||
tmp_double = Rx_time;
|
||||
// PVT GPS time
|
||||
tmp_double = gnss_observables_map.begin()->second.RX_time;
|
||||
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
||||
// ECEF User Position East [m]
|
||||
tmp_double = rx_position_and_time(0);
|
||||
|
||||
@@ -85,12 +85,12 @@ public:
|
||||
rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, rtk_t& rtk);
|
||||
~rtklib_solver();
|
||||
|
||||
bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, double Rx_time, bool flag_averaging);
|
||||
bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging);
|
||||
double get_hdop() const;
|
||||
double get_vdop() const;
|
||||
double get_pdop() const;
|
||||
double get_gdop() const;
|
||||
|
||||
|
||||
std::map<int, Galileo_Ephemeris> galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris
|
||||
std::map<int, Gps_Ephemeris> gps_ephemeris_map; //!< Map storing new GPS_Ephemeris
|
||||
std::map<int, Gps_CNAV_Ephemeris> gps_cnav_ephemeris_map; //!< Map storing new GPS_CNAV_Ephemeris
|
||||
|
||||
@@ -18,7 +18,4 @@
|
||||
|
||||
add_subdirectory(adapters)
|
||||
add_subdirectory(gnuradio_blocks)
|
||||
if(ENABLE_FPGA)
|
||||
add_subdirectory(libs)
|
||||
endif(ENABLE_FPGA)
|
||||
|
||||
add_subdirectory(libs)
|
||||
|
||||
@@ -65,4 +65,4 @@ file(GLOB ACQ_ADAPTER_HEADERS "*.h")
|
||||
list(SORT ACQ_ADAPTER_HEADERS)
|
||||
add_library(acq_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS})
|
||||
source_group(Headers FILES ${ACQ_ADAPTER_HEADERS})
|
||||
target_link_libraries(acq_adapters gnss_sp_libs gnss_sdr_flags acq_gr_blocks ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})
|
||||
target_link_libraries(acq_adapters acquisition_lib gnss_sp_libs gnss_sdr_flags acq_gr_blocks ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})
|
||||
|
||||
@@ -55,7 +55,6 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
@@ -88,7 +87,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = galileo_pcps_8ms_make_acquisition_cc(sampled_ms_, max_dwells_,
|
||||
doppler_max_, if_, fs_in_, samples_per_ms, code_length_,
|
||||
doppler_max_, fs_in_, samples_per_ms, code_length_,
|
||||
dump_, dump_filename_);
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
DLOG(INFO) << "stream_to_vector("
|
||||
@@ -106,6 +105,14 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -139,7 +139,6 @@ private:
|
||||
unsigned int sampled_ms_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
@@ -45,7 +46,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
pcpsconf_t acq_parameters;
|
||||
Acq_Conf acq_parameters;
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
@@ -57,10 +58,9 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
acq_parameters.freq = if_;
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0);
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters.blocking = blocking_;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
@@ -104,6 +104,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false);
|
||||
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
|
||||
@@ -120,6 +121,14 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -152,7 +152,6 @@ private:
|
||||
unsigned int sampled_ms_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
bool blocking_;
|
||||
std::string dump_filename_;
|
||||
|
||||
@@ -54,7 +54,6 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
@@ -89,7 +88,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_cccwsr_make_acquisition_cc(sampled_ms_, max_dwells_,
|
||||
doppler_max_, if_, fs_in_, samples_per_ms, code_length_,
|
||||
doppler_max_, fs_in_, samples_per_ms, code_length_,
|
||||
dump_, dump_filename_);
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
DLOG(INFO) << "stream_to_vector("
|
||||
@@ -107,6 +106,14 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -142,7 +142,6 @@ private:
|
||||
unsigned int sampled_ms_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_data_;
|
||||
|
||||
@@ -55,7 +55,6 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
@@ -70,7 +69,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
/*Calculate the folding factor value based on the formula described in the paper.
|
||||
This may be a bug, but acquisition also work by variying the folding factor at va-
|
||||
lues different that the expressed in the paper. In adition, it is important to point
|
||||
out that by making the folding factor smaller we were able to get QuickSync work with
|
||||
out that by making the folding factor smaller we were able to get QuickSync work with
|
||||
Galileo. Future work should be directed to test this asumption statistically.*/
|
||||
|
||||
//folding_factor_ = static_cast<unsigned int>(ceil(sqrt(log2(code_length_))));
|
||||
@@ -120,7 +119,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_,
|
||||
sampled_ms_, max_dwells_, doppler_max_, if_, fs_in_,
|
||||
sampled_ms_, max_dwells_, doppler_max_, fs_in_,
|
||||
samples_per_ms, code_length_, bit_transition_flag_,
|
||||
dump_, dump_filename_);
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_,
|
||||
@@ -140,6 +139,14 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -146,7 +146,6 @@ private:
|
||||
unsigned int max_dwells_;
|
||||
unsigned int folding_factor_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_;
|
||||
|
||||
@@ -55,7 +55,6 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
@@ -91,7 +90,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_,
|
||||
if_, fs_in_, samples_per_ms, code_length_, tong_init_val_,
|
||||
fs_in_, samples_per_ms, code_length_, tong_init_val_,
|
||||
tong_max_val_, tong_max_dwells_, dump_, dump_filename_);
|
||||
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
@@ -110,6 +109,14 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -146,7 +146,6 @@ private:
|
||||
unsigned int tong_max_val_;
|
||||
unsigned int tong_max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_;
|
||||
|
||||
@@ -60,7 +60,6 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
@@ -102,7 +101,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(sampled_ms_, max_dwells_,
|
||||
doppler_max_, if_, fs_in_, code_length_, code_length_, bit_transition_flag_,
|
||||
doppler_max_, fs_in_, code_length_, code_length_, bit_transition_flag_,
|
||||
dump_, dump_filename_, both_signal_components, CAF_window_hz_, Zero_padding);
|
||||
}
|
||||
else
|
||||
@@ -115,6 +114,14 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -146,7 +146,6 @@ private:
|
||||
unsigned int sampled_ms_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
int Zero_padding;
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
@@ -44,7 +45,7 @@ using google::LogMessage;
|
||||
GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
pcpsconf_t acq_parameters;
|
||||
Acq_Conf acq_parameters = Acq_Conf();
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "../data/acquisition.dat";
|
||||
@@ -56,7 +57,6 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
acq_parameters.freq = 0;
|
||||
acq_pilot_ = configuration_->property(role + ".acquire_pilot", false);
|
||||
acq_iq_ = configuration_->property(role + ".acquire_iq", false);
|
||||
if (acq_iq_)
|
||||
@@ -65,6 +65,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
}
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
@@ -105,6 +106,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false);
|
||||
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
@@ -112,6 +114,14 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "configuration_interface.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
@@ -46,7 +47,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
pcpsconf_t acq_parameters;
|
||||
Acq_Conf acq_parameters = Acq_Conf();
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
@@ -58,10 +59,9 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
acq_parameters.freq = if_;
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0);
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters.blocking = blocking_;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
@@ -104,6 +104,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false);
|
||||
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
|
||||
@@ -120,6 +121,14 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -151,7 +151,6 @@ private:
|
||||
unsigned int sampled_ms_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
bool blocking_;
|
||||
std::string dump_filename_;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@@ -45,7 +46,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
pcpsconf_t acq_parameters;
|
||||
Acq_Conf acq_parameters = Acq_Conf();
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
@@ -57,10 +58,9 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
acq_parameters.freq = if_;
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0);
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters.blocking = blocking_;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
@@ -103,6 +103,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false);
|
||||
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
|
||||
@@ -119,6 +120,14 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -150,7 +150,6 @@ private:
|
||||
unsigned int sampled_ms_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
bool blocking_;
|
||||
std::string dump_filename_;
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@@ -48,7 +49,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
pcpsconf_t acq_parameters;
|
||||
Acq_Conf acq_parameters = Acq_Conf();
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
@@ -59,10 +60,9 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
acq_parameters.freq = if_;
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0);
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters.blocking = blocking_;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
@@ -104,6 +104,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
acq_parameters.samples_per_ms = code_length_;
|
||||
acq_parameters.samples_per_code = code_length_;
|
||||
acq_parameters.it_size = item_size_;
|
||||
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
|
||||
@@ -120,6 +121,14 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -155,7 +155,6 @@ private:
|
||||
unsigned int sampled_ms_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
bool blocking_;
|
||||
std::string dump_filename_;
|
||||
|
||||
@@ -53,7 +53,6 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
long fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
if_ = configuration->property(role + ".if", 0);
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
@@ -71,7 +70,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_make_acquisition_fine_doppler_cc(max_dwells_, sampled_ms_,
|
||||
doppler_max_, doppler_min_, if_, fs_in_, vector_length_,
|
||||
doppler_max_, doppler_min_, fs_in_, vector_length_,
|
||||
dump_, dump_filename_);
|
||||
}
|
||||
else
|
||||
@@ -84,6 +83,14 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -135,7 +135,6 @@ private:
|
||||
unsigned int sampled_ms_;
|
||||
int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_;
|
||||
|
||||
@@ -60,8 +60,6 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in;
|
||||
long ifreq = configuration_->property(role + ".if", 0);
|
||||
acq_parameters.freq = ifreq;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
@@ -95,7 +93,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
{
|
||||
gps_l1_ca_code_gen_complex_sampled(code, PRN, fs_in, 0); // generate PRN code
|
||||
// fill in zero padding
|
||||
for (int s = code_length; s < nsamples_total; s++)
|
||||
for (unsigned int s = code_length; s < nsamples_total; s++)
|
||||
{
|
||||
code[s] = 0;
|
||||
}
|
||||
@@ -136,6 +134,14 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
long fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
if_ = configuration->property(role + ".if", 0);
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
@@ -72,7 +71,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_make_assisted_acquisition_cc(max_dwells_, sampled_ms_,
|
||||
doppler_max_, doppler_min_, if_, fs_in_, vector_length_,
|
||||
doppler_max_, doppler_min_, fs_in_, vector_length_,
|
||||
dump_, dump_filename_);
|
||||
}
|
||||
else
|
||||
@@ -85,6 +84,14 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -136,7 +136,6 @@ private:
|
||||
unsigned int sampled_ms_;
|
||||
int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_;
|
||||
|
||||
@@ -55,7 +55,6 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
||||
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
@@ -86,7 +85,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_make_opencl_acquisition_cc(sampled_ms_, max_dwells_,
|
||||
doppler_max_, if_, fs_in_, code_length_, code_length_,
|
||||
doppler_max_, fs_in_, code_length_, code_length_,
|
||||
bit_transition_flag_, dump_, dump_filename_);
|
||||
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
@@ -104,6 +103,14 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -140,7 +140,6 @@ private:
|
||||
unsigned int sampled_ms_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_;
|
||||
|
||||
@@ -54,7 +54,6 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
item_type_ = configuration_->property(role + ".item_type", default_item_type);
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
@@ -113,7 +112,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_,
|
||||
sampled_ms_, max_dwells_, doppler_max_, if_, fs_in_,
|
||||
sampled_ms_, max_dwells_, doppler_max_, fs_in_,
|
||||
samples_per_ms, code_length_, bit_transition_flag_,
|
||||
dump_, dump_filename_);
|
||||
|
||||
@@ -133,6 +132,14 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -148,7 +148,6 @@ private:
|
||||
unsigned int max_dwells_;
|
||||
unsigned int folding_factor_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_;
|
||||
|
||||
@@ -54,7 +54,6 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
@@ -76,7 +75,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, if_, fs_in_,
|
||||
acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, fs_in_,
|
||||
code_length_, code_length_, tong_init_val_, tong_max_val_, tong_max_dwells_,
|
||||
dump_, dump_filename_);
|
||||
|
||||
@@ -95,6 +94,14 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -146,7 +146,6 @@ private:
|
||||
unsigned int tong_max_val_;
|
||||
unsigned int tong_max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@@ -46,7 +47,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
pcpsconf_t acq_parameters;
|
||||
Acq_Conf acq_parameters = Acq_Conf();
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
@@ -59,10 +60,9 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
acq_parameters.freq = if_;
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0);
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters.blocking = blocking_;
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
@@ -103,6 +103,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", true);
|
||||
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
|
||||
@@ -119,6 +120,14 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -152,7 +152,6 @@ private:
|
||||
unsigned int doppler_step_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
bool blocking_;
|
||||
std::string dump_filename_;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "gps_l5_signal.h"
|
||||
#include "GPS_L5.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@@ -46,7 +47,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
pcpsconf_t acq_parameters;
|
||||
Acq_Conf acq_parameters = Acq_Conf();
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
@@ -58,10 +59,9 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
if_ = configuration_->property(role + ".if", 0);
|
||||
acq_parameters.freq = if_;
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0);
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters.blocking = blocking_;
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
@@ -102,6 +102,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false);
|
||||
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
|
||||
@@ -118,6 +119,14 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -152,7 +152,6 @@ private:
|
||||
unsigned int doppler_step_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
long if_;
|
||||
bool dump_;
|
||||
bool blocking_;
|
||||
std::string dump_filename_;
|
||||
|
||||
@@ -26,12 +26,12 @@ set(ACQ_GR_BLOCKS_SOURCES
|
||||
pcps_quicksync_acquisition_cc.cc
|
||||
galileo_pcps_8ms_acquisition_cc.cc
|
||||
galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc
|
||||
)
|
||||
)
|
||||
|
||||
if(ENABLE_FPGA)
|
||||
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_acquisition_fpga.cc)
|
||||
endif(ENABLE_FPGA)
|
||||
|
||||
|
||||
if(OPENCL_FOUND)
|
||||
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_opencl_acquisition_cc.cc)
|
||||
endif(OPENCL_FOUND)
|
||||
@@ -64,7 +64,7 @@ endif(OPENCL_FOUND)
|
||||
file(GLOB ACQ_GR_BLOCKS_HEADERS "*.h")
|
||||
list(SORT ACQ_GR_BLOCKS_HEADERS)
|
||||
add_library(acq_gr_blocks ${ACQ_GR_BLOCKS_SOURCES} ${ACQ_GR_BLOCKS_HEADERS})
|
||||
source_group(Headers FILES ${ACQ_GR_BLOCKS_HEADERS})
|
||||
source_group(Headers FILES ${ACQ_GR_BLOCKS_HEADERS})
|
||||
|
||||
if(ENABLE_FPGA)
|
||||
target_link_libraries(acq_gr_blocks acquisition_lib gnss_sp_libs gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${OPT_LIBRARIES} ${OPT_ACQUISITION_LIBRARIES})
|
||||
|
||||
@@ -48,7 +48,7 @@ using google::LogMessage;
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -58,7 +58,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make
|
||||
int Zero_padding_)
|
||||
{
|
||||
return galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr(
|
||||
new galileo_e5a_noncoherentIQ_acquisition_caf_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
|
||||
new galileo_e5a_noncoherentIQ_acquisition_caf_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms,
|
||||
samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_));
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max,
|
||||
long freq,
|
||||
long fs_in,
|
||||
int samples_per_ms,
|
||||
int samples_per_code,
|
||||
@@ -84,7 +83,6 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
||||
d_sample_counter = 0; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_samples_per_ms = samples_per_ms;
|
||||
d_samples_per_code = samples_per_code;
|
||||
@@ -302,7 +300,7 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::init()
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GALILEO_TWO_PI * (d_freq + doppler) / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = GALILEO_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
volk_gnsssdr_s32f_sincos_32fc(d_grid_doppler_wipeoffs[doppler_index], -phase_step_rad, _phase, d_fft_size);
|
||||
|
||||
@@ -52,7 +52,7 @@ typedef boost::shared_ptr<galileo_e5a_noncoherentIQ_acquisition_caf_cc> galileo_
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr
|
||||
galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -86,7 +86,7 @@ private:
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc(
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -100,7 +100,6 @@ private:
|
||||
float estimate_input_power(gr_complex* in);
|
||||
|
||||
long d_fs_in;
|
||||
long d_freq;
|
||||
int d_samples_per_ms;
|
||||
int d_sampled_ms;
|
||||
int d_samples_per_code;
|
||||
|
||||
@@ -41,18 +41,18 @@ using google::LogMessage;
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename)
|
||||
{
|
||||
return galileo_pcps_8ms_acquisition_cc_sptr(
|
||||
new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
|
||||
new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms,
|
||||
samples_per_code, dump, dump_filename));
|
||||
}
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc",
|
||||
@@ -63,7 +63,6 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
d_sample_counter = 0; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_samples_per_ms = samples_per_ms;
|
||||
d_samples_per_code = samples_per_code;
|
||||
@@ -174,7 +173,7 @@ void galileo_pcps_8ms_acquisition_cc::init()
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = static_cast<float>(GALILEO_TWO_PI) * (d_freq + doppler) / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = static_cast<float>(GALILEO_TWO_PI) * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
volk_gnsssdr_s32f_sincos_32fc(d_grid_doppler_wipeoffs[doppler_index], -phase_step_rad, _phase, d_fft_size);
|
||||
|
||||
@@ -45,7 +45,7 @@ typedef boost::shared_ptr<galileo_pcps_8ms_acquisition_cc> galileo_pcps_8ms_acqu
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc_sptr
|
||||
galileo_pcps_8ms_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
@@ -58,13 +58,13 @@ class galileo_pcps_8ms_acquisition_cc : public gr::block
|
||||
private:
|
||||
friend galileo_pcps_8ms_acquisition_cc_sptr
|
||||
galileo_pcps_8ms_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
@@ -72,7 +72,6 @@ private:
|
||||
int doppler_offset);
|
||||
|
||||
long d_fs_in;
|
||||
long d_freq;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
|
||||
@@ -45,23 +45,24 @@
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_acquisition_sptr pcps_make_acquisition(pcpsconf_t conf_)
|
||||
pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_)
|
||||
{
|
||||
return pcps_acquisition_sptr(new pcps_acquisition(conf_));
|
||||
}
|
||||
|
||||
|
||||
pcps_acquisition::pcps_acquisition(pcpsconf_t conf_) : gr::block("pcps_acquisition",
|
||||
gr::io_signature::make(1, 1, conf_.it_size * conf_.sampled_ms * conf_.samples_per_ms * (conf_.bit_transition_flag ? 2 : 1)),
|
||||
gr::io_signature::make(0, 0, conf_.it_size * conf_.sampled_ms * conf_.samples_per_ms * (conf_.bit_transition_flag ? 2 : 1)))
|
||||
pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acquisition",
|
||||
gr::io_signature::make(1, 1, conf_.it_size * conf_.sampled_ms * conf_.samples_per_ms * (conf_.bit_transition_flag ? 2 : 1)),
|
||||
gr::io_signature::make(0, 0, conf_.it_size * conf_.sampled_ms * conf_.samples_per_ms * (conf_.bit_transition_flag ? 2 : 1)))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
|
||||
acq_parameters = conf_;
|
||||
d_sample_counter = 0; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
d_positive_acq = 0;
|
||||
d_state = 0;
|
||||
d_old_freq = conf_.freq;
|
||||
d_old_freq = 0;
|
||||
d_well_count = 0;
|
||||
d_fft_size = acq_parameters.sampled_ms * acq_parameters.samples_per_ms;
|
||||
d_mag = 0;
|
||||
@@ -121,6 +122,8 @@ pcps_acquisition::pcps_acquisition(pcpsconf_t conf_) : gr::block("pcps_acquisiti
|
||||
}
|
||||
grid_ = arma::fmat();
|
||||
d_step_two = false;
|
||||
d_dump_number = 0;
|
||||
d_dump_channel = acq_parameters.dump_channel;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +160,7 @@ pcps_acquisition::~pcps_acquisition()
|
||||
void pcps_acquisition::set_local_code(std::complex<float>* code)
|
||||
{
|
||||
// reset the intermediate frequency
|
||||
acq_parameters.freq = d_old_freq;
|
||||
d_old_freq = 0;
|
||||
// This will check if it's fdma, if yes will update the intermediate frequency and the doppler grid
|
||||
if (is_fdma())
|
||||
{
|
||||
@@ -189,14 +192,14 @@ bool pcps_acquisition::is_fdma()
|
||||
// Dealing with FDMA system
|
||||
if (strcmp(d_gnss_synchro->Signal, "1G") == 0)
|
||||
{
|
||||
acq_parameters.freq += DFRQ1_GLO * GLONASS_PRN.at(d_gnss_synchro->PRN);
|
||||
LOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << acq_parameters.freq << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl;
|
||||
d_old_freq += DFRQ1_GLO * GLONASS_PRN.at(d_gnss_synchro->PRN);
|
||||
LOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_old_freq << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl;
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(d_gnss_synchro->Signal, "2G") == 0)
|
||||
{
|
||||
acq_parameters.freq += DFRQ2_GLO * GLONASS_PRN.at(d_gnss_synchro->PRN);
|
||||
LOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << acq_parameters.freq << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl;
|
||||
d_old_freq += DFRQ2_GLO * GLONASS_PRN.at(d_gnss_synchro->PRN);
|
||||
LOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_old_freq << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -245,7 +248,7 @@ void pcps_acquisition::init()
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
int doppler = -static_cast<int>(acq_parameters.doppler_max) + d_doppler_step * doppler_index;
|
||||
update_local_carrier(d_grid_doppler_wipeoffs[doppler_index], d_fft_size, acq_parameters.freq + doppler);
|
||||
update_local_carrier(d_grid_doppler_wipeoffs[doppler_index], d_fft_size, d_old_freq + doppler);
|
||||
}
|
||||
d_worker_active = false;
|
||||
|
||||
@@ -262,7 +265,7 @@ void pcps_acquisition::update_grid_doppler_wipeoffs()
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
int doppler = -static_cast<int>(acq_parameters.doppler_max) + d_doppler_step * doppler_index;
|
||||
update_local_carrier(d_grid_doppler_wipeoffs[doppler_index], d_fft_size, acq_parameters.freq + doppler);
|
||||
update_local_carrier(d_grid_doppler_wipeoffs[doppler_index], d_fft_size, d_old_freq + doppler);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,7 +317,7 @@ void pcps_acquisition::send_positive_acquisition()
|
||||
<< ", doppler " << d_gnss_synchro->Acq_doppler_hz
|
||||
<< ", magnitude " << d_mag
|
||||
<< ", input signal power " << d_input_power;
|
||||
|
||||
d_positive_acq = 1;
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(1));
|
||||
}
|
||||
|
||||
@@ -332,11 +335,90 @@ void pcps_acquisition::send_negative_acquisition()
|
||||
<< ", doppler " << d_gnss_synchro->Acq_doppler_hz
|
||||
<< ", magnitude " << d_mag
|
||||
<< ", input signal power " << d_input_power;
|
||||
|
||||
d_positive_acq = 0;
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(2));
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition::dump_results(int effective_fft_size)
|
||||
{
|
||||
d_dump_number++;
|
||||
std::string filename = acq_parameters.dump_filename;
|
||||
filename.append("_");
|
||||
filename.append(1, d_gnss_synchro->System);
|
||||
filename.append("_");
|
||||
filename.append(1, d_gnss_synchro->Signal[0]);
|
||||
filename.append(1, d_gnss_synchro->Signal[1]);
|
||||
filename.append("_ch_");
|
||||
filename.append(std::to_string(d_channel));
|
||||
filename.append("_");
|
||||
filename.append(std::to_string(d_dump_number));
|
||||
filename.append("_sat_");
|
||||
filename.append(std::to_string(d_gnss_synchro->PRN));
|
||||
filename.append(".mat");
|
||||
|
||||
mat_t* matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (matfp == NULL)
|
||||
{
|
||||
std::cout << "Unable to create or open Acquisition dump file" << std::endl;
|
||||
acq_parameters.dump = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t dims[2] = {static_cast<size_t>(effective_fft_size), static_cast<size_t>(d_num_doppler_bins)};
|
||||
matvar_t* matvar = Mat_VarCreate("acq_grid", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, grid_.memptr(), 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
dims[0] = static_cast<size_t>(1);
|
||||
dims[1] = static_cast<size_t>(1);
|
||||
matvar = Mat_VarCreate("doppler_max", MAT_C_UINT32, MAT_T_UINT32, 1, dims, &acq_parameters.doppler_max, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
matvar = Mat_VarCreate("doppler_step", MAT_C_UINT32, MAT_T_UINT32, 1, dims, &d_doppler_step, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
matvar = Mat_VarCreate("d_positive_acq", MAT_C_INT32, MAT_T_INT32, 1, dims, &d_positive_acq, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
float aux = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
matvar = Mat_VarCreate("acq_doppler_hz", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &aux, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
aux = static_cast<float>(d_gnss_synchro->Acq_delay_samples);
|
||||
matvar = Mat_VarCreate("acq_delay_samples", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &aux, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
matvar = Mat_VarCreate("test_statistic", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &d_test_statistics, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
matvar = Mat_VarCreate("threshold", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &d_threshold, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
matvar = Mat_VarCreate("input_power", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &d_input_power, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
matvar = Mat_VarCreate("sample_counter", MAT_C_UINT64, MAT_T_UINT64, 1, dims, &d_sample_counter, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
matvar = Mat_VarCreate("PRN", MAT_C_UINT32, MAT_T_UINT32, 1, dims, &d_gnss_synchro->PRN, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
Mat_Close(matfp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
{
|
||||
gr::thread::scoped_lock lk(d_setlock);
|
||||
@@ -344,7 +426,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
// initialize acquisition algorithm
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
const gr_complex* in = d_data_buffer; //Get the input samples pointer
|
||||
const gr_complex* in = d_data_buffer; // Get the input samples pointer
|
||||
int effective_fft_size = (acq_parameters.bit_transition_flag ? d_fft_size / 2 : d_fft_size);
|
||||
if (d_cshort)
|
||||
{
|
||||
@@ -435,46 +517,9 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
}
|
||||
}
|
||||
// Record results to file if required
|
||||
if (acq_parameters.dump)
|
||||
if (acq_parameters.dump and d_channel == d_dump_channel)
|
||||
{
|
||||
memcpy(grid_.colptr(doppler_index), d_magnitude, sizeof(float) * effective_fft_size);
|
||||
if (doppler_index == (d_num_doppler_bins - 1))
|
||||
{
|
||||
std::string filename = acq_parameters.dump_filename;
|
||||
filename.append("_");
|
||||
filename.append(1, d_gnss_synchro->System);
|
||||
filename.append("_");
|
||||
filename.append(1, d_gnss_synchro->Signal[0]);
|
||||
filename.append(1, d_gnss_synchro->Signal[1]);
|
||||
filename.append("_sat_");
|
||||
filename.append(std::to_string(d_gnss_synchro->PRN));
|
||||
filename.append(".mat");
|
||||
mat_t* matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (matfp == NULL)
|
||||
{
|
||||
std::cout << "Unable to create or open Acquisition dump file" << std::endl;
|
||||
acq_parameters.dump = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t dims[2] = {static_cast<size_t>(effective_fft_size), static_cast<size_t>(d_num_doppler_bins)};
|
||||
matvar_t* matvar = Mat_VarCreate("grid", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, grid_.memptr(), 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
dims[0] = static_cast<size_t>(1);
|
||||
dims[1] = static_cast<size_t>(1);
|
||||
matvar = Mat_VarCreate("doppler_max", MAT_C_SINGLE, MAT_T_UINT32, 1, dims, &acq_parameters.doppler_max, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
matvar = Mat_VarCreate("doppler_step", MAT_C_SINGLE, MAT_T_UINT32, 1, dims, &d_doppler_step, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
Mat_Close(matfp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -540,6 +585,11 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
d_test_statistics = d_mag / d_input_power;
|
||||
}
|
||||
}
|
||||
// Record results to file if required
|
||||
if (acq_parameters.dump and d_channel == d_dump_channel)
|
||||
{
|
||||
memcpy(grid_.colptr(doppler_index), d_magnitude, sizeof(float) * effective_fft_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
lk.lock();
|
||||
@@ -609,6 +659,11 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
}
|
||||
}
|
||||
d_worker_active = false;
|
||||
// Record results to file if required
|
||||
if (acq_parameters.dump and d_channel == d_dump_channel)
|
||||
{
|
||||
pcps_acquisition::dump_results(effective_fft_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -630,8 +685,11 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
gr::thread::scoped_lock lk(d_setlock);
|
||||
if (!d_active or d_worker_active)
|
||||
{
|
||||
d_sample_counter += d_fft_size * ninput_items[0];
|
||||
consume_each(ninput_items[0]);
|
||||
if (!acq_parameters.blocking_on_standby)
|
||||
{
|
||||
d_sample_counter += d_fft_size * ninput_items[0];
|
||||
consume_each(ninput_items[0]);
|
||||
}
|
||||
if (d_step_two)
|
||||
{
|
||||
d_doppler_center_step_two = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
@@ -655,8 +713,11 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
d_input_power = 0.0;
|
||||
d_test_statistics = 0.0;
|
||||
d_state = 1;
|
||||
d_sample_counter += d_fft_size * ninput_items[0]; // sample counter
|
||||
consume_each(ninput_items[0]);
|
||||
if (!acq_parameters.blocking_on_standby)
|
||||
{
|
||||
d_sample_counter += d_fft_size * ninput_items[0]; // sample counter
|
||||
consume_each(ninput_items[0]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,39 +53,20 @@
|
||||
#define GNSS_SDR_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acq_conf.h"
|
||||
#include <armadillo>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <volk/volk.h>
|
||||
#include <string>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* pcps acquisition configuration */
|
||||
unsigned int sampled_ms;
|
||||
unsigned int max_dwells;
|
||||
unsigned int doppler_max;
|
||||
unsigned int num_doppler_bins_step2;
|
||||
float doppler_step2;
|
||||
long freq;
|
||||
long fs_in;
|
||||
int samples_per_ms;
|
||||
int samples_per_code;
|
||||
bool bit_transition_flag;
|
||||
bool use_CFAR_algorithm_flag;
|
||||
bool dump;
|
||||
bool blocking;
|
||||
bool make_2_steps;
|
||||
std::string dump_filename;
|
||||
size_t it_size;
|
||||
} pcpsconf_t;
|
||||
|
||||
class pcps_acquisition;
|
||||
|
||||
typedef boost::shared_ptr<pcps_acquisition> pcps_acquisition_sptr;
|
||||
|
||||
pcps_acquisition_sptr
|
||||
pcps_make_acquisition(pcpsconf_t conf_);
|
||||
pcps_make_acquisition(const Acq_Conf& conf_);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition.
|
||||
@@ -97,9 +78,9 @@ class pcps_acquisition : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_acquisition_sptr
|
||||
pcps_make_acquisition(pcpsconf_t conf_);
|
||||
pcps_make_acquisition(const Acq_Conf& conf_);
|
||||
|
||||
pcps_acquisition(pcpsconf_t conf_);
|
||||
pcps_acquisition(const Acq_Conf& conf_);
|
||||
|
||||
void update_local_carrier(gr_complex* carrier_vector, int correlator_length_samples, float freq);
|
||||
void update_grid_doppler_wipeoffs();
|
||||
@@ -112,11 +93,14 @@ private:
|
||||
|
||||
void send_positive_acquisition();
|
||||
|
||||
pcpsconf_t acq_parameters;
|
||||
void dump_results(int effective_fft_size);
|
||||
|
||||
Acq_Conf acq_parameters;
|
||||
bool d_active;
|
||||
bool d_worker_active;
|
||||
bool d_cshort;
|
||||
bool d_step_two;
|
||||
int d_positive_acq;
|
||||
float d_threshold;
|
||||
float d_mag;
|
||||
float d_input_power;
|
||||
@@ -140,6 +124,8 @@ private:
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
arma::fmat grid_;
|
||||
long int d_dump_number;
|
||||
unsigned int d_dump_channel;
|
||||
|
||||
public:
|
||||
~pcps_acquisition();
|
||||
|
||||
@@ -45,18 +45,18 @@
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min, long freq,
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min,
|
||||
long fs_in, int samples_per_ms, bool dump,
|
||||
std::string dump_filename)
|
||||
{
|
||||
return pcps_acquisition_fine_doppler_cc_sptr(
|
||||
new pcps_acquisition_fine_doppler_cc(max_dwells, sampled_ms, doppler_max, doppler_min, freq,
|
||||
new pcps_acquisition_fine_doppler_cc(max_dwells, sampled_ms, doppler_max, doppler_min,
|
||||
fs_in, samples_per_ms, dump, dump_filename));
|
||||
}
|
||||
|
||||
|
||||
pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min, long freq,
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min,
|
||||
long fs_in, int samples_per_ms, bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_acquisition_fine_doppler_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
@@ -65,7 +65,6 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
d_sample_counter = 0; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_samples_per_ms = samples_per_ms;
|
||||
d_sampled_ms = sampled_ms;
|
||||
@@ -207,7 +206,7 @@ void pcps_acquisition_fine_doppler_cc::update_carrier_wipeoff()
|
||||
doppler_hz = d_config_doppler_min + d_doppler_step * doppler_index;
|
||||
// doppler search steps
|
||||
// compute the carrier doppler wipe-off signal and store it
|
||||
phase_step_rad = static_cast<float>(GPS_TWO_PI) * (d_freq + doppler_hz) / static_cast<float>(d_fs_in);
|
||||
phase_step_rad = static_cast<float>(GPS_TWO_PI) * doppler_hz / static_cast<float>(d_fs_in);
|
||||
d_grid_doppler_wipeoffs[doppler_index] = new gr_complex[d_fft_size];
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef boost::shared_ptr<pcps_acquisition_fine_doppler_cc>
|
||||
|
||||
pcps_acquisition_fine_doppler_cc_sptr
|
||||
pcps_make_acquisition_fine_doppler_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long freq, long fs_in, int samples_per_ms,
|
||||
int doppler_max, int doppler_min, long fs_in, int samples_per_ms,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
/*!
|
||||
@@ -77,12 +77,12 @@ class pcps_acquisition_fine_doppler_cc : public gr::block
|
||||
private:
|
||||
friend pcps_acquisition_fine_doppler_cc_sptr
|
||||
pcps_make_acquisition_fine_doppler_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long freq, long fs_in,
|
||||
int doppler_max, int doppler_min, long fs_in,
|
||||
int samples_per_ms, bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
pcps_acquisition_fine_doppler_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long freq, long fs_in,
|
||||
int doppler_max, int doppler_min, long fs_in,
|
||||
int samples_per_ms, bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
@@ -98,7 +98,6 @@ private:
|
||||
void free_grid_memory();
|
||||
|
||||
long d_fs_in;
|
||||
long d_freq;
|
||||
int d_samples_per_ms;
|
||||
int d_max_dwells;
|
||||
unsigned int d_doppler_resolution;
|
||||
|
||||
@@ -72,7 +72,7 @@ pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block(
|
||||
d_gnss_synchro = 0;
|
||||
|
||||
acquisition_fpga = std::make_shared<fpga_acquisition>(acq_parameters.device_name, d_fft_size, acq_parameters.doppler_max, acq_parameters.samples_per_ms,
|
||||
acq_parameters.fs_in, acq_parameters.freq, acq_parameters.sampled_ms, acq_parameters.select_queue_Fpga, acq_parameters.all_fft_codes);
|
||||
acq_parameters.fs_in, acq_parameters.sampled_ms, acq_parameters.select_queue_Fpga, acq_parameters.all_fft_codes);
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,6 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
// initialize acquisition algorithm
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
|
||||
d_input_power = 0.0;
|
||||
d_mag = 0.0;
|
||||
@@ -234,7 +233,8 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
|
||||
|
||||
int pcps_acquisition_fpga::general_work(int noutput_items __attribute__((unused)),
|
||||
gr_vector_int& ninput_items, gr_vector_const_void_star& input_items,
|
||||
gr_vector_int& ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star& input_items __attribute__((unused)),
|
||||
gr_vector_void_star& output_items __attribute__((unused)))
|
||||
{
|
||||
// the general work is not used with the acquisition that uses the FPGA
|
||||
|
||||
@@ -46,18 +46,18 @@ extern concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min, long freq,
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min,
|
||||
long fs_in, int samples_per_ms, bool dump,
|
||||
std::string dump_filename)
|
||||
{
|
||||
return pcps_assisted_acquisition_cc_sptr(
|
||||
new pcps_assisted_acquisition_cc(max_dwells, sampled_ms, doppler_max, doppler_min, freq,
|
||||
new pcps_assisted_acquisition_cc(max_dwells, sampled_ms, doppler_max, doppler_min,
|
||||
fs_in, samples_per_ms, dump, dump_filename));
|
||||
}
|
||||
|
||||
|
||||
pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min, long freq,
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min,
|
||||
long fs_in, int samples_per_ms, bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_assisted_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
@@ -66,7 +66,6 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
d_sample_counter = 0; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_samples_per_ms = samples_per_ms;
|
||||
d_sampled_ms = sampled_ms;
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef boost::shared_ptr<pcps_assisted_acquisition_cc>
|
||||
|
||||
pcps_assisted_acquisition_cc_sptr
|
||||
pcps_make_assisted_acquisition_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long freq, long fs_in, int samples_per_ms,
|
||||
int doppler_max, int doppler_min, long fs_in, int samples_per_ms,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
/*!
|
||||
@@ -76,12 +76,12 @@ class pcps_assisted_acquisition_cc : public gr::block
|
||||
private:
|
||||
friend pcps_assisted_acquisition_cc_sptr
|
||||
pcps_make_assisted_acquisition_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long freq, long fs_in,
|
||||
int doppler_max, int doppler_min, long fs_in,
|
||||
int samples_per_ms, bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
pcps_assisted_acquisition_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long freq, long fs_in,
|
||||
int doppler_max, int doppler_min, long fs_in,
|
||||
int samples_per_ms, bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
@@ -97,7 +97,6 @@ private:
|
||||
void free_grid_memory();
|
||||
|
||||
long d_fs_in;
|
||||
long d_freq;
|
||||
int d_samples_per_ms;
|
||||
int d_max_dwells;
|
||||
unsigned int d_doppler_resolution;
|
||||
|
||||
@@ -48,18 +48,18 @@ using google::LogMessage;
|
||||
|
||||
pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename)
|
||||
{
|
||||
return pcps_cccwsr_acquisition_cc_sptr(
|
||||
new pcps_cccwsr_acquisition_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in,
|
||||
new pcps_cccwsr_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in,
|
||||
samples_per_ms, samples_per_code, dump, dump_filename));
|
||||
}
|
||||
|
||||
pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_cccwsr_acquisition_cc",
|
||||
@@ -70,7 +70,6 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
d_sample_counter = 0; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_samples_per_ms = samples_per_ms;
|
||||
d_samples_per_code = samples_per_code;
|
||||
@@ -189,7 +188,7 @@ void pcps_cccwsr_acquisition_cc::init()
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * (d_freq + doppler) / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = GPS_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
volk_gnsssdr_s32f_sincos_32fc(d_grid_doppler_wipeoffs[doppler_index], -phase_step_rad, _phase, d_fft_size);
|
||||
|
||||
@@ -51,7 +51,7 @@ typedef boost::shared_ptr<pcps_cccwsr_acquisition_cc> pcps_cccwsr_acquisition_cc
|
||||
|
||||
pcps_cccwsr_acquisition_cc_sptr
|
||||
pcps_cccwsr_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
@@ -64,12 +64,12 @@ class pcps_cccwsr_acquisition_cc : public gr::block
|
||||
private:
|
||||
friend pcps_cccwsr_acquisition_cc_sptr
|
||||
pcps_cccwsr_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
pcps_cccwsr_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
@@ -77,7 +77,6 @@ private:
|
||||
int doppler_offset);
|
||||
|
||||
long d_fs_in;
|
||||
long d_freq;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
|
||||
@@ -67,14 +67,14 @@ using google::LogMessage;
|
||||
|
||||
pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename)
|
||||
{
|
||||
return pcps_opencl_acquisition_cc_sptr(
|
||||
new pcps_opencl_acquisition_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
|
||||
new pcps_opencl_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms,
|
||||
samples_per_code, bit_transition_flag, dump, dump_filename));
|
||||
}
|
||||
|
||||
@@ -83,7 +83,6 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc(
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max,
|
||||
long freq,
|
||||
long fs_in,
|
||||
int samples_per_ms,
|
||||
int samples_per_code,
|
||||
@@ -98,7 +97,6 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc(
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
d_core_working = false;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_samples_per_ms = samples_per_ms;
|
||||
d_samples_per_code = samples_per_code;
|
||||
@@ -320,7 +318,7 @@ void pcps_opencl_acquisition_cc::init()
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = static_cast<float>(GPS_TWO_PI) * (d_freq + doppler) / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = static_cast<float>(GPS_TWO_PI) * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
volk_gnsssdr_s32f_sincos_32fc(d_grid_doppler_wipeoffs[doppler_index], -phase_step_rad, _phase, d_fft_size);
|
||||
|
||||
@@ -72,7 +72,7 @@ typedef boost::shared_ptr<pcps_opencl_acquisition_cc> pcps_opencl_acquisition_cc
|
||||
|
||||
pcps_opencl_acquisition_cc_sptr
|
||||
pcps_make_opencl_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -89,14 +89,14 @@ class pcps_opencl_acquisition_cc : public gr::block
|
||||
private:
|
||||
friend pcps_opencl_acquisition_cc_sptr
|
||||
pcps_make_opencl_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
pcps_opencl_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -108,7 +108,6 @@ private:
|
||||
int init_opencl_environment(std::string kernel_filename);
|
||||
|
||||
long d_fs_in;
|
||||
long d_freq;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
|
||||
@@ -44,7 +44,7 @@ using google::LogMessage;
|
||||
pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -54,7 +54,7 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
new pcps_quicksync_acquisition_cc(
|
||||
folding_factor,
|
||||
sampled_ms, max_dwells, doppler_max,
|
||||
freq, fs_in, samples_per_ms,
|
||||
fs_in, samples_per_ms,
|
||||
samples_per_code,
|
||||
bit_transition_flag,
|
||||
dump, dump_filename));
|
||||
@@ -64,7 +64,7 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -76,7 +76,6 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
d_sample_counter = 0; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_samples_per_ms = samples_per_ms;
|
||||
d_samples_per_code = samples_per_code;
|
||||
@@ -221,7 +220,7 @@ void pcps_quicksync_acquisition_cc::init()
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * d_folding_factor * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * (d_freq + doppler) / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = GPS_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
volk_gnsssdr_s32f_sincos_32fc(d_grid_doppler_wipeoffs[doppler_index], -phase_step_rad, _phase, d_samples_per_code * d_folding_factor);
|
||||
|
||||
@@ -69,7 +69,7 @@ typedef boost::shared_ptr<pcps_quicksync_acquisition_cc>
|
||||
pcps_quicksync_acquisition_cc_sptr
|
||||
pcps_quicksync_make_acquisition_cc(unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -88,7 +88,7 @@ private:
|
||||
friend pcps_quicksync_acquisition_cc_sptr
|
||||
pcps_quicksync_make_acquisition_cc(unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -96,7 +96,7 @@ private:
|
||||
|
||||
pcps_quicksync_acquisition_cc(unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -116,7 +116,6 @@ private:
|
||||
float d_noise_floor_power;
|
||||
|
||||
long d_fs_in;
|
||||
long d_freq;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
|
||||
@@ -61,19 +61,19 @@ using google::LogMessage;
|
||||
|
||||
pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long freq, long fs_in, int samples_per_ms,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
bool dump, std::string dump_filename)
|
||||
{
|
||||
return pcps_tong_acquisition_cc_sptr(
|
||||
new pcps_tong_acquisition_cc(sampled_ms, doppler_max, freq, fs_in, samples_per_ms, samples_per_code,
|
||||
new pcps_tong_acquisition_cc(sampled_ms, doppler_max, fs_in, samples_per_ms, samples_per_code,
|
||||
tong_init_val, tong_max_val, tong_max_dwells, dump, dump_filename));
|
||||
}
|
||||
|
||||
pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long freq, long fs_in, int samples_per_ms,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
bool dump,
|
||||
@@ -85,7 +85,6 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
d_sample_counter = 0; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_samples_per_ms = samples_per_ms;
|
||||
d_samples_per_code = samples_per_code;
|
||||
@@ -191,7 +190,7 @@ void pcps_tong_acquisition_cc::init()
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * (d_freq + doppler) / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = GPS_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
volk_gnsssdr_s32f_sincos_32fc(d_grid_doppler_wipeoffs[doppler_index], -phase_step_rad, _phase, d_fft_size);
|
||||
|
||||
@@ -65,7 +65,7 @@ typedef boost::shared_ptr<pcps_tong_acquisition_cc> pcps_tong_acquisition_cc_spt
|
||||
|
||||
pcps_tong_acquisition_cc_sptr
|
||||
pcps_tong_make_acquisition_cc(unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long freq, long fs_in, int samples_per_ms,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
bool dump, std::string dump_filename);
|
||||
@@ -79,13 +79,13 @@ class pcps_tong_acquisition_cc : public gr::block
|
||||
private:
|
||||
friend pcps_tong_acquisition_cc_sptr
|
||||
pcps_tong_make_acquisition_cc(unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long freq, long fs_in, int samples_per_ms,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
pcps_tong_acquisition_cc(unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long freq, long fs_in, int samples_per_ms,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
bool dump, std::string dump_filename);
|
||||
@@ -94,7 +94,6 @@ private:
|
||||
int doppler_offset);
|
||||
|
||||
long d_fs_in;
|
||||
long d_freq;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
|
||||
@@ -16,12 +16,9 @@
|
||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
set(ACQUISITION_LIB_SOURCES
|
||||
fpga_acquisition.cc
|
||||
)
|
||||
|
||||
include_directories(
|
||||
if(ENABLE_FPGA)
|
||||
set(ACQUISITION_LIB_SOURCES fpga_acquisition.cc )
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
@@ -31,10 +28,16 @@ include_directories(
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
${VOLK_GNSSSDR_INCLUDE_DIRS}
|
||||
)
|
||||
)
|
||||
|
||||
file(GLOB ACQUISITION_LIB_HEADERS "*.h")
|
||||
file(GLOB ACQUISITION_LIB_HEADERS "*.h")
|
||||
endif(ENABLE_FPGA)
|
||||
|
||||
set(ACQUISITION_LIB_HEADERS ${ACQUISITION_LIB_HEADERS} acq_conf.h)
|
||||
list(SORT ACQUISITION_LIB_HEADERS)
|
||||
|
||||
set(ACQUISITION_LIB_SOURCES ${ACQUISITION_LIB_SOURCES} acq_conf.cc)
|
||||
|
||||
add_library(acquisition_lib ${ACQUISITION_LIB_SOURCES} ${ACQUISITION_LIB_HEADERS})
|
||||
source_group(Headers FILES ${ACQUISITION_LIB_HEADERS})
|
||||
target_link_libraries(acquisition_lib ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES})
|
||||
@@ -43,4 +46,3 @@ if(VOLK_GNSSSDR_FOUND)
|
||||
else(VOLK_GNSSSDR_FOUND)
|
||||
add_dependencies(acquisition_lib glog-${glog_RELEASE} volk_gnsssdr_module)
|
||||
endif()
|
||||
|
||||
|
||||
54
src/algorithms/acquisition/libs/acq_conf.cc
Normal file
54
src/algorithms/acquisition/libs/acq_conf.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*!
|
||||
* \file acq_conf.cc
|
||||
* \brief Class that contains all the configuration parameters for generic
|
||||
* acquisition block based on the PCPS algoritm.
|
||||
* \author Carles Fernandez, 2018. cfernandez(at)cttc.es
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "acq_conf.h"
|
||||
|
||||
Acq_Conf::Acq_Conf()
|
||||
{
|
||||
/* PCPS acquisition configuration */
|
||||
sampled_ms = 0;
|
||||
max_dwells = 0;
|
||||
doppler_max = 0;
|
||||
num_doppler_bins_step2 = 0;
|
||||
doppler_step2 = 0.0;
|
||||
fs_in = 0;
|
||||
samples_per_ms = 0;
|
||||
samples_per_code = 0;
|
||||
bit_transition_flag = false;
|
||||
use_CFAR_algorithm_flag = false;
|
||||
dump = false;
|
||||
blocking = false;
|
||||
make_2_steps = false;
|
||||
dump_filename = "";
|
||||
dump_channel = 0;
|
||||
it_size = sizeof(char);
|
||||
blocking_on_standby = false;
|
||||
}
|
||||
63
src/algorithms/acquisition/libs/acq_conf.h
Normal file
63
src/algorithms/acquisition/libs/acq_conf.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*!
|
||||
* \file acq_conf.cc
|
||||
* \brief Class that contains all the configuration parameters for generic
|
||||
* acquisition block based on the PCPS algoritm.
|
||||
* \author Carles Fernandez, 2018. cfernandez(at)cttc.es
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_ACQ_CONF_H_
|
||||
#define GNSS_SDR_ACQ_CONF_H_
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
class Acq_Conf
|
||||
{
|
||||
public:
|
||||
/* PCPS Acquisition configuration */
|
||||
unsigned int sampled_ms;
|
||||
unsigned int max_dwells;
|
||||
unsigned int doppler_max;
|
||||
unsigned int num_doppler_bins_step2;
|
||||
float doppler_step2;
|
||||
long fs_in;
|
||||
int samples_per_ms;
|
||||
int samples_per_code;
|
||||
bool bit_transition_flag;
|
||||
bool use_CFAR_algorithm_flag;
|
||||
bool dump;
|
||||
bool blocking;
|
||||
bool blocking_on_standby; // enable it only for unit testing to avoid sample consume on idle status
|
||||
bool make_2_steps;
|
||||
std::string dump_filename;
|
||||
unsigned int dump_channel;
|
||||
size_t it_size;
|
||||
|
||||
Acq_Conf();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -76,14 +76,13 @@ bool fpga_acquisition::set_local_code(unsigned int PRN)
|
||||
fpga_acquisition::fpga_acquisition(std::string device_name,
|
||||
unsigned int nsamples,
|
||||
unsigned int doppler_max,
|
||||
unsigned int nsamples_total, long fs_in, long freq,
|
||||
unsigned int nsamples_total, long fs_in,
|
||||
unsigned int sampled_ms, unsigned select_queue,
|
||||
lv_16sc_t *all_fft_codes)
|
||||
{
|
||||
unsigned int vector_length = nsamples_total * sampled_ms;
|
||||
// initial values
|
||||
d_device_name = device_name;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_nsamples = nsamples; // number of samples not including padding
|
||||
@@ -203,7 +202,7 @@ void fpga_acquisition::set_phase_step(unsigned int doppler_index)
|
||||
float phase_step_rad_int_temp;
|
||||
int32_t phase_step_rad_int;
|
||||
int doppler = static_cast<int>(-d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * (d_freq + doppler) / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = GPS_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
// The doppler step can never be outside the range -pi to +pi, otherwise there would be aliasing
|
||||
// The FPGA expects phase_step_rad between -1 (-pi) to +1 (+pi)
|
||||
// The FPGA also expects the phase to be negative since it produces cos(x) -j*sin(x)
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
fpga_acquisition(std::string device_name,
|
||||
unsigned int nsamples,
|
||||
unsigned int doppler_max,
|
||||
unsigned int nsamples_total, long fs_in, long freq,
|
||||
unsigned int nsamples_total, long fs_in,
|
||||
unsigned int sampled_ms, unsigned select_queue,
|
||||
lv_16sc_t *all_fft_codes);
|
||||
~fpga_acquisition();
|
||||
@@ -82,9 +82,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
long d_freq;
|
||||
long d_fs_in;
|
||||
gr::fft::fft_complex *d_fft_if; // function used to run the fft of the local codes
|
||||
// data related to the hardware module and the driver
|
||||
int d_fd; // driver descriptor
|
||||
volatile unsigned *d_map_base; // driver memory map
|
||||
|
||||
@@ -60,6 +60,14 @@ ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -66,6 +66,14 @@ IbyteToCbyte::IbyteToCbyte(ConfigurationInterface* configuration, std::string ro
|
||||
{
|
||||
conjugate_ic_ = make_conjugate_ic();
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +64,14 @@ IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, std::strin
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -67,6 +67,14 @@ IbyteToCshort::IbyteToCshort(ConfigurationInterface* configuration, std::string
|
||||
{
|
||||
conjugate_sc_ = make_conjugate_sc();
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +64,14 @@ IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, std::str
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -66,6 +66,14 @@ IshortToCshort::IshortToCshort(ConfigurationInterface* configuration, std::strin
|
||||
{
|
||||
conjugate_sc_ = make_conjugate_sc();
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +68,14 @@ BeamformerFilter::BeamformerFilter(
|
||||
DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")";
|
||||
}
|
||||
samples_ = 0;
|
||||
if (in_stream_ > 8)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports eight input streams";
|
||||
}
|
||||
if (out_stream_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -131,6 +131,14 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
|
||||
{
|
||||
LOG(ERROR) << " Unknown item type conversion";
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -111,6 +111,14 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
|
||||
std::cout << "Dumping output into file " << dump_filename_ << std::endl;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -81,6 +81,14 @@ NotchFilter::NotchFilter(ConfigurationInterface* configuration, std::string role
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")";
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -88,6 +88,14 @@ NotchFilterLite::NotchFilterLite(ConfigurationInterface* configuration, std::str
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")";
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -94,6 +94,14 @@ PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration,
|
||||
std::cout << "Dumping output into file " << dump_filename_ << std::endl;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
}
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -109,6 +109,14 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
|
||||
|
||||
kludge_copy_ = gr::blocks::copy::make(item_size_);
|
||||
DLOG(INFO) << "kludge_copy(" << kludge_copy_->unique_id() << ")";
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -130,11 +130,11 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
|
||||
double P1_P2 = 0.0;
|
||||
double P1_C1 = 0.0;
|
||||
double P2_C2 = 0.0;
|
||||
//Intersignal corrections (m). See GPS IS-200 CNAV message
|
||||
double ISCl1 = 0.0;
|
||||
// Intersignal corrections (m). See GPS IS-200 CNAV message
|
||||
//double ISCl1 = 0.0;
|
||||
double ISCl2 = 0.0;
|
||||
double ISCl5i = 0.0;
|
||||
double ISCl5q = 0.0;
|
||||
//double ISCl5q = 0.0;
|
||||
double gamma_ = 0.0;
|
||||
int i = 0;
|
||||
int j = 1;
|
||||
@@ -209,10 +209,10 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
|
||||
|
||||
if (sys == SYS_GPS)
|
||||
{
|
||||
ISCl1 = getiscl1(obs->sat, nav);
|
||||
// ISCl1 = getiscl1(obs->sat, nav);
|
||||
ISCl2 = getiscl2(obs->sat, nav);
|
||||
ISCl5i = getiscl5i(obs->sat, nav);
|
||||
ISCl5q = getiscl5q(obs->sat, nav);
|
||||
// ISCl5q = getiscl5q(obs->sat, nav);
|
||||
}
|
||||
|
||||
//CHECK IF IT IS STILL NEEDED
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
//#include <cstdio>
|
||||
#include <dirent.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <sys/time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
@@ -253,11 +255,12 @@ const unsigned int tbl_CRC24Q[] = {
|
||||
0x42FA2F, 0xC4B6D4, 0xC82F22, 0x4E63D9, 0xD11CCE, 0x575035, 0x5BC9C3, 0xDD8538};
|
||||
|
||||
|
||||
extern "C" {
|
||||
void dgemm_(char *, char *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *);
|
||||
extern void dgetrf_(int *, int *, double *, int *, int *, int *);
|
||||
extern void dgetri_(int *, double *, int *, int *, double *, int *, int *);
|
||||
extern void dgetrs_(char *, int *, int *, double *, int *, int *, double *, int *, int *);
|
||||
extern "C"
|
||||
{
|
||||
void dgemm_(char *, char *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *);
|
||||
extern void dgetrf_(int *, int *, double *, int *, int *, int *);
|
||||
extern void dgetri_(int *, double *, int *, int *, double *, int *, int *);
|
||||
extern void dgetrs_(char *, int *, int *, double *, int *, int *, double *, int *, int *);
|
||||
}
|
||||
|
||||
|
||||
@@ -2562,7 +2565,8 @@ void readpos(const char *file, const char *rcv, double *pos)
|
||||
if (buff[0] == '%' || buff[0] == '#') continue;
|
||||
if (sscanf(buff, "%lf %lf %lf %s", &poss[np][0], &poss[np][1], &poss[np][2],
|
||||
str) < 4) continue;
|
||||
strncpy(stas[np], str, 15);
|
||||
// strncpy(stas[np], str, 15); This line triggers a warning. Replaced by:
|
||||
memcpy(stas[np], str, 15 * sizeof(stas[np][0]));
|
||||
stas[np++][15] = '\0';
|
||||
}
|
||||
fclose(fp);
|
||||
@@ -4264,7 +4268,17 @@ int rtk_uncompress(const char *file, char *uncfile)
|
||||
dir = fname;
|
||||
fname = p + 1;
|
||||
}
|
||||
sprintf(cmd, "tar -C \"%s\" -xf \"%s\"", dir, tmpfile);
|
||||
// sprintf(cmd, "tar -C \"%s\" -xf \"%s\"", dir, tmpfile);
|
||||
// NOTE: This sprintf triggers a format overflow warning. Replaced by:
|
||||
std::ostringstream temp;
|
||||
std::string s_aux1(dir);
|
||||
std::string s_aux2(tmpfile);
|
||||
temp << "tar -C " << s_aux1 << " -xf " << s_aux2;
|
||||
std::string s_aux = temp.str();
|
||||
int n = s_aux.length();
|
||||
if (n < 2048)
|
||||
for (int i = 0; i < n; i++) cmd[i] = s_aux[i];
|
||||
|
||||
if (execcmd(cmd))
|
||||
{
|
||||
if (stat)
|
||||
|
||||
@@ -2145,7 +2145,7 @@ void rtkinit(rtk_t *rtk, const prcopt_t *opt)
|
||||
{
|
||||
sol_t sol0 = {{0, 0}, {}, {}, {}, '0', '0', '0', 0.0, 0.0, 0.0};
|
||||
ambc_t ambc0 = {{{0, 0}, {0, 0}, {0, 0}, {0, 0}}, {}, {}, {}, 0, {}};
|
||||
ssat_t ssat0 = {0, 0, {0.0}, {0.0}, {0.0}, {'0'}, {'0'}, {'0'}, {'0'}, {'0'}, {}, {}, {}, {}, 0.0, 0.0, 0.0, 0.0, {{0, 0}, {0, 0}}, {{}, {}}};
|
||||
ssat_t ssat0 = {0, 0, {0.0}, {0.0}, {0.0}, {'0'}, {'0'}, {'0'}, {'0'}, {'0'}, {}, {}, {}, {}, 0.0, 0.0, 0.0, 0.0, {{{0, 0}}, {{0, 0}}}, {{}, {}}};
|
||||
int i;
|
||||
|
||||
trace(3, "rtkinit :\n");
|
||||
|
||||
@@ -375,7 +375,7 @@ void decodefile(rtksvr_t *svr, int index)
|
||||
|
||||
nav_t nav = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
{0, 0, (erpd_t *){0}}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0},
|
||||
{0.0}, {0.0}, {0.0}, {0.0}, 0, {{0.0}, {0.0}}, {{0.0}, {0.0}}, {{0.0}, {0.0}, {0.0}},
|
||||
{0.0}, {0.0}, {0.0}, {0.0}, 0, {{0.0}, {0.0}}, {{0.0}, {0.0}}, {{{0.0}}, {{0.0}}, {{0.0}}},
|
||||
{0.0}, {0.0}, {*glo_fcn}, {*pcvt0}, sbssat0, {*sbsion0}, {*dgps0}, {*ssr0}, {*lexeph0},
|
||||
{{0, 0.0}, 0.0, {0.0}, {{0.0}, {0.0}}}, pppcorr0};
|
||||
|
||||
@@ -471,7 +471,7 @@ void *rtksvrthread(void *arg)
|
||||
q = svr->buff[i] + svr->buffsize;
|
||||
|
||||
/* read receiver raw/rtcm data from input stream */
|
||||
if ((n = strread(svr->stream + i, p, q - p)) <= 0)
|
||||
if ((n = strread(svr->stream + i, p, static_cast<int>(q[0]) - static_cast<int>(p[0]))) <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
#define SQRT_SOL(x) ((x) < 0.0 ? 0.0 : sqrt(x))
|
||||
|
||||
const int MAXFIELD = 64; /* max number of fields in a record */
|
||||
const int MAXNMEA = 256; /* max length of nmea sentence */
|
||||
|
||||
const double KNOT2M = 0.514444444; /* m/knot */
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
/* global options ------------------------------------------------------------*/
|
||||
@@ -115,7 +116,12 @@ serial_t *openserial(const char *path, int mode, char *msg)
|
||||
}
|
||||
parity = (char)toupper((int)parity);
|
||||
|
||||
sprintf(dev, "/dev/%s", port);
|
||||
// sprintf(dev, "/dev/%s", port); This line triggers a warning. Replaced by:
|
||||
std::string s_aux = "/dev/" + std::string(port);
|
||||
s_aux.resize(128, '\0');
|
||||
int n = s_aux.length();
|
||||
for (int i = 0; i < n; i++) dev[i] = s_aux[i];
|
||||
if (n == 0) dev[0] = '\0';
|
||||
|
||||
if ((mode & STR_MODE_R) && (mode & STR_MODE_W))
|
||||
rw = O_RDWR;
|
||||
@@ -779,7 +785,7 @@ tcpsvr_t *opentcpsvr(const char *path, char *msg)
|
||||
{
|
||||
tcpsvr_t *tcpsvr, tcpsvr0; // = {{0}};
|
||||
char port[256] = "";
|
||||
tcpsvr0 = {{0, {0}, 0, {0, 0, 0, {0}}, 0, 0, 0, 0}, {0, {0}, 0, {0, 0, 0, {0}}, 0, 0, 0, 0}};
|
||||
tcpsvr0 = {{0, {0}, 0, {0, 0, 0, {0}}, 0, 0, 0, 0}, {{0, {0}, 0, {0, 0, 0, {0}}, 0, 0, 0, 0}}};
|
||||
tracet(3, "opentcpsvr: path=%s\n", path);
|
||||
|
||||
if (!(tcpsvr = (tcpsvr_t *)malloc(sizeof(tcpsvr_t)))) return NULL;
|
||||
@@ -1224,7 +1230,11 @@ int rspntrip_s(ntrip_t *ntrip, char *msg)
|
||||
else if ((p = strstr((char *)ntrip->buff, NTRIP_RSP_ERROR)))
|
||||
{ /* error */
|
||||
nb = ntrip->nb < MAXSTATMSG ? ntrip->nb : MAXSTATMSG;
|
||||
strncpy(msg, (char *)ntrip->buff, nb);
|
||||
// strncpy(msg, (char *)ntrip->buff, nb); This line triggers a warning. Replaced by;
|
||||
std::string s_aux((char *)ntrip->buff);
|
||||
s_aux.resize(nb, '\0');
|
||||
for (int i = 0; i < nb; i++) msg[i] = s_aux[i];
|
||||
|
||||
msg[nb] = 0;
|
||||
tracet(1, "rspntrip_s: %s nb=%d\n", msg, ntrip->nb);
|
||||
ntrip->nb = 0;
|
||||
@@ -1380,7 +1390,11 @@ ntrip_t *openntrip(const char *path, int type, char *msg)
|
||||
/* ntrip access via proxy server */
|
||||
if (*proxyaddr)
|
||||
{
|
||||
sprintf(ntrip->url, "http://%s", tpath);
|
||||
// sprintf(ntrip->url, "http://%s", tpath); This line triggers a warning. Replaced by:
|
||||
std::string s_aux = "http://" + std::string(tpath);
|
||||
int n = s_aux.length();
|
||||
if (n < 256)
|
||||
for (int k = 0; k < n; k++) ntrip->url[k] = s_aux[k];
|
||||
strcpy(tpath, proxyaddr);
|
||||
}
|
||||
/* open tcp client stream */
|
||||
@@ -1479,7 +1493,6 @@ void decodeftppath(const char *path, char *addr, char *file, char *user,
|
||||
*q = '\0';
|
||||
if (passwd) strcpy(passwd, q + 1);
|
||||
}
|
||||
*q = '\0';
|
||||
if (user) strcpy(user, buff);
|
||||
}
|
||||
else
|
||||
@@ -1545,8 +1558,17 @@ void *ftpthread(void *arg)
|
||||
p++;
|
||||
else
|
||||
p = remote;
|
||||
sprintf(local, "%s%c%s", localdir, FILEPATHSEP, p);
|
||||
sprintf(errfile, "%s.err", local);
|
||||
// sprintf(local, "%s%c%s", localdir, FILEPATHSEP, p); This line triggers a warning. Replaced by:
|
||||
std::string s_aux = std::string(localdir) + std::to_string(FILEPATHSEP) + std::string(p);
|
||||
int n = s_aux.length();
|
||||
if (n < 1024)
|
||||
for (int i = 0; i < n; i++) local[i] = s_aux[i];
|
||||
|
||||
// sprintf(errfile, "%s.err", local); This line triggers a warning. Replaced by:
|
||||
std::string s_aux2 = std::string(local) + ".err";
|
||||
n = s_aux2.length();
|
||||
if (n < 1024)
|
||||
for (int i = 0; i < n; i++) errfile[i] = s_aux2[i];
|
||||
|
||||
/* if local file exist, skip download */
|
||||
strcpy(tmpfile, local);
|
||||
@@ -1574,16 +1596,35 @@ void *ftpthread(void *arg)
|
||||
/* download command (ref [2]) */
|
||||
if (ftp->proto == 0)
|
||||
{ /* ftp */
|
||||
sprintf(opt, "--ftp-user=%s --ftp-password=%s --glob=off --passive-ftp %s-t 1 -T %d -O \"%s\"",
|
||||
ftp->user, ftp->passwd, proxyopt, FTP_TIMEOUT, local);
|
||||
sprintf(cmd, "%s%s %s \"ftp://%s/%s\" 2> \"%s\"\n", env, FTP_CMD, opt, ftp->addr,
|
||||
remote, errfile);
|
||||
// sprintf(opt, "--ftp-user=%s --ftp-password=%s --glob=off --passive-ftp %s-t 1 -T %d -O \"%s\"",
|
||||
// ftp->user, ftp->passwd, proxyopt, FTP_TIMEOUT, local); This line triggers a warning. Replaced by:
|
||||
std::string s_aux = "--ftp-user=" + std::string(ftp->user) + " --ftp-password=" + std::string(ftp->passwd) +
|
||||
" --glob=off --passive-ftp " + std::string(proxyopt) + "s-t 1 -T " + std::to_string(FTP_TIMEOUT) +
|
||||
" -O \"" + std::string(local) + "\"";
|
||||
int k = s_aux.length();
|
||||
if (k < 1024)
|
||||
for (int i = 0; i < k; i++) opt[i] = s_aux[i];
|
||||
|
||||
// sprintf(cmd, "%s%s %s \"ftp://%s/%s\" 2> \"%s\"\n", env, FTP_CMD, opt, ftp->addr,
|
||||
// remote, errfile); This line triggers a warning. Replaced by:
|
||||
std::string s_aux2 = std::string(env) + std::string(FTP_CMD) + " " + std::string(opt) + " " +
|
||||
"\"ftp://" + std::string(ftp->addr) + "/" + std::string(remote) + "\" 2> \"" + std::string(errfile) + "\"\n";
|
||||
k = s_aux2.length();
|
||||
for (int i = 0; (i < k) && (i < 1024); i++) cmd[i] = s_aux2[i];
|
||||
}
|
||||
else
|
||||
{ /* http */
|
||||
sprintf(opt, "%s-t 1 -T %d -O \"%s\"", proxyopt, FTP_TIMEOUT, local);
|
||||
sprintf(cmd, "%s%s %s \"http://%s/%s\" 2> \"%s\"\n", env, FTP_CMD, opt, ftp->addr,
|
||||
remote, errfile);
|
||||
// sprintf(opt, "%s-t 1 -T %d -O \"%s\"", proxyopt, FTP_TIMEOUT, local); This line triggers a warning. Replaced by:
|
||||
std::string s_aux = std::string(proxyopt) + " -t 1 -T " + std::to_string(FTP_TIMEOUT) + " -O \"" + std::string(local) + "\"";
|
||||
int l = s_aux.length();
|
||||
for (int i = 0; (i < l) && (i < 1024); i++) opt[i] = s_aux[i];
|
||||
|
||||
// sprintf(cmd, "%s%s %s \"http://%s/%s\" 2> \"%s\"\n", env, FTP_CMD, opt, ftp->addr,
|
||||
// remote, errfile); This line triggers a warning. Replaced by:
|
||||
std::string s_aux2 = std::string(env) + std::string(FTP_CMD) + " " + std::string(opt) + " " +
|
||||
"\"http://" + std::string(ftp->addr) + "/" + std::string(remote) + "\" 2> \"" + std::string(errfile) + "\"\n";
|
||||
l = s_aux2.length();
|
||||
for (int i = 0; (i < l) && (i < 1024); i++) cmd[i] = s_aux2[i];
|
||||
}
|
||||
/* execute download command */
|
||||
if ((ret = execcmd(cmd)))
|
||||
@@ -2049,7 +2090,10 @@ int strstat(stream_t *stream, char *msg)
|
||||
strlock(stream);
|
||||
if (msg)
|
||||
{
|
||||
strncpy(msg, stream->msg, MAXSTRMSG - 1);
|
||||
// strncpy(msg, stream->msg, MAXSTRMSG - 1); This line triggers a warning. Replaced by:
|
||||
std::string aux_s(stream->msg);
|
||||
aux_s.resize(MAXSTRMSG - 1, '0');
|
||||
for (int i = 0; i < MAXSTRMSG - 1; i++) msg[i] = aux_s[i];
|
||||
msg[MAXSTRMSG - 1] = '\0';
|
||||
}
|
||||
if (!stream->port)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all text
|
||||
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
|
||||
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
|
||||
# built into libc) for the transcoding. See https://www.gnu.org/software/libiconv
|
||||
# for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
@@ -287,7 +287,7 @@ EXTENSION_MAPPING =
|
||||
|
||||
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
|
||||
# according to the Markdown format, which allows for more readable
|
||||
# documentation. See http://daringfireball.net/projects/markdown/ for details.
|
||||
# documentation. See https://daringfireball.net/projects/markdown/ for details.
|
||||
# The output of markdown processing is further processed by doxygen, so you can
|
||||
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
|
||||
# case of backward compatibilities issues.
|
||||
@@ -320,7 +320,7 @@ BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
|
||||
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
|
||||
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
|
||||
# https://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
|
||||
# will parse them like normal C++ but will assume all classes use public instead
|
||||
# of private inheritance when no explicit protection keyword is present.
|
||||
# The default value is: NO.
|
||||
@@ -679,7 +679,7 @@ LAYOUT_FILE = @PROJECT_SOURCE_DIR@/DoxygenLayout.xml
|
||||
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
|
||||
# the reference definitions. This must be a list of .bib files. The .bib
|
||||
# extension is automatically appended if omitted. This requires the bibtex tool
|
||||
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# For LaTeX the style of the bibliography can be controlled using
|
||||
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
|
||||
# search path. Do not use file names with spaces, bibtex cannot handle them. See
|
||||
@@ -761,7 +761,7 @@ INPUT = @PROJECT_SOURCE_DIR@
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
|
||||
# documentation (see: https://www.gnu.org/software/libiconv) for the list of
|
||||
# possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
@@ -994,7 +994,7 @@ SOURCE_TOOLTIPS = YES
|
||||
# If the USE_HTAGS tag is set to YES then the references to source code will
|
||||
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
|
||||
# source browser. The htags tool is part of GNU's global source tagging system
|
||||
# (see http://www.gnu.org/software/global/global.html). You will need version
|
||||
# (see https://www.gnu.org/software/global/global.html). You will need version
|
||||
# 4.8.6 or higher.
|
||||
#
|
||||
# To use it do the following:
|
||||
@@ -1137,7 +1137,7 @@ HTML_EXTRA_FILES =
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the stylesheet and background images according to
|
||||
# this color. Hue is specified as an angle on a colorwheel, see
|
||||
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
|
||||
# purple, and 360 is red again.
|
||||
# Minimum value: 0, maximum value: 359, default value: 220.
|
||||
@@ -1195,13 +1195,12 @@ HTML_INDEX_NUM_ENTRIES = 100
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
|
||||
# environment (see: https://developer.apple.com/xcode/), introduced with
|
||||
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
# startup.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
@@ -1240,7 +1239,7 @@ DOCSET_PUBLISHER_NAME = Publisher
|
||||
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
|
||||
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
|
||||
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
|
||||
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# Windows.
|
||||
#
|
||||
# The HTML Help Workshop contains a compiler that can convert all HTML output
|
||||
@@ -1453,7 +1452,7 @@ FORMULA_FONTSIZE = 10
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# https://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# instead of using prerendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
@@ -1465,7 +1464,7 @@ USE_MATHJAX = NO
|
||||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. See the MathJax site (see:
|
||||
# http://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# https://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# Possible values are: HTML-CSS (which is slower, but has the best
|
||||
# compatibility), NativeMML (i.e. MathML) and SVG.
|
||||
# The default value is: HTML-CSS.
|
||||
@@ -1480,11 +1479,11 @@ MATHJAX_FORMAT = HTML-CSS
|
||||
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from http://www.mathjax.org before deployment.
|
||||
# The default value is: http://cdn.mathjax.org/mathjax/latest.
|
||||
# MathJax from https://www.mathjax.org before deployment.
|
||||
# The default value is: https://cdnjs.com/libraries/mathjax/.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_RELPATH = https://cdnjs.com/libraries/mathjax/
|
||||
|
||||
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
|
||||
# extension names that should be enabled during MathJax rendering. For example
|
||||
@@ -1495,7 +1494,7 @@ MATHJAX_EXTENSIONS =
|
||||
|
||||
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
|
||||
# of code that will be used on startup of the MathJax code. See the MathJax site
|
||||
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# (see: https://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# example see the documentation.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
@@ -1542,7 +1541,7 @@ SERVER_BASED_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer ( doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/).
|
||||
# Xapian (see: https://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
@@ -1555,7 +1554,7 @@ EXTERNAL_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer ( doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/). See the section "External Indexing and
|
||||
# Xapian (see: https://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
@@ -1726,7 +1725,7 @@ LATEX_SOURCE_CODE = NO
|
||||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# The default value is: plain.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
|
||||
@@ -539,7 +539,7 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
|
||||
vlen = vlen + vlen_twiddle;
|
||||
|
||||
const float tol_f = tol;
|
||||
const unsigned int tol_i = static_cast<const unsigned int>(tol);
|
||||
const unsigned int tol_i = static_cast<unsigned int>(tol);
|
||||
|
||||
//first let's get a list of available architectures for the test
|
||||
std::vector<std::string> arch_list = get_arch_list(desc);
|
||||
@@ -565,6 +565,11 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
|
||||
std::cerr << " - " << name << std::endl;
|
||||
return false;
|
||||
}
|
||||
catch (std::string s)
|
||||
{
|
||||
std::cerr << "Error: " << s << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
//pull the input scalars into their own vector
|
||||
std::vector<volk_gnsssdr_type_t> inputsc;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <iostream> // for operator<<, basic_ostream, endl, char...
|
||||
#include <fstream> // IWYU pragma: keep
|
||||
#include <map> // for map, map<>::iterator, _Rb_tree_iterator
|
||||
#include <sstream> // for stringstream
|
||||
#include <string> // for string, operator<<
|
||||
#include <utility> // for pair
|
||||
#include <vector> // for vector
|
||||
@@ -48,15 +49,16 @@ int main(int argc, char* argv[])
|
||||
std::vector<volk_gnsssdr_test_results_t> results;
|
||||
if (argc > 1)
|
||||
{
|
||||
const size_t len = std::char_traits<char>::length(argv[1]);
|
||||
if (len == 0 || len > 2046)
|
||||
std::stringstream ss;
|
||||
ss << argv[1];
|
||||
if (ss.fail())
|
||||
{
|
||||
std::cerr << "Test name is too long." << std::endl;
|
||||
std::cerr << "Test name not correctly set." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
for (unsigned int ii = 0; ii < test_cases.size(); ++ii)
|
||||
{
|
||||
if (std::string(argv[1]) == test_cases[ii].name())
|
||||
if (ss.str() == test_cases[ii].name())
|
||||
{
|
||||
volk_gnsssdr_test_case_t test_case = test_cases[ii];
|
||||
if (run_volk_gnsssdr_tests(test_case.desc(), test_case.kernel_ptr(),
|
||||
|
||||
@@ -76,8 +76,7 @@ This will put the code for the new kernel into
|
||||
|
||||
Other kernels must be added by hand. See the following webpages for
|
||||
more information about creating VOLK kernels:
|
||||
http://gnuradio.org/doc/doxygen/volk_gnsssdr_guide.html
|
||||
http://gnuradio.org/redmine/projects/gnuradio/wiki/Volk
|
||||
https://www.gnuradio.org/doc/doxygen/volk_guide.html
|
||||
|
||||
|
||||
======================================================================
|
||||
|
||||
@@ -62,9 +62,9 @@ hybrid_observables_cc::hybrid_observables_cc(unsigned int nchannels_in,
|
||||
d_nchannels = nchannels_out;
|
||||
d_dump_filename = dump_filename;
|
||||
T_rx_s = 0.0;
|
||||
T_rx_step_s = 0.001; // 1 ms
|
||||
max_delta = 1.5; // 1.5 s
|
||||
d_latency = 0.5; // 300 ms
|
||||
T_rx_step_ms = 1; // 1 ms
|
||||
max_delta = 1.5; // 1.5 s
|
||||
d_latency = 0.5; // 300 ms
|
||||
valid_channels.resize(d_nchannels, false);
|
||||
d_num_valid_channels = 0;
|
||||
d_gnss_synchro_history = new Gnss_circular_deque<Gnss_Synchro>(static_cast<unsigned int>(max_delta * 1000.0), d_nchannels);
|
||||
@@ -87,6 +87,8 @@ hybrid_observables_cc::hybrid_observables_cc(unsigned int nchannels_in,
|
||||
}
|
||||
}
|
||||
}
|
||||
T_rx_TOW_ms = 0;
|
||||
T_rx_TOW_set = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -308,7 +310,10 @@ bool hybrid_observables_cc::interpolate_data(Gnss_Synchro &out, const unsigned i
|
||||
}
|
||||
find_interp_elements(ch, ti);
|
||||
|
||||
//Linear interpolation: y(t) = y(t1) + (y(t2) - y(t1)) * (t - t1) / (t2 - t1)
|
||||
// 1st: copy the nearest gnss_synchro data for that channel
|
||||
out = d_gnss_synchro_history->at(ch, 0);
|
||||
|
||||
// 2nd: Linear interpolation: y(t) = y(t1) + (y(t2) - y(t1)) * (t - t1) / (t2 - t1)
|
||||
|
||||
// CARRIER PHASE INTERPOLATION
|
||||
out.Carrier_phase_rads = d_gnss_synchro_history->at(ch, 0).Carrier_phase_rads + (d_gnss_synchro_history->at(ch, 1).Carrier_phase_rads - d_gnss_synchro_history->at(ch, 0).Carrier_phase_rads) * (ti - d_gnss_synchro_history->at(ch, 0).RX_time) / (d_gnss_synchro_history->at(ch, 1).RX_time - d_gnss_synchro_history->at(ch, 0).RX_time);
|
||||
@@ -317,7 +322,7 @@ bool hybrid_observables_cc::interpolate_data(Gnss_Synchro &out, const unsigned i
|
||||
out.Carrier_Doppler_hz = d_gnss_synchro_history->at(ch, 0).Carrier_Doppler_hz + (d_gnss_synchro_history->at(ch, 1).Carrier_Doppler_hz - d_gnss_synchro_history->at(ch, 0).Carrier_Doppler_hz) * (ti - d_gnss_synchro_history->at(ch, 0).RX_time) / (d_gnss_synchro_history->at(ch, 1).RX_time - d_gnss_synchro_history->at(ch, 0).RX_time);
|
||||
|
||||
// TOW INTERPOLATION
|
||||
out.TOW_at_current_symbol_s = d_gnss_synchro_history->at(ch, 0).TOW_at_current_symbol_s + (d_gnss_synchro_history->at(ch, 1).TOW_at_current_symbol_s - d_gnss_synchro_history->at(ch, 0).TOW_at_current_symbol_s) * (ti - d_gnss_synchro_history->at(ch, 0).RX_time) / (d_gnss_synchro_history->at(ch, 1).RX_time - d_gnss_synchro_history->at(ch, 0).RX_time);
|
||||
out.interp_TOW_ms = static_cast<double>(d_gnss_synchro_history->at(ch, 0).TOW_at_current_symbol_ms) + (static_cast<double>(d_gnss_synchro_history->at(ch, 1).TOW_at_current_symbol_ms) - static_cast<double>(d_gnss_synchro_history->at(ch, 0).TOW_at_current_symbol_ms)) * (ti - d_gnss_synchro_history->at(ch, 0).RX_time) / (d_gnss_synchro_history->at(ch, 1).RX_time - d_gnss_synchro_history->at(ch, 0).RX_time);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -335,6 +340,7 @@ double hybrid_observables_cc::compute_T_rx_s(const Gnss_Synchro &a)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void hybrid_observables_cc::find_interp_elements(const unsigned int &ch, const double &ti)
|
||||
{
|
||||
unsigned int closest = 0;
|
||||
@@ -402,10 +408,10 @@ void hybrid_observables_cc::correct_TOW_and_compute_prange(std::vector<Gnss_Sync
|
||||
{
|
||||
std::vector<Gnss_Synchro>::iterator it;
|
||||
|
||||
/////////////////////// DEBUG //////////////////////////
|
||||
// Logs if there is a pseudorange difference between
|
||||
// signals of the same satellite higher than a threshold
|
||||
////////////////////////////////////////////////////////
|
||||
/////////////////////// DEBUG //////////////////////////
|
||||
// Logs if there is a pseudorange difference between
|
||||
// signals of the same satellite higher than a threshold
|
||||
////////////////////////////////////////////////////////
|
||||
#ifndef NDEBUG
|
||||
std::vector<Gnss_Synchro>::iterator it2;
|
||||
double thr_ = 250.0 / SPEED_OF_LIGHT; // Maximum pseudorange difference = 250 meters
|
||||
@@ -415,8 +421,8 @@ void hybrid_observables_cc::correct_TOW_and_compute_prange(std::vector<Gnss_Sync
|
||||
{
|
||||
if (it->PRN == it2->PRN and it->System == it2->System)
|
||||
{
|
||||
double tow_dif_ = std::fabs(it->TOW_at_current_symbol_s - it2->TOW_at_current_symbol_s);
|
||||
if (tow_dif_ > thr_)
|
||||
double tow_dif_ = std::fabs(it->TOW_at_current_symbol_ms - it2->TOW_at_current_symbol_ms);
|
||||
if (tow_dif_ > thr_ * 1000.0)
|
||||
{
|
||||
DLOG(INFO) << "System " << it->System << ". Signals " << it->Signal << " and " << it2->Signal
|
||||
<< ". TOW difference in PRN " << it->PRN
|
||||
@@ -431,20 +437,37 @@ void hybrid_observables_cc::correct_TOW_and_compute_prange(std::vector<Gnss_Sync
|
||||
}
|
||||
}
|
||||
#endif
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
double TOW_ref = std::numeric_limits<double>::lowest();
|
||||
for (it = data.begin(); it != data.end(); it++)
|
||||
if (!T_rx_TOW_set)
|
||||
{
|
||||
if (it->TOW_at_current_symbol_s > TOW_ref)
|
||||
unsigned int TOW_ref = std::numeric_limits<unsigned int>::lowest();
|
||||
for (it = data.begin(); it != data.end(); it++)
|
||||
{
|
||||
TOW_ref = it->TOW_at_current_symbol_s;
|
||||
if (it->TOW_at_current_symbol_ms > TOW_ref)
|
||||
{
|
||||
TOW_ref = it->TOW_at_current_symbol_ms;
|
||||
}
|
||||
}
|
||||
T_rx_TOW_ms = TOW_ref;
|
||||
T_rx_TOW_set = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
T_rx_TOW_ms += T_rx_step_ms;
|
||||
//todo: check what happens during the week rollover
|
||||
if (T_rx_TOW_ms >= 604800000)
|
||||
{
|
||||
T_rx_TOW_ms = T_rx_TOW_ms % 604800000;
|
||||
}
|
||||
}
|
||||
for (it = data.begin(); it != data.end(); it++)
|
||||
{
|
||||
double traveltime_s = TOW_ref - it->TOW_at_current_symbol_s + GPS_STARTOFFSET_ms / 1000.0;
|
||||
it->RX_time = TOW_ref + GPS_STARTOFFSET_ms / 1000.0;
|
||||
double traveltime_s = (static_cast<double>(T_rx_TOW_ms) - it->interp_TOW_ms + GPS_STARTOFFSET_ms) / 1000.0;
|
||||
|
||||
//std::cout.precision(17);
|
||||
//std::cout << "Diff T_rx_TOW_ms - interp_TOW_ms: " << static_cast<double>(T_rx_TOW_ms) - it->interp_TOW_ms << std::endl;
|
||||
|
||||
it->RX_time = (T_rx_TOW_ms + GPS_STARTOFFSET_ms) / 1000.0;
|
||||
it->Pseudorange_m = traveltime_s * SPEED_OF_LIGHT;
|
||||
}
|
||||
}
|
||||
@@ -466,7 +489,7 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||
}
|
||||
for (int epoch = 0; epoch < ninput_items[d_nchannels]; epoch++)
|
||||
{
|
||||
T_rx_s += T_rx_step_s;
|
||||
T_rx_s += (static_cast<double>(T_rx_step_ms) / 1000.0);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
if ((total_input_items == 0) and (d_num_valid_channels == 0))
|
||||
@@ -503,6 +526,7 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < d_nchannels; i++)
|
||||
{
|
||||
if (d_gnss_synchro_history->size(i) > 2)
|
||||
@@ -515,6 +539,7 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||
}
|
||||
}
|
||||
d_num_valid_channels = valid_channels.count();
|
||||
|
||||
// Check if there is any valid channel after reading the new incoming Gnss_Synchro data
|
||||
if (d_num_valid_channels == 0)
|
||||
{
|
||||
@@ -522,7 +547,7 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||
return returned_elements;
|
||||
}
|
||||
|
||||
for (i = 0; i < d_nchannels; i++) //Discard observables with T_rx higher than the threshold
|
||||
for (i = 0; i < d_nchannels; i++) // Discard observables with T_rx higher than the threshold
|
||||
{
|
||||
if (valid_channels[i])
|
||||
{
|
||||
@@ -548,7 +573,7 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||
{
|
||||
if (valid_channels[i])
|
||||
{
|
||||
Gnss_Synchro interpolated_gnss_synchro = d_gnss_synchro_history->back(i);
|
||||
Gnss_Synchro interpolated_gnss_synchro; // empty set, it is required to COPY the nearest in the interpolation history = d_gnss_synchro_history->back(i);
|
||||
if (interpolate_data(interpolated_gnss_synchro, i, T_rx_s_out))
|
||||
{
|
||||
epoch_data.push_back(interpolated_gnss_synchro);
|
||||
@@ -560,11 +585,13 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||
}
|
||||
}
|
||||
d_num_valid_channels = valid_channels.count();
|
||||
|
||||
if (d_num_valid_channels == 0)
|
||||
{
|
||||
consume(d_nchannels, epoch + 1);
|
||||
return returned_elements;
|
||||
}
|
||||
|
||||
correct_TOW_and_compute_prange(epoch_data);
|
||||
std::vector<Gnss_Synchro>::iterator it = epoch_data.begin();
|
||||
for (i = 0; i < d_nchannels; i++)
|
||||
@@ -581,6 +608,7 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||
out[i][epoch].Flag_valid_pseudorange = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (d_dump)
|
||||
{
|
||||
// MULTIPLEXED FILE RECORDING - Record results to file
|
||||
@@ -591,7 +619,7 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||
{
|
||||
tmp_double = out[i][epoch].RX_time;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_double = out[i][epoch].TOW_at_current_symbol_s;
|
||||
tmp_double = out[i][epoch].interp_TOW_ms / 1000.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_double = out[i][epoch].Carrier_Doppler_hz;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
@@ -611,6 +639,7 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||
d_dump = false;
|
||||
}
|
||||
}
|
||||
|
||||
returned_elements++;
|
||||
}
|
||||
consume(d_nchannels, ninput_items[d_nchannels]);
|
||||
|
||||
@@ -76,7 +76,10 @@ private:
|
||||
Gnss_circular_deque<Gnss_Synchro>* d_gnss_synchro_history;
|
||||
boost::dynamic_bitset<> valid_channels;
|
||||
double T_rx_s;
|
||||
double T_rx_step_s;
|
||||
unsigned int T_rx_step_ms;
|
||||
//rx time follow GPST
|
||||
bool T_rx_TOW_set;
|
||||
unsigned int T_rx_TOW_ms;
|
||||
double max_delta;
|
||||
double d_latency;
|
||||
bool d_dump;
|
||||
|
||||
@@ -102,6 +102,14 @@ DirectResamplerConditioner::DirectResamplerConditioner(
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")";
|
||||
}
|
||||
if (in_stream_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_stream_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -84,6 +84,14 @@ MmseResamplerConditioner::MmseResamplerConditioner(
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")";
|
||||
}
|
||||
if (in_stream_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_stream_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,8 +55,7 @@ direct_resampler_conditioner_cb::direct_resampler_conditioner_cb(
|
||||
d_sample_freq_out(
|
||||
sample_freq_out),
|
||||
d_phase(0),
|
||||
d_lphase(0),
|
||||
d_history(1)
|
||||
d_lphase(0)
|
||||
{
|
||||
const double two_32 = 4294967296.0;
|
||||
// Computes the phase step multiplying the resampling ratio by 2^32 = 4294967296
|
||||
|
||||
@@ -59,7 +59,6 @@ private:
|
||||
uint32_t d_phase;
|
||||
uint32_t d_lphase;
|
||||
uint32_t d_phase_step;
|
||||
unsigned int d_history;
|
||||
|
||||
direct_resampler_conditioner_cb(double sample_freq_in,
|
||||
double sample_freq_out);
|
||||
|
||||
@@ -54,8 +54,7 @@ direct_resampler_conditioner_cc::direct_resampler_conditioner_cc(
|
||||
d_sample_freq_in(sample_freq_in),
|
||||
d_sample_freq_out(sample_freq_out),
|
||||
d_phase(0),
|
||||
d_lphase(0),
|
||||
d_history(1)
|
||||
d_lphase(0)
|
||||
{
|
||||
// Computes the phase step multiplying the resampling ratio by 2^32 = 4294967296
|
||||
const double two_32 = 4294967296.0;
|
||||
|
||||
@@ -64,7 +64,6 @@ private:
|
||||
uint32_t d_phase;
|
||||
uint32_t d_lphase;
|
||||
uint32_t d_phase_step;
|
||||
unsigned int d_history;
|
||||
direct_resampler_conditioner_cc(double sample_freq_in,
|
||||
double sample_freq_out);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user