mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-21 09:34:53 +00:00
Linear regressor implemented in observables
This commit is contained in:
@@ -135,6 +135,7 @@ gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc(
|
||||
d_decimation_output_factor = 1;
|
||||
d_channel = 0;
|
||||
Prn_timestamp_at_preamble_ms = 0.0;
|
||||
flag_PLL_180_deg_phase_locked=false;
|
||||
//set_history(d_samples_per_bit*8); // At least a history of 8 bits are needed to correlate with the preamble
|
||||
}
|
||||
|
||||
@@ -224,6 +225,13 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
|
||||
if (!d_flag_frame_sync)
|
||||
{
|
||||
d_flag_frame_sync = true;
|
||||
if (corr_value<0)
|
||||
{
|
||||
flag_PLL_180_deg_phase_locked=true; //PLL is locked to opposite phase!
|
||||
std::cout<<"PLL in opposite phase for Sat "<<this->d_satellite.get_PRN()<<std::endl;
|
||||
}else{
|
||||
flag_PLL_180_deg_phase_locked=false;
|
||||
}
|
||||
LOG(INFO) <<" Frame sync SAT " << this->d_satellite << " with preamble start at " << d_preamble_time_seconds << " [s]";
|
||||
}
|
||||
}
|
||||
@@ -331,8 +339,13 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
|
||||
current_synchro_data.Flag_valid_word = (d_flag_frame_sync == true and d_flag_parity == true and flag_TOW_set == true);
|
||||
current_synchro_data.Flag_preamble = d_flag_preamble;
|
||||
current_synchro_data.Prn_timestamp_ms = in[0][0].Tracking_timestamp_secs * 1000.0;
|
||||
|
||||
current_synchro_data.Prn_timestamp_at_preamble_ms = Prn_timestamp_at_preamble_ms;
|
||||
|
||||
if (flag_PLL_180_deg_phase_locked==true)
|
||||
{
|
||||
//correct the accumulated phase for the costas loop phase shift, if required
|
||||
current_synchro_data.Carrier_phase_rads+=GPS_PI;
|
||||
}
|
||||
if(d_dump == true)
|
||||
{
|
||||
// MULTIPLEXED FILE RECORDING - Record results to file
|
||||
|
||||
@@ -150,6 +150,7 @@ private:
|
||||
|
||||
double Prn_timestamp_at_preamble_ms;
|
||||
bool flag_TOW_set;
|
||||
bool flag_PLL_180_deg_phase_locked;
|
||||
|
||||
std::string d_dump_filename;
|
||||
std::ofstream d_dump_file;
|
||||
|
||||
Reference in New Issue
Block a user