mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-22 02:57:41 +00:00
bds_b3i: fixing bugs in pvt computation
This commit is contained in:

committed by
Carles Fernandez

parent
41036c1538
commit
1a2d90a8f1
@@ -66,6 +66,7 @@
|
||||
#include <utility>
|
||||
|
||||
|
||||
|
||||
Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t &rtk)
|
||||
{
|
||||
// init empty ephemeris for all the available GNSS channels
|
||||
@@ -892,6 +893,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
if ((valid_obs + glo_valid_obs) > 3)
|
||||
{
|
||||
int result = 0;
|
||||
int sat = 0;
|
||||
nav_t nav_data;
|
||||
nav_data.eph = eph_data;
|
||||
nav_data.geph = geph_data;
|
||||
@@ -903,6 +905,14 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
i[0] = SPEED_OF_LIGHT / FREQ1; // L1/E1
|
||||
i[1] = SPEED_OF_LIGHT / FREQ2; // L2
|
||||
i[2] = SPEED_OF_LIGHT / FREQ5; // L5/E5
|
||||
|
||||
// Keep update on sat number
|
||||
sat++;
|
||||
if(sat > NSYSGPS + NSYSGLO + NSYSGAL + NSYSQZS and sat < NSYSGPS + NSYSGLO + NSYSGAL + NSYSQZS + NSYSBDS) {
|
||||
i[0] = SPEED_OF_LIGHT / FREQ1_BDS; // B1I
|
||||
i[1] = SPEED_OF_LIGHT / FREQ3_BDS; // B3I
|
||||
i[2] = SPEED_OF_LIGHT / FREQ5; // L5/E5
|
||||
}
|
||||
}
|
||||
|
||||
result = rtkpos(&rtk_, obs_data, valid_obs + glo_valid_obs, &nav_data);
|
||||
|
@@ -43,12 +43,17 @@
|
||||
#include "rtklib_rtkcmn.h"
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band)
|
||||
{
|
||||
// Get signal type info to adjust code type based on constellation
|
||||
std::string sig_= gnss_synchro.Signal;
|
||||
|
||||
rtklib_obs.D[band] = gnss_synchro.Carrier_Doppler_hz;
|
||||
rtklib_obs.P[band] = gnss_synchro.Pseudorange_m;
|
||||
rtklib_obs.L[band] = gnss_synchro.Carrier_phase_rads / PI_2;
|
||||
|
||||
switch (band)
|
||||
{
|
||||
case 0:
|
||||
@@ -86,6 +91,14 @@ obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro
|
||||
break;
|
||||
case 'C':
|
||||
rtklib_obs.sat = gnss_synchro.PRN + NSATGPS + NSATGLO + NSATGAL + NSATQZS;
|
||||
// Update signal code
|
||||
if (sig_ == "B1"){
|
||||
rtklib_obs.code[band] = static_cast<unsigned char>(CODE_L2I);
|
||||
}
|
||||
else if (sig_ == "B3"){
|
||||
rtklib_obs.code[band] = static_cast<unsigned char>(CODE_L6I);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@@ -210,7 +210,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
|
||||
}
|
||||
}
|
||||
/* fL1^2 / fL2(orL5)^2 . See IS-GPS-200, p. 103 and Galileo ICD p. 48 */
|
||||
if (sys == SYS_GPS or sys == SYS_GAL or sys == SYS_GLO)
|
||||
if (sys == SYS_GPS or sys == SYS_GAL or sys == SYS_GLO or sys == SYS_BDS)
|
||||
{
|
||||
gamma_ = std::pow(lam[j], 2.0) / std::pow(lam[i], 2.0);
|
||||
}
|
||||
@@ -282,7 +282,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
|
||||
PC = P2 + P1_P2 - ISCl5i;
|
||||
}
|
||||
}
|
||||
else if (sys == SYS_GAL or sys == SYS_GLO) // Gal. E5a single freq.
|
||||
else if (sys == SYS_GAL or sys == SYS_GLO or sys == SYS_BDS) // Gal. E5a single freq.
|
||||
{
|
||||
P2 += P2_C2; /* C2->P2 */
|
||||
PC = P2 - gamma_ * P1_P2 / (1.0 - gamma_);
|
||||
@@ -306,7 +306,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
|
||||
PC = P1 + P1_P2;
|
||||
}
|
||||
}
|
||||
else if (sys == SYS_GAL or sys == SYS_GLO) /* E1 + E5a */
|
||||
else if (sys == SYS_GAL or sys == SYS_GLO or sys == SYS_BDS) /* E1 + E5a */
|
||||
{
|
||||
P1 += P1_C1;
|
||||
P2 += P2_C2;
|
||||
|
Reference in New Issue
Block a user