1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

Merge branch 'iono' into next

This commit is contained in:
Carles Fernandez 2019-07-10 18:46:34 +02:00
commit 9350a7a15b
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
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

View File

@ -1065,7 +1065,7 @@ bool GNSSFlowgraph::send_telemetry_msg(const pmt::pmt_t& msg)
* \param[in] what What is the action:
* --- actions from channels ---
* -> 0 acquisition failed
* -> 1 acquisition succesfull
* -> 1 acquisition successful
* -> 2 tracking lost
* --- actions from TC receiver control ---
* -> 10 TC request standby mode

View File

@ -73,7 +73,7 @@ const int BEIDOU_WORD_LENGTH = 4;
const int BEIDOU_SUBFRAME_LENGTH = 40; //**************!< BEIDOU_WORD_LENGTH x 10 = 40 bytes
const int BEIDOU_DNAV_SUBFRAME_DATA_BITS = 300; //!< Number of bits per subframe in the NAV message [bits]
const int BEIDOU_SUBFRAME_SECONDS = 6; //!< Subframe duration [seconds]
const int BEIDOU_SUBFRAME_MS = 6000; //!< Subframe duration [miliseconds]
const int BEIDOU_SUBFRAME_MS = 6000; //!< Subframe duration [milliseconds]
const int BEIDOU_WORD_BITS = 30; //!< Number of bits per word in the NAV message [bits]

View File

@ -59,7 +59,7 @@ const uint32_t GPS_L1_CA_BIT_PERIOD_MS = 20U; //!< GPS L1 C/A bit period [
const double GPS_L1_CA_CHIP_PERIOD = 9.7752e-07; //!< GPS L1 C/A chip period [seconds]
//optimum parameters
const uint32_t GPS_L1_CA_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequncy that maximizes the acquisition SNR while using a non-multiple of chip rate
const uint32_t GPS_L1_CA_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
/*!
* \brief Maximum Time-Of-Arrival (TOA) difference between satellites for a receiver operated on Earth surface is 20 ms

View File

@ -64,7 +64,7 @@ const double GPS_L2_L_PERIOD = 1.5; //!< GPS L2 L code period [s
const int32_t GPS_L2C_HISTORY_DEEP = 5;
//optimum parameters
const uint32_t GPS_L2C_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequncy that maximizes the acquisition SNR while using a non-multiple of chip rate
const uint32_t GPS_L2C_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
const int32_t GPS_L2C_M_INIT_REG[115] =

View File

@ -65,7 +65,7 @@ const double GPS_L5Q_PERIOD = 0.001; //!< GPS L5 code period [secon
const int32_t GPS_L5_HISTORY_DEEP = 5;
//optimum parameters
const uint32_t GPS_L5_OPT_ACQ_FS_HZ = 10000000; //!< Sampling frequncy that maximizes the acquisition SNR while using a non-multiple of chip rate
const uint32_t GPS_L5_OPT_ACQ_FS_HZ = 10000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
const int32_t GPS_L5I_INIT_REG[210] =
{266, 365, 804, 1138,

View File

@ -65,7 +65,7 @@ const int32_t GALILEO_E1_NUMBER_OF_CODES = 50;
//optimum parameters
const uint32_t GALILEO_E1_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequncy that maximizes the acquisition SNR while using a non-multiple of chip rate
const uint32_t GALILEO_E1_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
const double GALILEO_STARTOFFSET_MS = 68.802; //[ms] Initial sign. travel time (this cannot go here)

View File

@ -58,7 +58,7 @@ const int32_t GALILEO_E5A_HISTORY_DEEP = 20;
const int32_t GALILEO_E5A_CRC_ERROR_LIMIT = 6;
//optimum parameters
const uint32_t GALILEO_E5A_OPT_ACQ_FS_HZ = 10000000; //!< Sampling frequncy that maximizes the acquisition SNR while using a non-multiple of chip rate
const uint32_t GALILEO_E5A_OPT_ACQ_FS_HZ = 10000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
// F/NAV message structure

View File

@ -458,7 +458,7 @@ int32_t Beidou_Dnav_Navigation_Message::d1_subframe_decoder(std::string const& s
subframe_ID = static_cast<int>(read_navigation_unsigned(subframe_bits, D1_FRAID));
// Perform crc computtaion (tbd)
// Perform crc computation (tbd)
flag_crc_test = true;
// Decode all 5 sub-frames
@ -753,7 +753,7 @@ int32_t Beidou_Dnav_Navigation_Message::d2_subframe_decoder(std::string const& s
subframe_ID = static_cast<int>(read_navigation_unsigned(subframe_bits, D2_FRAID));
page_ID = static_cast<int>(read_navigation_unsigned(subframe_bits, D2_PNUM));
// Perform crc computtaion (tbd)
// Perform crc computation (tbd)
flag_crc_test = true;
// Decode all 5 sub-frames