mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-12 19:20:32 +00:00
bds_b3i: fixing bugs in pvt computation
This commit is contained in:
parent
41036c1538
commit
1a2d90a8f1
@ -23,6 +23,7 @@ SignalSource.samples=0
|
|||||||
SignalSource.repeat=false
|
SignalSource.repeat=false
|
||||||
SignalSource.dump=false
|
SignalSource.dump=false
|
||||||
SignalSource.enable_throttle_control=false
|
SignalSource.enable_throttle_control=false
|
||||||
|
;SignalSource.samples=200000
|
||||||
|
|
||||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||||
SignalConditioner.implementation=Signal_Conditioner
|
SignalConditioner.implementation=Signal_Conditioner
|
||||||
@ -47,6 +48,8 @@ InputFilter.filter_type=bandpass
|
|||||||
InputFilter.grid_density=16
|
InputFilter.grid_density=16
|
||||||
InputFilter.sampling_frequency=50000000
|
InputFilter.sampling_frequency=50000000
|
||||||
InputFilter.IF=12500000
|
InputFilter.IF=12500000
|
||||||
|
InputFilter.dump = false
|
||||||
|
InputFilter.dump_filename=/home/dmiralles/Documents/gnss-sdr/src/tests/signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat
|
||||||
Resampler.implementation=Pass_Through
|
Resampler.implementation=Pass_Through
|
||||||
Resampler.sample_freq_in=50000000
|
Resampler.sample_freq_in=50000000
|
||||||
Resampler.sample_freq_out=50000000
|
Resampler.sample_freq_out=50000000
|
||||||
@ -55,7 +58,7 @@ Resampler.item_type=gr_complex
|
|||||||
|
|
||||||
;######### CHANNELS GLOBAL CONFIG ############
|
;######### CHANNELS GLOBAL CONFIG ############
|
||||||
Channels_B3.count=10
|
Channels_B3.count=10
|
||||||
Channels.in_acquisition=10
|
Channels.in_acquisition=1
|
||||||
Channel.signal=B3
|
Channel.signal=B3
|
||||||
|
|
||||||
Channel0.satellite = 6;
|
Channel0.satellite = 6;
|
||||||
@ -74,7 +77,7 @@ Acquisition_B3.implementation=BEIDOU_B3I_PCPS_Acquisition
|
|||||||
Acquisition_B3.item_type=gr_complex
|
Acquisition_B3.item_type=gr_complex
|
||||||
Acquisition_B3.coherent_integration_time_ms=3
|
Acquisition_B3.coherent_integration_time_ms=3
|
||||||
Acquisition_B3.max_dwells = 2
|
Acquisition_B3.max_dwells = 2
|
||||||
Acquisition_B3.threshold=0.0004
|
Acquisition_B3.threshold=0.0005
|
||||||
Acquisition_B3.doppler_max=10000
|
Acquisition_B3.doppler_max=10000
|
||||||
Acquisition_B3.doppler_step=100
|
Acquisition_B3.doppler_step=100
|
||||||
Acquisition_B3.dump=false
|
Acquisition_B3.dump=false
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
#include <utility>
|
#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)
|
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
|
// 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)
|
if ((valid_obs + glo_valid_obs) > 3)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
int sat = 0;
|
||||||
nav_t nav_data;
|
nav_t nav_data;
|
||||||
nav_data.eph = eph_data;
|
nav_data.eph = eph_data;
|
||||||
nav_data.geph = geph_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[0] = SPEED_OF_LIGHT / FREQ1; // L1/E1
|
||||||
i[1] = SPEED_OF_LIGHT / FREQ2; // L2
|
i[1] = SPEED_OF_LIGHT / FREQ2; // L2
|
||||||
i[2] = SPEED_OF_LIGHT / FREQ5; // L5/E5
|
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);
|
result = rtkpos(&rtk_, obs_data, valid_obs + glo_valid_obs, &nav_data);
|
||||||
|
@ -43,12 +43,17 @@
|
|||||||
#include "rtklib_rtkcmn.h"
|
#include "rtklib_rtkcmn.h"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band)
|
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.D[band] = gnss_synchro.Carrier_Doppler_hz;
|
||||||
rtklib_obs.P[band] = gnss_synchro.Pseudorange_m;
|
rtklib_obs.P[band] = gnss_synchro.Pseudorange_m;
|
||||||
rtklib_obs.L[band] = gnss_synchro.Carrier_phase_rads / PI_2;
|
rtklib_obs.L[band] = gnss_synchro.Carrier_phase_rads / PI_2;
|
||||||
|
|
||||||
switch (band)
|
switch (band)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -86,6 +91,14 @@ obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro
|
|||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
rtklib_obs.sat = gnss_synchro.PRN + NSATGPS + NSATGLO + NSATGAL + NSATQZS;
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
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 */
|
/* 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);
|
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;
|
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 */
|
P2 += P2_C2; /* C2->P2 */
|
||||||
PC = P2 - gamma_ * P1_P2 / (1.0 - gamma_);
|
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;
|
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;
|
P1 += P1_C1;
|
||||||
P2 += P2_C2;
|
P2 += P2_C2;
|
||||||
|
@ -80,6 +80,8 @@ DECLARE_string(log_dir);
|
|||||||
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc"
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc"
|
||||||
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc"
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc"
|
||||||
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc"
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc"
|
||||||
|
//#include "unit-tests/signal-processing-blocks/acquisition/beidou_b1i_pcps_acquisition_test.cc"
|
||||||
|
//#include "unit-tests/signal-processing-blocks/acquisition/beidou_b3i_pcps_acquisition_test.cc"
|
||||||
#include "unit-tests/signal-processing-blocks/adapter/adapter_test.cc"
|
#include "unit-tests/signal-processing-blocks/adapter/adapter_test.cc"
|
||||||
#include "unit-tests/signal-processing-blocks/adapter/pass_through_test.cc"
|
#include "unit-tests/signal-processing-blocks/adapter/pass_through_test.cc"
|
||||||
#include "unit-tests/signal-processing-blocks/filter/fir_filter_test.cc"
|
#include "unit-tests/signal-processing-blocks/filter/fir_filter_test.cc"
|
||||||
|
Loading…
Reference in New Issue
Block a user