1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-31 07:13:03 +00:00

Merge branch 'iono' into next

This commit is contained in:
Carles Fernandez
2019-07-10 18:46:34 +02:00
21 changed files with 111 additions and 32 deletions

View File

@@ -798,25 +798,104 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
{
int result = 0;
int sat = 0;
nav_t nav_data;
nav_t nav_data{};
nav_data.eph = eph_data.data();
nav_data.geph = geph_data.data();
nav_data.n = valid_obs;
nav_data.ng = glo_valid_obs;
for (auto &i : nav_data.lam)
if (gps_iono.valid)
{
i[0] = SPEED_OF_LIGHT / FREQ1; // L1/E1
i[1] = SPEED_OF_LIGHT / FREQ2; // L2
i[2] = SPEED_OF_LIGHT / FREQ5; // L5/E5
nav_data.ion_gps[0] = gps_iono.d_alpha0;
nav_data.ion_gps[1] = gps_iono.d_alpha1;
nav_data.ion_gps[2] = gps_iono.d_alpha2;
nav_data.ion_gps[3] = gps_iono.d_alpha3;
nav_data.ion_gps[4] = gps_iono.d_beta0;
nav_data.ion_gps[5] = gps_iono.d_beta1;
nav_data.ion_gps[6] = gps_iono.d_beta2;
nav_data.ion_gps[7] = gps_iono.d_beta3;
}
if (!(gps_iono.valid) and gps_cnav_iono.valid)
{
nav_data.ion_gps[0] = gps_cnav_iono.d_alpha0;
nav_data.ion_gps[1] = gps_cnav_iono.d_alpha1;
nav_data.ion_gps[2] = gps_cnav_iono.d_alpha2;
nav_data.ion_gps[3] = gps_cnav_iono.d_alpha3;
nav_data.ion_gps[4] = gps_cnav_iono.d_beta0;
nav_data.ion_gps[5] = gps_cnav_iono.d_beta1;
nav_data.ion_gps[6] = gps_cnav_iono.d_beta2;
nav_data.ion_gps[7] = gps_cnav_iono.d_beta3;
}
if (galileo_iono.ai0_5 != 0.0)
{
nav_data.ion_gal[0] = galileo_iono.ai0_5;
nav_data.ion_gal[1] = galileo_iono.ai1_5;
nav_data.ion_gal[2] = galileo_iono.ai2_5;
nav_data.ion_gal[3] = 0.0;
}
if (beidou_dnav_iono.valid)
{
nav_data.ion_cmp[0] = beidou_dnav_iono.d_alpha0;
nav_data.ion_cmp[1] = beidou_dnav_iono.d_alpha1;
nav_data.ion_cmp[2] = beidou_dnav_iono.d_alpha2;
nav_data.ion_cmp[3] = beidou_dnav_iono.d_alpha3;
nav_data.ion_cmp[4] = beidou_dnav_iono.d_beta0;
nav_data.ion_cmp[5] = beidou_dnav_iono.d_beta0;
nav_data.ion_cmp[6] = beidou_dnav_iono.d_beta0;
nav_data.ion_cmp[7] = beidou_dnav_iono.d_beta3;
}
if (gps_utc_model.valid)
{
nav_data.utc_gps[0] = gps_utc_model.d_A0;
nav_data.utc_gps[1] = gps_utc_model.d_A1;
nav_data.utc_gps[2] = gps_utc_model.d_t_OT;
nav_data.utc_gps[3] = gps_utc_model.i_WN_T;
nav_data.leaps = gps_utc_model.d_DeltaT_LS;
}
if (!(gps_utc_model.valid) and gps_cnav_utc_model.valid)
{
nav_data.utc_gps[0] = gps_cnav_utc_model.d_A0;
nav_data.utc_gps[1] = gps_cnav_utc_model.d_A1;
nav_data.utc_gps[2] = gps_cnav_utc_model.d_t_OT;
nav_data.utc_gps[3] = gps_cnav_utc_model.i_WN_T;
nav_data.leaps = gps_cnav_utc_model.d_DeltaT_LS;
}
if (glonass_gnav_utc_model.valid)
{
nav_data.utc_glo[0] = glonass_gnav_utc_model.d_tau_c; // ??
nav_data.utc_glo[1] = 0.0; // ??
nav_data.utc_glo[2] = 0.0; // ??
nav_data.utc_glo[3] = 0.0; // ??
}
if (galileo_utc_model.A0_6 != 0.0)
{
nav_data.utc_gal[0] = galileo_utc_model.A0_6;
nav_data.utc_gal[1] = galileo_utc_model.A1_6;
nav_data.utc_gal[2] = galileo_utc_model.t0t_6;
nav_data.utc_gal[3] = galileo_utc_model.WNot_6;
nav_data.leaps = galileo_utc_model.Delta_tLS_6;
}
if (beidou_dnav_utc_model.valid)
{
nav_data.utc_cmp[0] = beidou_dnav_utc_model.d_A0_UTC;
nav_data.utc_cmp[1] = beidou_dnav_utc_model.d_A1_UTC;
nav_data.utc_cmp[2] = 0.0; // ??
nav_data.utc_cmp[3] = 0.0; // ??
nav_data.leaps = beidou_dnav_utc_model.d_DeltaT_LS;
}
for (auto &lambda_ : nav_data.lam)
{
lambda_[0] = SPEED_OF_LIGHT / FREQ1; // L1/E1
lambda_[1] = SPEED_OF_LIGHT / FREQ2; // L2
lambda_[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
lambda_[0] = SPEED_OF_LIGHT / FREQ1_BDS; // B1I
lambda_[1] = SPEED_OF_LIGHT / FREQ3_BDS; // B3I
lambda_[2] = SPEED_OF_LIGHT / FREQ5; // L5/E5
}
}

View File

@@ -76,7 +76,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
This may be a bug, but acquisition also work by variying the folding factor at va-
lues different that the expressed in the paper. In adition, it is important to point
out that by making the folding factor smaller we were able to get QuickSync work with
Galileo. Future work should be directed to test this asumption statistically.*/
Galileo. Future work should be directed to test this assumption statistically.*/
//folding_factor_ = static_cast<unsigned int>(ceil(sqrt(log2(code_length_))));
folding_factor_ = configuration_->property(role + ".folding_factor", 2);

View File

@@ -512,7 +512,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
{
/*!
* TODO: High sensitivity acquisition algorithm:
* State Mechine:
* State Machine:
* S0. StandBy. If d_active==1 -> S1
* S1. ComputeGrid. Perform the FFT acqusition doppler and delay grid.
* Accumulate the search grid matrix (#doppler_bins x #fft_size)

View File

@@ -182,7 +182,7 @@ public:
}
/*!
* \brief This funciton triggers a HW reset of the FPGA PL.
* \brief This function triggers a HW reset of the FPGA PL.
*/
void reset_acquisition(void);

View File

@@ -353,7 +353,7 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items,
{
/*!
* TODO: High sensitivity acquisition algorithm:
* State Mechine:
* State Machine:
* S0. StandBy. If d_active==1 -> S1
* S1. GetAssist. Define search grid with assistance information. Reset grid matrix -> S2
* S2. ComputeGrid. Perform the FFT acqusition doppler and delay grid.

View File

@@ -463,7 +463,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
complex_acumulator[i] += (corr_output[j]);
}
}
/*Obtain maximun value of correlation given the possible delay selected */
/*Obtain maximum value of correlation given the possible delay selected */
volk_32fc_magnitude_squared_32f(d_corr_output_f, complex_acumulator, d_folding_factor);
volk_gnsssdr_32f_index_max_32u(&indext, d_corr_output_f, d_folding_factor);

View File

@@ -1,7 +1,7 @@
/*!
* \file acq_conf.cc
* \brief Class that contains all the configuration parameters for generic
* acquisition block based on the PCPS algoritm.
* acquisition block based on the PCPS algorithm.
* \author Carles Fernandez, 2018. cfernandez(at)cttc.es
*
* -------------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
/*!
* \file acq_conf.h
* \brief Class that contains all the configuration parameters for generic
* acquisition block based on the PCPS algoritm.
* acquisition block based on the PCPS algorithm.
* \author Carles Fernandez, 2018. cfernandez(at)cttc.es
*
* -------------------------------------------------------------------------

View File

@@ -121,7 +121,7 @@ private:
int32_t d_fd; // driver descriptor
volatile uint32_t *d_map_base; // driver memory map
uint32_t *d_all_fft_codes; // memory that contains all the code ffts
uint32_t d_vector_length; // number of samples incluing padding and number of ms
uint32_t d_vector_length; // number of samples including padding and number of ms
uint32_t d_excludelimit;
uint32_t d_nsamples_total; // number of samples including padding
uint32_t d_nsamples; // number of samples not including padding

View File

@@ -50,7 +50,7 @@ list(APPEND AVAIL_BUILDTYPES
# known build types in AVAIL_BUILDTYPES. If the build type is found,
# the function exits immediately. If nothing is found by the end of
# checking all available build types, we exit with an error and list
# the avialable build types.
# the available build types.
########################################################################
function(VOLK_CHECK_BUILD_TYPE settype)
string(TOUPPER ${settype} _settype)

View File

@@ -183,7 +183,7 @@ if(CPU_IS_x86)
# eliminate AVX if cvtpi32_ps intrinsic fails like some versions of clang
#########################################################################
# check to see if the compiler/linker works with cvtpi32_ps instrinsic when using AVX
# check to see if the compiler/linker works with cvtpi32_ps intrinsic when using AVX
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c "#include <immintrin.h>\nint main (void) {__m128 __a; __m64 __b; __m128 foo = _mm_cvtpi32_ps(__a, __b); return (0); }")
execute_process(COMMAND ${CMAKE_C_COMPILER} -mavx -o
@@ -192,7 +192,7 @@ if(CPU_IS_x86)
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE avx_compile_result)
if(NOT ${avx_compile_result} EQUAL 0)
overrule_arch(avx "Compiler missing cvtpi32_ps instrinsic")
overrule_arch(avx "Compiler missing cvtpi32_ps intrinsic")
elseif(NOT CROSSCOMPILE_MULTILIB)
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
OUTPUT_QUIET ERROR_QUIET
@@ -216,7 +216,7 @@ if(CPU_IS_x86)
if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
# Figure out the version of Clang
if(CMAKE_VERSION VERSION_LESS "2.8.10")
# Exctract the Clang version from the --version string.
# Extract the Clang version from the --version string.
# In cmake 2.8.10, we can just use CMAKE_C_COMPILER_VERSION
# without having to go through these string manipulations
execute_process(COMMAND ${CMAKE_C_COMPILER} --version

View File

@@ -102,7 +102,7 @@ private:
static void static_pcap_callback(u_char *args, const struct pcap_pkthdr *pkthdr, const u_char *packet);
/*
* Opens the ethernet device using libpcap raw capture mode
* If any of these fail, the fuction retuns the error and exits.
* If any of these fail, the function returns the error and exits.
*/
bool open();
};

View File

@@ -1655,7 +1655,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
d_P_accu = *d_Prompt;
d_L_accu = *d_Late;
//fail-safe: check if the secondary code or bit synchronization has not succedded in a limited time period
//fail-safe: check if the secondary code or bit synchronization has not succeeded in a limited time period
if (trk_parameters.bit_synchronization_time_limit_s < (d_sample_counter - d_acq_sample_stamp) / static_cast<int>(trk_parameters.fs_in))
{
d_carrier_lock_fail_counter = 300000; //force loss-of-lock condition