mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-08-07 22:43:52 +00:00
Clean source code, update to new gnss_synchro parameter name
This commit is contained in:
parent
a2a9fef7f7
commit
5fc1e018fd
@ -492,9 +492,8 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
|
||||
}
|
||||
else
|
||||
{
|
||||
rx_position_and_time(3) = pvt_sol.dtr[0] / GPS_C_m_s; // the receiver clock offset is expressed in [meters]
|
||||
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]
|
||||
}
|
||||
//[s]
|
||||
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
|
||||
//observable fix:
|
||||
//double offset_s = this->get_time_offset_s();
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -324,11 +324,6 @@ bool hybrid_observables_cc::interpolate_data(Gnss_Synchro &out, const unsigned i
|
||||
// TOW INTERPOLATION
|
||||
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);
|
||||
|
||||
|
||||
//std::cout.precision(17);
|
||||
//std::cout << "Diff TOW_at_current_symbol_ms(1) - out.interp_TOW_ms: " << static_cast<double>(d_gnss_synchro_history->at(ch, 1).TOW_at_current_symbol_ms) - out.interp_TOW_ms << std::endl;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -345,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;
|
||||
@ -442,8 +438,6 @@ void hybrid_observables_cc::correct_TOW_and_compute_prange(std::vector<Gnss_Sync
|
||||
}
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
if (!T_rx_TOW_set)
|
||||
{
|
||||
unsigned int TOW_ref = std::numeric_limits<unsigned int>::lowest();
|
||||
@ -532,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)
|
||||
@ -544,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)
|
||||
{
|
||||
@ -589,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++)
|
||||
@ -610,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
|
||||
@ -640,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]);
|
||||
|
@ -415,7 +415,7 @@ int glonass_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribu
|
||||
current_symbol.PRN = this->d_satellite.get_PRN();
|
||||
current_symbol.TOW_at_current_symbol_ms = round(d_TOW_at_current_symbol * 1000.0);
|
||||
// todo: glonass time to gps time should be done in observables block
|
||||
//current_symbol.TOW_at_current_symbol_s -= delta_t; // Galileo to GPS TOW
|
||||
// current_symbol.TOW_at_current_symbol_ms -= -= static_cast<unsigned int>(delta_t) * 1000; // Galileo to GPS TOW
|
||||
|
||||
if (d_dump == true)
|
||||
{
|
||||
|
@ -415,7 +415,7 @@ int glonass_l2_ca_telemetry_decoder_cc::general_work(int noutput_items __attribu
|
||||
current_symbol.PRN = this->d_satellite.get_PRN();
|
||||
current_symbol.TOW_at_current_symbol_ms = round(d_TOW_at_current_symbol * 1000.0);
|
||||
// todo: glonass time to gps time should be done in observables block
|
||||
//current_symbol.TOW_at_current_symbol_s -= delta_t;
|
||||
// current_symbol.TOW_at_current_symbol_ms -= static_cast<unsigned int>(delta_t) * 1000;
|
||||
|
||||
if (d_dump == true)
|
||||
{
|
||||
|
@ -255,7 +255,6 @@ int StaticPositionSystemTest::configure_receiver()
|
||||
const float band1_error = 1.0;
|
||||
const float band2_error = 1.0;
|
||||
const int grid_density = 16;
|
||||
const int decimation_factor = 1;
|
||||
|
||||
const float zero = 0.0;
|
||||
const int number_of_channels = 8;
|
||||
|
@ -79,7 +79,7 @@ else
|
||||
% {
|
||||
% tmp_double = current_gnss_synchro[i].RX_time;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].TOW_at_current_symbol_s;
|
||||
% tmp_double = current_gnss_synchro[i].TOW_at_current_symbol_ms;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].Carrier_Doppler_hz;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
|
Loading…
x
Reference in New Issue
Block a user