bds_b3i: fixing pvt computation for bds b3i single freq solution

This commit is contained in:
Damian Miralles 2019-07-02 18:57:44 -05:00
parent 450bdeda7f
commit 6ba57f0e12
No known key found for this signature in database
GPG Key ID: 8A92BA854ED245E1
8 changed files with 300 additions and 59 deletions

View File

@ -18,7 +18,7 @@ ControlThread.wait_for_flowgraph=false
;######### SIGNAL_SOURCE CONFIG ############
;# Signal Source config for GPS, Galileo signals
SignalSource0.implementation=File_Signal_Source
SignalSource0.filename=/archive/BDS3_datasets/long/20180713_211400_3.dat
SignalSource0.filename=/archive/BDS3_datasets/20180713_211400/20180713_211400_3.dat
SignalSource0.item_type=ibyte
SignalSource0.sampling_frequency=10000000
SignalSource0.samples=0
@ -28,7 +28,7 @@ SignalSource0.enable_throttle_control=false
;# Signal Source config for BDS signals
SignalSource1.implementation=File_Signal_Source
SignalSource1.filename=/archive/BDS3_datasets/long/20180713_211400_1.dat
SignalSource1.filename=/archive/BDS3_datasets/20180713_211400/20180713_211400_1.dat
SignalSource1.item_type=ibyte
SignalSource1.sampling_frequency=10000000
SignalSource1.samples=0
@ -97,7 +97,7 @@ Resampler1.item_type=gr_complex
Channels_1C.count=7
Channels_1B.count=7
Channels_B1.count=4
Channels.in_acquisition=18
Channels.in_acquisition=10
;# Preparing collection for GPS satellites
Channel0.RF_channel_ID=0
@ -150,12 +150,6 @@ Channel14.RF_channel_ID=1
Channel15.RF_channel_ID=1
Channel16.RF_channel_ID=1
Channel17.RF_channel_ID=1
Channel18.RF_channel_ID=1
Channel19.RF_channel_ID=1
Channel20.RF_channel_ID=1
Channel21.RF_channel_ID=1
Channel22.RF_channel_ID=1
Channel23.RF_channel_ID=1
Channel14.signal=B1
Channel14.satellite = 29
@ -172,9 +166,9 @@ Channel17.satellite = 30
Acquisition_B1.implementation=BEIDOU_B1I_PCPS_Acquisition
Acquisition_B1.item_type=gr_complex
Acquisition_B1.coherent_integration_time_ms=1
Acquisition_B1.threshold=0.0005
Acquisition_B1.doppler_max=15000
Acquisition_B1.doppler_step=100
Acquisition_B1.threshold=0.0004
Acquisition_B1.doppler_max=10000
Acquisition_B1.doppler_step=50
Acquisition_B1.dump=false
Acquisition_B1.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_acq
Acquisition_B1.blocking=false;
@ -186,9 +180,9 @@ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
Acquisition_1C.item_type=gr_complex
Acquisition_1C.coherent_integration_time_ms=1
Acquisition_1C.threshold=0.0005
Acquisition_1C.doppler_max=15000
Acquisition_1C.doppler_max=10000
Acquisition_1C.doppler_step=100
Acquisition_1C.dump=true
Acquisition_1C.dump=false
Acquisition_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_acq
Acquisition_1C.blocking=false;
Acquisition_1C.use_CFAR_algorithm=true;
@ -199,9 +193,9 @@ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition
Acquisition_1B.item_type=gr_complex
Acquisition_1B.coherent_integration_time_ms=4
Acquisition_1B.threshold=0.0015
Acquisition_1B.doppler_max=15000
Acquisition_1B.doppler_max=10000
Acquisition_1B.doppler_step=100
Acquisition_1B.dump=true
Acquisition_1B.dump=false
Acquisition_1B.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gal_e1b_acq
Acquisition_1B.blocking=false;
Acquisition_1B.use_CFAR_algorithm=true;
@ -212,21 +206,21 @@ Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
Tracking_B1.item_type=gr_complex
Tracking_B1.pll_bw_hz=25.0;
Tracking_B1.dll_bw_hz=2.50;
Tracking_B1.dump=true;
Tracking_B1.dump=false;
Tracking_B1.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_trk_ch_
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
Tracking_1C.item_type=gr_complex
Tracking_1C.pll_bw_hz=25.0;
Tracking_1C.dll_bw_hz=2.50;
Tracking_1C.dump=true;
Tracking_1C.dump=false;
Tracking_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_trk_ch_
Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking
Tracking_1B.item_type=gr_complex
Tracking_1B.pll_bw_hz=25.0;
Tracking_1B.dll_bw_hz=2.50;
Tracking_1B.dump=true;
Tracking_1B.dump=false;
Tracking_1B.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gal_e1b_trk_ch_
;######### TELEMETRY DECODER GPS CONFIG ############
@ -239,7 +233,8 @@ TelemetryDecoder_1C.dump=true
TelemetryDecoder_1C.dump_filename=./gps_tel_dec
TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder
TelemetryDecoder_1B.dump=false
TelemetryDecoder_1B.dump=true
TelemetryDecoder_1B.dump_filename=./gal_tel_dec
;######### OBSERVABLES CONFIG ############
Observables.implementation=Hybrid_Observables
@ -255,11 +250,11 @@ PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Es
PVT.output_rate_ms=100
PVT.display_rate_ms=500
PVT.dump=true
PVT.dump_filename = /home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/pvt_l1
PVT.dump_filename = /archive/pvt_bds_gal_gps_l1
PVT.kml_output_enabled = false;
PVT.xml_output_enabled = false;
PVT.xml_output_enabled = true;
PVT.gpx_output_enabled = false;
PVT.rinex_output_enabled = false;
PVT.rinex_output_enabled = true;
PVT.rtcm_output_enabled = false;
PVT.nmea_output_enabled = false;
PVT.geojson_output_enabled = false;

View File

@ -16,7 +16,7 @@ ControlThread.wait_for_flowgraph=false
;######### SIGNAL_SOURCE CONFIG ############
SignalSource.implementation=File_Signal_Source
SignalSource.filename=/archive/BDS3_datasets/long/20180713_211400_1.dat
SignalSource.filename=/archive/BDS3_datasets/20180713_211400/20180713_211400_1.dat
SignalSource.item_type=ibyte
SignalSource.sampling_frequency=10000000
SignalSource.samples=0

View File

@ -2192,8 +2192,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
if ((gps_ephemeris_iter != d_pvt_solver->gps_ephemeris_map.cend()) and (beidou_dnav_ephemeris_iter != d_pvt_solver->beidou_dnav_ephemeris_map.cend()))
{
std::string bds_signal("B1");
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, beidou_dnav_ephemeris_iter->second, d_rx_time, bds_signal);
rp->rinex_nav_header(rp->navMixFile, d_pvt_solver->gps_iono, d_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
//rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, beidou_dnav_ephemeris_iter->second, d_rx_time, bds_signal);
//rp->rinex_nav_header(rp->navMixFile, d_pvt_solver->gps_iono, d_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
b_rinex_header_written = true; // do not write header anymore
}
@ -2203,8 +2203,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
{
std::string bds_signal("B1");
std::string gal_signal("1B");
rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, beidou_dnav_ephemeris_iter->second, d_rx_time, gal_signal, bds_signal);
rp->rinex_nav_header(rp->navMixFile, d_pvt_solver->galileo_iono, d_pvt_solver->galileo_utc_model, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
//rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, beidou_dnav_ephemeris_iter->second, d_rx_time, gal_signal, bds_signal);
//rp->rinex_nav_header(rp->navMixFile, d_pvt_solver->galileo_iono, d_pvt_solver->galileo_utc_model, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
b_rinex_header_written = true; // do not write header anymore
}
@ -2212,9 +2212,9 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
case 503: // BeiDou B1I + GLONASS L1 C/A
if (beidou_dnav_ephemeris_iter != d_pvt_solver->beidou_dnav_ephemeris_map.cend())
{
rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
rp->log_rinex_nav(rp->navFile, d_pvt_solver->beidou_dnav_ephemeris_map);
//rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
//rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
//rp->log_rinex_nav(rp->navFile, d_pvt_solver->beidou_dnav_ephemeris_map);
b_rinex_header_written = true; // do not write header anymore
}
@ -2222,9 +2222,9 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
case 504: // BeiDou B1I + GPS L1 C/A + Galileo E1B
if (beidou_dnav_ephemeris_iter != d_pvt_solver->beidou_dnav_ephemeris_map.cend())
{
rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
rp->log_rinex_nav(rp->navFile, d_pvt_solver->beidou_dnav_ephemeris_map);
//rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
//rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
//rp->log_rinex_nav(rp->navFile, d_pvt_solver->beidou_dnav_ephemeris_map);
b_rinex_header_written = true; // do not write header anymore
}
@ -2232,9 +2232,9 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
case 505: // BeiDou B1I + GPS L1 C/A + GLONASS L1 C/A + Galileo E1B
if (beidou_dnav_ephemeris_iter != d_pvt_solver->beidou_dnav_ephemeris_map.cend())
{
rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
rp->log_rinex_nav(rp->navFile, d_pvt_solver->beidou_dnav_ephemeris_map);
//rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
//rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
//rp->log_rinex_nav(rp->navFile, d_pvt_solver->beidou_dnav_ephemeris_map);
b_rinex_header_written = true; // do not write header anymore
}
@ -2242,9 +2242,9 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
case 506: // BeiDou B1I + Beidou B3I
if (beidou_dnav_ephemeris_iter != d_pvt_solver->beidou_dnav_ephemeris_map.cend())
{
rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
rp->log_rinex_nav(rp->navFile, d_pvt_solver->beidou_dnav_ephemeris_map);
//rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
//rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
//rp->log_rinex_nav(rp->navFile, d_pvt_solver->beidou_dnav_ephemeris_map);
b_rinex_header_written = true; // do not write header anymore
}
@ -2262,7 +2262,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
if (beidou_dnav_ephemeris_iter != d_pvt_solver->beidou_dnav_ephemeris_map.cend())
{
rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B3");
rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
//rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
b_rinex_header_written = true; // do not write header anymore
}
@ -2271,7 +2271,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
if (beidou_dnav_ephemeris_iter != d_pvt_solver->beidou_dnav_ephemeris_map.cend())
{
rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B3");
rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
//rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
b_rinex_header_written = true; // do not write header anymore
}
@ -2280,7 +2280,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
if (beidou_dnav_ephemeris_iter != d_pvt_solver->beidou_dnav_ephemeris_map.cend())
{
rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B3");
rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
//rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
b_rinex_header_written = true; // do not write header anymore
}

View File

@ -1788,7 +1788,6 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono&
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_alpha3, 10, 2), 12);
line += std::string(7, ' ');
line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
@ -1802,7 +1801,6 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono&
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_beta3, 10, 2), 12);
line += std::string(7, ' ');
line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
@ -1813,7 +1811,6 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono&
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1_UTC, 15, 2), 16);
line += std::string(22, ' ');
line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
@ -1990,6 +1987,253 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_cnav_iono, const Gps_CNAV_Utc_Model& gps_cnav_utc_model, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model)
{
std::string line;
stringVersion = "3.02";
version = 3;
// -------- Line 1
line = std::string(5, ' ');
line += stringVersion;
line += std::string(11, ' ');
line += std::string("N: GNSS NAV DATA");
line += std::string(4, ' ');
line += std::string("M: MIXED");
line += std::string(12, ' ');
line += std::string("RINEX VERSION / TYPE");
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line 2
line.clear();
line += Rinex_Printer::getLocalTime();
line += std::string("PGM / RUN BY / DATE");
line += std::string(1, ' ');
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line COMMENT
line.clear();
line += Rinex_Printer::leftJustify("GNSS NAVIGATION MESSAGE FILE GENERATED BY GNSS-SDR", 60);
line += Rinex_Printer::leftJustify("COMMENT", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line COMMENT
line.clear();
std::string gnss_sdr_version(GNSS_SDR_VERSION);
line += "GNSS-SDR VERSION ";
line += Rinex_Printer::leftJustify(gnss_sdr_version, 43);
line += Rinex_Printer::leftJustify("COMMENT", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line COMMENT
line.clear();
line += Rinex_Printer::leftJustify("See https://gnss-sdr.org", 60);
line += Rinex_Printer::leftJustify("COMMENT", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line ionospheric info 1, only version 3 supported
line.clear();
line += std::string("BDSA");
line += std::string(1, ' ');
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_alpha0, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_alpha1, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_alpha2, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_alpha3, 10, 2), 12);
line += std::string(7, ' ');
line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line ionospheric info 2
line.clear();
line += std::string("BDSB");
line += std::string(1, ' ');
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_beta0, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_beta1, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_beta2, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_beta3, 10, 2), 12);
line += std::string(7, ' ');
line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line ionospheric info 1
line.clear();
line += std::string("GPSA");
line += std::string(1, ' ');
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_cnav_iono.d_alpha0, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_cnav_iono.d_alpha1, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_cnav_iono.d_alpha2, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_cnav_iono.d_alpha3, 10, 2), 12);
line += std::string(7, ' ');
line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line 5 system time correction
line.clear();
line += std::string("BDUT");
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_utc_model.d_A0_UTC, 16, 2), 18);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_utc_model.d_A1_UTC, 15, 2), 16);
line += std::string(22, ' ');
line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line system time correction 3
line.clear();
line += std::string("GPUT");
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_cnav_utc_model.d_A0, 16, 2), 18);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_cnav_utc_model.d_A1, 15, 2), 16);
line += Rinex_Printer::rightJustify(std::to_string(gps_cnav_utc_model.d_t_OT), 7);
line += Rinex_Printer::rightJustify(std::to_string(gps_cnav_utc_model.i_WN_T), 5);
line += std::string(10, ' ');
line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line 6 leap seconds
// For leap second information, see http://www.endruntechnologies.com/leap.htm
line.clear();
line += Rinex_Printer::rightJustify(std::to_string(gps_cnav_utc_model.d_DeltaT_LS), 6);
line += Rinex_Printer::rightJustify(std::to_string(gps_cnav_utc_model.d_DeltaT_LSF), 6);
line += Rinex_Printer::rightJustify(std::to_string(gps_cnav_utc_model.i_WN_LSF), 6);
line += Rinex_Printer::rightJustify(std::to_string(gps_cnav_utc_model.i_DN), 6);
line += std::string(36, ' ');
line += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- End of Header
line.clear();
line += std::string(60, ' ');
line += Rinex_Printer::leftJustify("END OF HEADER", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
}
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glo_gnav_utc_model, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model)
{
std::string line;
// -------- Line 1
line = std::string(5, ' ');
line += stringVersion;
line += std::string(11, ' ');
line += std::string("N: GNSS NAV DATA");
line += std::string(4, ' ');
line += std::string("M: MIXED");
line += std::string(12, ' ');
line += std::string("RINEX VERSION / TYPE");
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line 2
line.clear();
line += Rinex_Printer::getLocalTime();
line += std::string("PGM / RUN BY / DATE");
line += std::string(1, ' ');
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line COMMENT
line.clear();
line += Rinex_Printer::leftJustify("GNSS NAVIGATION MESSAGE FILE GENERATED BY GNSS-SDR", 60);
line += Rinex_Printer::leftJustify("COMMENT", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line COMMENT
line.clear();
std::string gnss_sdr_version(GNSS_SDR_VERSION);
line += "GNSS-SDR VERSION ";
line += Rinex_Printer::leftJustify(gnss_sdr_version, 43);
line += Rinex_Printer::leftJustify("COMMENT", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line COMMENT
line.clear();
line += Rinex_Printer::leftJustify("See https://gnss-sdr.org", 60);
line += Rinex_Printer::leftJustify("COMMENT", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line ionospheric info 1, only version 3 supported
line.clear();
line += std::string("BDSA");
line += std::string(1, ' ');
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_alpha0, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_alpha1, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_alpha2, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_alpha3, 10, 2), 12);
line += std::string(7, ' ');
line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line ionospheric info 2
line.clear();
line += std::string("BDSB");
line += std::string(1, ' ');
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_beta0, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_beta1, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_beta2, 10, 2), 12);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_iono.d_beta3, 10, 2), 12);
line += std::string(7, ' ');
line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line 5 system time correction
line.clear();
line += std::string("BDUT");
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_utc_model.d_A0_UTC, 16, 2), 18);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(bds_dnav_utc_model.d_A1_UTC, 15, 2), 16);
line += std::string(22, ' ');
line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line system time correction 1
line.clear();
line += std::string("GLUT");
line += std::string(1, ' ');
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(glo_gnav_utc_model.d_tau_c, 16, 2), 17);
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(0.0, 15, 2), 16);
line += Rinex_Printer::rightJustify(std::to_string(0.0), 7);
line += Rinex_Printer::rightJustify(std::to_string(0.0), 5);
line += std::string(10, ' ');
line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line 6 leap seconds
// For leap second information, see http://www.endruntechnologies.com/leap.htm
line.clear();
line += Rinex_Printer::rightJustify(std::to_string(bds_dnav_utc_model.d_DeltaT_LS), 6);
line += Rinex_Printer::rightJustify(std::to_string(bds_dnav_utc_model.d_DeltaT_LSF), 6);
line += Rinex_Printer::rightJustify(std::to_string(bds_dnav_utc_model.i_WN_LSF), 6);
line += Rinex_Printer::rightJustify(std::to_string(bds_dnav_utc_model.i_DN), 6);
line += std::string(36, ' ');
line += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- End of Header
line.clear();
line += std::string(60, ' ');
line += Rinex_Printer::leftJustify("END OF HEADER", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
}
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model)
{
std::string line;
@ -2120,12 +2364,6 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps
}
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glo_gnav_utc_model, const Glonass_Gnav_Ephemeris& glo_gnav_eph, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model);
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model);
void Rinex_Printer::rinex_sbs_header(std::fstream& out)
{
std::string line;

View File

@ -167,7 +167,7 @@ public:
/*!
* \brief Generates the Mixed GLONASS L1,L2 + BDS B1I, B3I Navigation Data header
*/
void rinex_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glo_gnav_utc_model, const Glonass_Gnav_Ephemeris& glo_gnav_eph, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model);
void rinex_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glo_gnav_utc_model, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model);
/*!
* \brief Generates the Mixed (Galileo/BDS B1I, B3I) Navigation Data header

View File

@ -301,6 +301,9 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
rtklib_sat.Adot = 0; //only in CNAV;
rtklib_sat.ndot = 0; //only in CNAV;
rtklib_sat.svh = bei_eph.i_SV_health;
rtklib_sat.sva = bei_eph.i_SV_accuracy;
rtklib_sat.code = bei_eph.i_sig_type; /*B1I data*/
rtklib_sat.flag = bei_eph.i_nav_type; /*MEO/IGSO satellite*/
rtklib_sat.iode = static_cast<int32_t>(bei_eph.d_AODE); /* AODE */

View File

@ -282,6 +282,11 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
PC = P2 + P1_P2 - ISCl5i;
}
}
if (sys == SYS_BDS)
{
P2 += P2_C2; /* C2->P2 */
PC = P2; // no tgd corrections for B3I
}
else if (sys == SYS_GAL or sys == SYS_GLO or sys == SYS_BDS) // Gal. E5a single freq.
{
P2 += P2_C2; /* C2->P2 */

View File

@ -27,9 +27,9 @@
%
close all;clear;
samplingFreq = 25000000; %[Hz]
channels=[0:9];
path='/home/dmiralles/Documents/gnss-sdr/';
samplingFreq = 10000000; %[Hz]
channels=[0:17];
path='/home/dmiralles/Documents/gnss-sdr/build/';
addpath('libs/');
clear PRN_absolute_sample_start;
for N=1:1:length(channels)
@ -39,12 +39,12 @@ end
%% Plotting values
%--- Configurations
chn_num_a = 6;
chn_num_b = 2;
chn_num_a = 11;
chn_num_b = 3;
%--- Plot results
figure;
plot(GNSS_telemetry(chn_num_a).tracking_sample_counter, ...
GNSS_telemetry(chn_num_a).tow_current_symbol_ms, 'b+');
GNSS_telemetry(chn_num_a).tow_current_symbol_ms/1000, 'b+');
hold on;
grid on;
plot(GNSS_telemetry(chn_num_b).tracking_sample_counter, ...