mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
GLONASS Observables: Fixes bug in TOW updating
Fixes bug in TOW update when a new value has been computed. This adds a new flag to keep track of TOW update given the tk component. The code fix improves the pseudorange measurement for code
This commit is contained in:
parent
e5e9cc97ad
commit
c5a690cf1e
@ -62,6 +62,8 @@ TelemetryDecoder_1G.implementation=GLONASS_L1_CA_Telemetry_Decoder
|
|||||||
|
|
||||||
;######### OBSERVABLES CONFIG ############
|
;######### OBSERVABLES CONFIG ############
|
||||||
Observables.implementation=Hybrid_Observables
|
Observables.implementation=Hybrid_Observables
|
||||||
|
Observables.dump=true;
|
||||||
|
Observables.dump_filename=/archive/glo_observables.dat
|
||||||
|
|
||||||
;######### PVT CONFIG ############
|
;######### PVT CONFIG ############
|
||||||
PVT.implementation=RTKLIB_PVT
|
PVT.implementation=RTKLIB_PVT
|
||||||
|
@ -351,10 +351,11 @@ int glonass_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attrib
|
|||||||
|
|
||||||
// UPDATE GNSS SYNCHRO DATA
|
// UPDATE GNSS SYNCHRO DATA
|
||||||
//2. Add the telemetry decoder information
|
//2. Add the telemetry decoder information
|
||||||
if (this->d_flag_preamble == true and d_nav.flag_TOW_set == true)
|
if (this->d_flag_preamble == true and d_nav.flag_TOW_new == true)
|
||||||
//update TOW at the preamble instant
|
//update TOW at the preamble instant
|
||||||
{
|
{
|
||||||
d_TOW_at_current_symbol = floor((d_nav.d_TOW + 2*GLONASS_L1_CA_CODE_PERIOD + GLONASS_GNAV_PREAMBLE_DURATION_S)*1000.0)/1000.0;
|
d_TOW_at_current_symbol = floor((d_nav.d_TOW - GLONASS_GNAV_PREAMBLE_DURATION_S)*1000.0)/1000.0;
|
||||||
|
d_nav.flag_TOW_new = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
else //if there is not a new preamble, we define the TOW of the current symbol
|
else //if there is not a new preamble, we define the TOW of the current symbol
|
||||||
|
@ -73,12 +73,8 @@ void Glonass_Gnav_Navigation_Message::reset()
|
|||||||
|
|
||||||
//broadcast orbit 1
|
//broadcast orbit 1
|
||||||
flag_TOW_set = false;
|
flag_TOW_set = false;
|
||||||
|
flag_TOW_new = false;
|
||||||
d_TOW = 0.0; //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
|
d_TOW = 0.0; //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
|
||||||
d_TOW_F1 = 0.0; //!< Time of GPS Week from HOW word of Subframe 1 [s]
|
|
||||||
d_TOW_F2 = 0.0; //!< Time of GPS Week from HOW word of Subframe 2 [s]
|
|
||||||
d_TOW_F3 = 0.0; //!< Time of GPS Week from HOW word of Subframe 3 [s]
|
|
||||||
d_TOW_F4 = 0.0; //!< Time of GPS Week from HOW word of Subframe 4 [s]
|
|
||||||
d_TOW_F5 = 0.0; //!< Time of GPS Week from HOW word of Subframe 5 [s]
|
|
||||||
|
|
||||||
flag_CRC_test = false;
|
flag_CRC_test = false;
|
||||||
d_frame_ID = 0;
|
d_frame_ID = 0;
|
||||||
@ -366,7 +362,8 @@ double Glonass_Gnav_Navigation_Message::get_TOW()
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
// tk is relative to UTC(SU) + 3.00 hrs, so we need to convert to utc and add corrections
|
// tk is relative to UTC(SU) + 3.00 hrs, so we need to convert to utc and add corrections
|
||||||
TOD = gnav_ephemeris.d_t_k - glot2utcsu - utcsu2utc + gnav_utc_model.d_tau_c + gnav_utc_model.d_tau_gps;
|
// tk plus 10 sec is the true tod since get_TOW is called when in str5
|
||||||
|
TOD = (gnav_ephemeris.d_t_k + 10) - glot2utcsu - utcsu2utc + gnav_utc_model.d_tau_c + gnav_utc_model.d_tau_gps;
|
||||||
|
|
||||||
|
|
||||||
boost::gregorian::date glo_date(gnav_ephemeris.d_yr, 1, 1);
|
boost::gregorian::date glo_date(gnav_ephemeris.d_yr, 1, 1);
|
||||||
@ -521,6 +518,7 @@ int Glonass_Gnav_Navigation_Message::string_decoder(std::string frame_string)
|
|||||||
gnav_ephemeris.d_TOW = d_TOW;
|
gnav_ephemeris.d_TOW = d_TOW;
|
||||||
gnav_ephemeris.d_WN = get_WN();
|
gnav_ephemeris.d_WN = get_WN();
|
||||||
flag_TOW_set = true;
|
flag_TOW_set = true;
|
||||||
|
flag_TOW_new = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -95,13 +95,9 @@ public:
|
|||||||
bool flag_utc_model_str_5; //!< Clock info send in string 5 of navigation data
|
bool flag_utc_model_str_5; //!< Clock info send in string 5 of navigation data
|
||||||
bool flag_utc_model_str_15; //!< Clock info send in string 15 of frame 5 of navigation data
|
bool flag_utc_model_str_15; //!< Clock info send in string 15 of frame 5 of navigation data
|
||||||
|
|
||||||
bool flag_TOW_set;
|
bool flag_TOW_set; //!< Flag indicating when the TOW has been set
|
||||||
|
bool flag_TOW_new; //!< Flag indicating when a new TOW has been computed
|
||||||
double d_TOW; //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
|
double d_TOW; //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
|
||||||
double d_TOW_F1; //!< Time of GPS Week from HOW word of Subframe 1 [s]
|
|
||||||
double d_TOW_F2; //!< Time of GPS Week from HOW word of Subframe 2 [s]
|
|
||||||
double d_TOW_F3; //!< Time of GPS Week from HOW word of Subframe 3 [s]
|
|
||||||
double d_TOW_F4; //!< Time of GPS Week from HOW word of Subframe 4 [s]
|
|
||||||
double d_TOW_F5; //!< Time of GPS Week from HOW word of Subframe 5 [s]
|
|
||||||
|
|
||||||
// Clock terms
|
// Clock terms
|
||||||
double d_satClkCorr; // Satellite clock error
|
double d_satClkCorr; // Satellite clock error
|
||||||
|
@ -7,16 +7,17 @@ addpath('./libs');
|
|||||||
samplingFreq = 6625000; %[Hz]
|
samplingFreq = 6625000; %[Hz]
|
||||||
channels=5;
|
channels=5;
|
||||||
path='/archive/';
|
path='/archive/';
|
||||||
observables_log_path=[path 'glo_observables'];
|
observables_log_path=[path 'glo_observables.dat'];
|
||||||
GNSS_observables= read_hybrid_observables_dump(channels,observables_log_path);
|
GNSS_observables= read_hybrid_observables_dump(channels,observables_log_path);
|
||||||
|
|
||||||
|
%%
|
||||||
%optional:
|
%optional:
|
||||||
%search all channels having good satellite simultaneously
|
%search all channels having good satellite simultaneously
|
||||||
min_idx=1;
|
min_idx=1;
|
||||||
for n=1:1:channels
|
for n=1:1:channels
|
||||||
idx=find(GNSS_observables.valid(n,:)>0,1,'first');
|
idx=find(GNSS_observables.valid(n,:)>0,1,'first');
|
||||||
if min_idx<idx
|
if min_idx<idx
|
||||||
min_idx=idx;
|
min_idx=idx
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user