From 0507febd7fe0651ea1ccdbcafcdc60c6931c2a33 Mon Sep 17 00:00:00 2001 From: Damian Miralles Date: Wed, 28 Nov 2018 14:18:35 -0600 Subject: [PATCH] bds b1i: quick fixes to b1i code, preparing for merge --- conf/gnss-sdr_BDS_B1I_byte.conf | 30 ++++++++++++------- .../libs/rtklib/rtklib_conversions.cc | 14 ++++----- .../libs/beidou_b1i_subframe_fsm.h | 12 ++++---- src/core/receiver/gnss_flowgraph.cc | 2 +- .../beidou_dnav_navigation_message.cc | 20 ------------- 5 files changed, 34 insertions(+), 44 deletions(-) diff --git a/conf/gnss-sdr_BDS_B1I_byte.conf b/conf/gnss-sdr_BDS_B1I_byte.conf index ef3d29f79..0e7bd9ef6 100644 --- a/conf/gnss-sdr_BDS_B1I_byte.conf +++ b/conf/gnss-sdr_BDS_B1I_byte.conf @@ -9,16 +9,16 @@ ;######### GLOBAL OPTIONS ################## ;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. -GNSS-SDR.internal_fs_sps=99375000 +GNSS-SDR.internal_fs_sps=25000000 ;######### CONTROL_THREAD CONFIG ############ ControlThread.wait_for_flowgraph=false ;######### SIGNAL_SOURCE CONFIG ############ SignalSource.implementation=File_Signal_Source -SignalSource.filename=/media/dmiralles/Seagate Backup Plus Drive/GNSS Data/Beidou_B1_IF_signal.bin +SignalSource.filename=/home/dmiralles/Documents/GNSS-Metadata-Standard/install/BdsB1IStr01.dat SignalSource.item_type=byte -SignalSource.sampling_frequency=99375000 +SignalSource.sampling_frequency=25000000 SignalSource.samples=0 SignalSource.repeat=false SignalSource.dump=false @@ -45,27 +45,37 @@ InputFilter.band1_error=1.0 InputFilter.band2_error=1.0 InputFilter.filter_type=bandpass InputFilter.grid_density=16 -InputFilter.sampling_frequency=99375000 -InputFilter.IF=28902000 +InputFilter.sampling_frequency=25000000 +InputFilter.IF=6250000 Resampler.implementation=Pass_Through -Resampler.sample_freq_in=99375000 -Resampler.sample_freq_out=99375000 +Resampler.sample_freq_in=25000000 +Resampler.sample_freq_out=25000000 Resampler.item_type=gr_complex ;######### CHANNELS GLOBAL CONFIG ############ -Channels_B1.count=8 +Channels_B1.count=10 Channels.in_acquisition=1 Channel.signal=B1 +Channel0.satellite = 1; +Channel1.satellite = 2; +Channel2.satellite = 3; +Channel3.satellite = 4; +Channel4.satellite = 5; +Channel5.satellite = 6; +Channel6.satellite = 8; +Channel7.satellite = 9; +Channel8.satellite = 13; +Channel9.satellite = 17; ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_B1.implementation=BEIDOU_B1I_PCPS_Acquisition Acquisition_B1.item_type=gr_complex Acquisition_B1.coherent_integration_time_ms=1 -Acquisition_B1.threshold=0.00005 +Acquisition_B1.threshold=0.004 ;Acquisition_B1.pfa=0.0000001; -Acquisition_B1.doppler_max=10000 +Acquisition_B1.doppler_max=12000 Acquisition_B1.doppler_step=100 Acquisition_B1.dump=true Acquisition_B1.dump_filename=./bds_acq diff --git a/src/algorithms/libs/rtklib/rtklib_conversions.cc b/src/algorithms/libs/rtklib/rtklib_conversions.cc index 3662310d4..01ae20a81 100644 --- a/src/algorithms/libs/rtklib/rtklib_conversions.cc +++ b/src/algorithms/libs/rtklib/rtklib_conversions.cc @@ -262,12 +262,12 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph) rtklib_sat.tgd[2] = 0.0; rtklib_sat.tgd[3] = 0.0; rtklib_sat.toes = bei_eph.d_Toe; - rtklib_sat.toc = gpst2time(rtklib_sat.week, bei_eph.d_Toc); - rtklib_sat.ttr = gpst2time(rtklib_sat.week, bei_eph.d_TOW); + rtklib_sat.toc = bdt2time(rtklib_sat.week, bei_eph.d_Toc); + rtklib_sat.ttr = bdt2time(rtklib_sat.week, bei_eph.d_TOW); /* adjustment for week handover */ double tow, toc; - tow = time2gpst(rtklib_sat.ttr, &rtklib_sat.week); - toc = time2gpst(rtklib_sat.toc, NULL); + tow = time2bdt(rtklib_sat.ttr, &rtklib_sat.week); + toc = time2bdt(rtklib_sat.toc, NULL); if (rtklib_sat.toes < tow - 302400.0) { rtklib_sat.week++; @@ -278,9 +278,9 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph) rtklib_sat.week--; tow += 604800.0; } - rtklib_sat.toe = gpst2time(rtklib_sat.week, rtklib_sat.toes); - rtklib_sat.toc = gpst2time(rtklib_sat.week, toc); - rtklib_sat.ttr = gpst2time(rtklib_sat.week, tow); + rtklib_sat.toe = bdt2time(rtklib_sat.week, rtklib_sat.toes); + rtklib_sat.toc = bdt2time(rtklib_sat.week, toc); + rtklib_sat.ttr = bdt2time(rtklib_sat.week, tow); return rtklib_sat; } diff --git a/src/algorithms/telemetry_decoder/libs/beidou_b1i_subframe_fsm.h b/src/algorithms/telemetry_decoder/libs/beidou_b1i_subframe_fsm.h index a312194b3..012558a68 100644 --- a/src/algorithms/telemetry_decoder/libs/beidou_b1i_subframe_fsm.h +++ b/src/algorithms/telemetry_decoder/libs/beidou_b1i_subframe_fsm.h @@ -33,12 +33,12 @@ #define GNSS_SDR_BEIDOU_B1I_SUBFRAME_FSM_H_ #include -#include "../../../core/system_parameters/beidou_dnav_almanac.h" -#include "../../../core/system_parameters/beidou_dnav_ephemeris.h" -#include "../../../core/system_parameters/beidou_dnav_iono.h" -#include "../../../core/system_parameters/beidou_dnav_navigation_message.h" -#include "../../../core/system_parameters/beidou_dnav_utc_model.h" -#include "../../../core/system_parameters/Beidou_B1I.h" +#include "beidou_dnav_almanac.h" +#include "beidou_dnav_ephemeris.h" +#include "beidou_dnav_iono.h" +#include "beidou_dnav_navigation_message.h" +#include "beidou_dnav_utc_model.h" +#include "Beidou_B1I.h" namespace sc = boost::statechart; namespace mpl = boost::mpl; diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 5f80733da..f4483aaa1 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -1211,7 +1211,7 @@ void GNSSFlowgraph::set_signals_list() std::set available_beidou_prn = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35}; + 30, 31, 32, 33, 34, 35, 36, 37}; std::string sv_list = configuration_->property("Galileo.prns", std::string("")); diff --git a/src/core/system_parameters/beidou_dnav_navigation_message.cc b/src/core/system_parameters/beidou_dnav_navigation_message.cc index 3004377d1..d5d47be88 100644 --- a/src/core/system_parameters/beidou_dnav_navigation_message.cc +++ b/src/core/system_parameters/beidou_dnav_navigation_message.cc @@ -165,15 +165,11 @@ void Beidou_Dnav_Navigation_Message::reset() } } - - Beidou_Dnav_Navigation_Message::Beidou_Dnav_Navigation_Message() { reset(); } - - void Beidou_Dnav_Navigation_Message::print_beidou_word_bytes(unsigned int BEIDOU_word) { std::cout << " Word ="; @@ -181,8 +177,6 @@ void Beidou_Dnav_Navigation_Message::print_beidou_word_bytes(unsigned int BEIDOU std::cout << std::endl; } - - bool Beidou_Dnav_Navigation_Message::read_navigation_bool(std::bitset bits, const std::vector> parameter) { bool value; @@ -198,7 +192,6 @@ bool Beidou_Dnav_Navigation_Message::read_navigation_bool(std::bitset bits, const std::vector> parameter) { unsigned long int value = 0; @@ -292,7 +285,6 @@ double Beidou_Dnav_Navigation_Message::check_t(double time) return corrTime; } -// User Algorithm for SV Clock Correction. double Beidou_Dnav_Navigation_Message::sv_clock_correction(double transmitTime) { double dt; @@ -396,10 +388,6 @@ void Beidou_Dnav_Navigation_Message::satellitePosition(double transmitTime) d_satvel_Z = d_satpos_Y * sin(i); } - - - - int Beidou_Dnav_Navigation_Message::subframe_decoder(char *subframe) { int subframe_ID = 0; @@ -786,9 +774,6 @@ int Beidou_Dnav_Navigation_Message::subframe_decoder(char *subframe) return subframe_ID; } - - - double Beidou_Dnav_Navigation_Message::utc_time(const double beidoutime_corrected) const { double t_utc; @@ -836,8 +821,6 @@ double Beidou_Dnav_Navigation_Message::utc_time(const double beidoutime_correcte return t_utc; } - - Beidou_Dnav_Ephemeris Beidou_Dnav_Navigation_Message::get_ephemeris() { Beidou_Dnav_Ephemeris ephemeris; @@ -889,7 +872,6 @@ Beidou_Dnav_Ephemeris Beidou_Dnav_Navigation_Message::get_ephemeris() return ephemeris; } - Beidou_Dnav_Iono Beidou_Dnav_Navigation_Message::get_iono() { Beidou_Dnav_Iono iono; @@ -907,7 +889,6 @@ Beidou_Dnav_Iono Beidou_Dnav_Navigation_Message::get_iono() return iono; } - Beidou_Dnav_Utc_Model Beidou_Dnav_Navigation_Message::get_utc_model() { Beidou_Dnav_Utc_Model utc_model; @@ -926,7 +907,6 @@ Beidou_Dnav_Utc_Model Beidou_Dnav_Navigation_Message::get_utc_model() return utc_model; } - bool Beidou_Dnav_Navigation_Message::satellite_validation() { bool flag_data_valid = false;