mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
Fix defects detected by Coverity Scan
This commit is contained in:
parent
3ddfdb9167
commit
fe3d704c9d
@ -1269,7 +1269,7 @@ void Rinex_Printer::print_rinex_annotation(const Rtklib_Solver* pvt_solver, cons
|
||||
{
|
||||
log_rinex_obs(obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, rx_time, gnss_observables_map, true);
|
||||
}
|
||||
if (!d_rinex_header_updated && (pvt_solver->gps_utc_model.A0 != 0))
|
||||
if (!d_rinex_header_updated && (pvt_solver->gps_utc_model.A0 != 0) && (gps_ephemeris_iter != pvt_solver->gps_ephemeris_map.cend()))
|
||||
{
|
||||
update_obs_header(obsFile, pvt_solver->gps_utc_model);
|
||||
update_nav_header(navFile, pvt_solver->gps_utc_model, pvt_solver->gps_iono, gps_ephemeris_iter->second);
|
||||
|
@ -281,48 +281,51 @@ void Gnss_Sdr_Supl_Client::read_supl_data()
|
||||
gps_ephemeris_map.insert(std::pair<int, Gps_Ephemeris>(e->prn, gps_eph));
|
||||
gps_eph_iterator = this->gps_ephemeris_map.find(e->prn);
|
||||
}
|
||||
if (gps_time.valid)
|
||||
if (gps_eph_iterator != gps_ephemeris_map.end())
|
||||
{
|
||||
gps_eph_iterator->second.WN = assist.time.gps_week;
|
||||
/* TS 44.031: GPSTOW, range 0-604799.92, resolution 0.08 sec, 23-bit presentation */
|
||||
gps_eph_iterator->second.tow = static_cast<double>(assist.time.gps_tow) * 0.08;
|
||||
if (gps_time.valid)
|
||||
{
|
||||
gps_eph_iterator->second.WN = assist.time.gps_week;
|
||||
/* TS 44.031: GPSTOW, range 0-604799.92, resolution 0.08 sec, 23-bit presentation */
|
||||
gps_eph_iterator->second.tow = static_cast<double>(assist.time.gps_tow) * 0.08;
|
||||
}
|
||||
else
|
||||
{
|
||||
gps_eph_iterator->second.WN = 0;
|
||||
gps_eph_iterator->second.tow = 0;
|
||||
}
|
||||
gps_eph_iterator->second.PRN = e->prn;
|
||||
// SV navigation model
|
||||
gps_eph_iterator->second.code_on_L2 = e->bits;
|
||||
gps_eph_iterator->second.SV_accuracy = e->ura; // User Range Accuracy (URA)
|
||||
gps_eph_iterator->second.SV_health = e->health;
|
||||
gps_eph_iterator->second.IODC = static_cast<double>(e->IODC);
|
||||
// miss P flag (1 bit)
|
||||
// miss SF1 Reserved (87 bits)
|
||||
gps_eph_iterator->second.TGD = static_cast<double>(e->tgd) * T_GD_LSB;
|
||||
gps_eph_iterator->second.toc = static_cast<double>(e->toc) * T_OC_LSB;
|
||||
gps_eph_iterator->second.af0 = static_cast<double>(e->AF0) * A_F0_LSB;
|
||||
gps_eph_iterator->second.af1 = static_cast<double>(e->AF1) * A_F1_LSB;
|
||||
gps_eph_iterator->second.af2 = static_cast<double>(e->AF2) * A_F2_LSB;
|
||||
gps_eph_iterator->second.Crc = static_cast<double>(e->Crc) * C_RC_LSB;
|
||||
gps_eph_iterator->second.delta_n = static_cast<double>(e->delta_n) * DELTA_N_LSB;
|
||||
gps_eph_iterator->second.M_0 = static_cast<double>(e->M0) * M_0_LSB;
|
||||
gps_eph_iterator->second.Cuc = static_cast<double>(e->Cuc) * C_UC_LSB;
|
||||
gps_eph_iterator->second.ecc = static_cast<double>(e->e) * ECCENTRICITY_LSB;
|
||||
gps_eph_iterator->second.Cus = static_cast<double>(e->Cus) * C_US_LSB;
|
||||
gps_eph_iterator->second.sqrtA = static_cast<double>(e->A_sqrt) * SQRT_A_LSB;
|
||||
gps_eph_iterator->second.toe = static_cast<double>(e->toe) * T_OE_LSB;
|
||||
// miss fit interval flag (1 bit)
|
||||
gps_eph_iterator->second.AODO = e->AODA * AODO_LSB;
|
||||
gps_eph_iterator->second.Cic = static_cast<double>(e->Cic) * C_IC_LSB;
|
||||
gps_eph_iterator->second.OMEGA_0 = static_cast<double>(e->OMEGA_0) * OMEGA_0_LSB;
|
||||
gps_eph_iterator->second.Cis = static_cast<double>(e->Cis) * C_IS_LSB;
|
||||
gps_eph_iterator->second.i_0 = static_cast<double>(e->i0) * I_0_LSB;
|
||||
gps_eph_iterator->second.Crs = static_cast<double>(e->Crs) * C_RS_LSB;
|
||||
gps_eph_iterator->second.omega = static_cast<double>(e->w) * OMEGA_LSB;
|
||||
gps_eph_iterator->second.OMEGAdot = static_cast<double>(e->OMEGA_dot) * OMEGA_DOT_LSB;
|
||||
gps_eph_iterator->second.idot = static_cast<double>(e->i_dot) * I_DOT_LSB;
|
||||
}
|
||||
else
|
||||
{
|
||||
gps_eph_iterator->second.WN = 0;
|
||||
gps_eph_iterator->second.tow = 0;
|
||||
}
|
||||
gps_eph_iterator->second.PRN = e->prn;
|
||||
// SV navigation model
|
||||
gps_eph_iterator->second.code_on_L2 = e->bits;
|
||||
gps_eph_iterator->second.SV_accuracy = e->ura; // User Range Accuracy (URA)
|
||||
gps_eph_iterator->second.SV_health = e->health;
|
||||
gps_eph_iterator->second.IODC = static_cast<double>(e->IODC);
|
||||
// miss P flag (1 bit)
|
||||
// miss SF1 Reserved (87 bits)
|
||||
gps_eph_iterator->second.TGD = static_cast<double>(e->tgd) * T_GD_LSB;
|
||||
gps_eph_iterator->second.toc = static_cast<double>(e->toc) * T_OC_LSB;
|
||||
gps_eph_iterator->second.af0 = static_cast<double>(e->AF0) * A_F0_LSB;
|
||||
gps_eph_iterator->second.af1 = static_cast<double>(e->AF1) * A_F1_LSB;
|
||||
gps_eph_iterator->second.af2 = static_cast<double>(e->AF2) * A_F2_LSB;
|
||||
gps_eph_iterator->second.Crc = static_cast<double>(e->Crc) * C_RC_LSB;
|
||||
gps_eph_iterator->second.delta_n = static_cast<double>(e->delta_n) * DELTA_N_LSB;
|
||||
gps_eph_iterator->second.M_0 = static_cast<double>(e->M0) * M_0_LSB;
|
||||
gps_eph_iterator->second.Cuc = static_cast<double>(e->Cuc) * C_UC_LSB;
|
||||
gps_eph_iterator->second.ecc = static_cast<double>(e->e) * ECCENTRICITY_LSB;
|
||||
gps_eph_iterator->second.Cus = static_cast<double>(e->Cus) * C_US_LSB;
|
||||
gps_eph_iterator->second.sqrtA = static_cast<double>(e->A_sqrt) * SQRT_A_LSB;
|
||||
gps_eph_iterator->second.toe = static_cast<double>(e->toe) * T_OE_LSB;
|
||||
// miss fit interval flag (1 bit)
|
||||
gps_eph_iterator->second.AODO = e->AODA * AODO_LSB;
|
||||
gps_eph_iterator->second.Cic = static_cast<double>(e->Cic) * C_IC_LSB;
|
||||
gps_eph_iterator->second.OMEGA_0 = static_cast<double>(e->OMEGA_0) * OMEGA_0_LSB;
|
||||
gps_eph_iterator->second.Cis = static_cast<double>(e->Cis) * C_IS_LSB;
|
||||
gps_eph_iterator->second.i_0 = static_cast<double>(e->i0) * I_0_LSB;
|
||||
gps_eph_iterator->second.Crs = static_cast<double>(e->Crs) * C_RS_LSB;
|
||||
gps_eph_iterator->second.omega = static_cast<double>(e->w) * OMEGA_LSB;
|
||||
gps_eph_iterator->second.OMEGAdot = static_cast<double>(e->OMEGA_dot) * OMEGA_DOT_LSB;
|
||||
gps_eph_iterator->second.idot = static_cast<double>(e->i_dot) * I_DOT_LSB;
|
||||
}
|
||||
}
|
||||
|
||||
@ -343,18 +346,21 @@ void Gnss_Sdr_Supl_Client::read_supl_data()
|
||||
gps_acq_map.insert(std::pair<int, Gps_Acq_Assist>(e->prn, gps_acq_assist));
|
||||
gps_acq_iterator = this->gps_acq_map.find(e->prn);
|
||||
}
|
||||
// fill the acquisition assistance structure
|
||||
gps_acq_iterator->second.PRN = e->prn;
|
||||
gps_acq_iterator->second.tow = static_cast<double>(assist.acq_time);
|
||||
gps_acq_iterator->second.Doppler0 = static_cast<double>(e->doppler0);
|
||||
gps_acq_iterator->second.Doppler1 = static_cast<double>(e->doppler1);
|
||||
gps_acq_iterator->second.dopplerUncertainty = static_cast<double>(e->d_win);
|
||||
gps_acq_iterator->second.Code_Phase = static_cast<double>(e->code_ph);
|
||||
gps_acq_iterator->second.Code_Phase_int = static_cast<double>(e->code_ph_int);
|
||||
gps_acq_iterator->second.Code_Phase_window = static_cast<double>(e->code_ph_win);
|
||||
gps_acq_iterator->second.Azimuth = static_cast<double>(e->az);
|
||||
gps_acq_iterator->second.Elevation = static_cast<double>(e->el);
|
||||
gps_acq_iterator->second.GPS_Bit_Number = static_cast<double>(e->bit_num);
|
||||
if (gps_acq_iterator != gps_acq_map.end())
|
||||
{
|
||||
// fill the acquisition assistance structure
|
||||
gps_acq_iterator->second.PRN = e->prn;
|
||||
gps_acq_iterator->second.tow = static_cast<double>(assist.acq_time);
|
||||
gps_acq_iterator->second.Doppler0 = static_cast<double>(e->doppler0);
|
||||
gps_acq_iterator->second.Doppler1 = static_cast<double>(e->doppler1);
|
||||
gps_acq_iterator->second.dopplerUncertainty = static_cast<double>(e->d_win);
|
||||
gps_acq_iterator->second.Code_Phase = static_cast<double>(e->code_ph);
|
||||
gps_acq_iterator->second.Code_Phase_int = static_cast<double>(e->code_ph_int);
|
||||
gps_acq_iterator->second.Code_Phase_window = static_cast<double>(e->code_ph_win);
|
||||
gps_acq_iterator->second.Azimuth = static_cast<double>(e->az);
|
||||
gps_acq_iterator->second.Elevation = static_cast<double>(e->el);
|
||||
gps_acq_iterator->second.GPS_Bit_Number = static_cast<double>(e->bit_num);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user