From 0f7c23bd7ece144da42e37294eed768bea77f44a Mon Sep 17 00:00:00 2001 From: andres Date: Fri, 17 Oct 2014 02:56:15 +0200 Subject: [PATCH] Commenting the code --- ...alileo_volk_e1_dll_pll_veml_tracking_cc.cc | 87 +++++++------------ 1 file changed, 33 insertions(+), 54 deletions(-) diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_volk_e1_dll_pll_veml_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_volk_e1_dll_pll_veml_tracking_cc.cc index 9f37dfdc2..258d5b023 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_volk_e1_dll_pll_veml_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_volk_e1_dll_pll_veml_tracking_cc.cc @@ -252,7 +252,6 @@ void galileo_volk_e1_dll_pll_veml_tracking_cc::update_local_code() { double tcode_half_chips; float rem_code_phase_half_chips; - int associated_chip_index; int code_length_half_chips = (int)(2*Galileo_E1_B_CODE_LENGTH_CHIPS); double code_phase_step_chips; double code_phase_step_half_chips; @@ -272,18 +271,11 @@ void galileo_volk_e1_dll_pll_veml_tracking_cc::update_local_code() epl_loop_length_samples = d_current_prn_length_samples + very_early_late_spc_samples*2; + //HERE YOU CAN CHOOSE THE DESIRED VOLK IMPLEMENTATION //volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_manual(d_very_early_code, (float) d_very_early_late_spc_chips, (float) code_length_half_chips, (float) code_phase_step_half_chips, (float) tcode_half_chips, d_ca_code, epl_loop_length_samples, "generic"); volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_manual(d_very_early_code, (float) d_very_early_late_spc_chips, (float) code_length_half_chips, (float) code_phase_step_half_chips, (float) tcode_half_chips, d_ca_code, epl_loop_length_samples, "u_sse4_1"); -// float d_very_early_late_spc_chips_multiplied_by_2 = 2*d_very_early_late_spc_chips; -// for (int i = 0; i < epl_loop_length_samples; i++) -// { -// associated_chip_index = 2 + round(fmod(tcode_half_chips - d_very_early_late_spc_chips_multiplied_by_2, code_length_half_chips)); -// d_very_early_code[i] = d_ca_code[associated_chip_index]; -// tcode_half_chips = tcode_half_chips + code_phase_step_half_chips; -// } - memcpy(d_early_code, &d_very_early_code[very_early_late_spc_samples - early_late_spc_samples], d_current_prn_length_samples* sizeof(gr_complex)); memcpy(d_prompt_code, &d_very_early_code[very_early_late_spc_samples], d_current_prn_length_samples* sizeof(gr_complex)); memcpy(d_late_code, &d_very_early_code[very_early_late_spc_samples + early_late_spc_samples], d_current_prn_length_samples* sizeof(gr_complex)); @@ -298,17 +290,12 @@ void galileo_volk_e1_dll_pll_veml_tracking_cc::update_local_carrier() // Initialize the carrier phase with the remanent carrier phase of the K-2 loop phase_rad = d_rem_carr_phase_rad; - volk_gnsssdr_s32f_x2_update_local_carrier_32fc_manual(d_carr_sign, phase_rad, phase_step_rad, d_current_prn_length_samples, "generic"); + //HERE YOU CAN CHOOSE THE DESIRED VOLK IMPLEMENTATION + //volk_gnsssdr_s32f_x2_update_local_carrier_32fc_manual(d_carr_sign, phase_rad, phase_step_rad, d_current_prn_length_samples, "generic"); - volk_gnsssdr_s32f_x2_update_local_carrier_32fc_manual(d_carr_sign, phase_rad, phase_step_rad, d_current_prn_length_samples, "u_sse2"); + //volk_gnsssdr_s32f_x2_update_local_carrier_32fc_manual(d_carr_sign, phase_rad, phase_step_rad, d_current_prn_length_samples, "u_sse2"); volk_gnsssdr_s32f_x2_update_local_carrier_32fc_manual(d_carr_sign, phase_rad, phase_step_rad, d_current_prn_length_samples, "u_avx"); - -// for(int i = 0; i < d_current_prn_length_samples; i++) -// { -// d_carr_sign[i] = gr_complex(cos(phase_rad), -sin(phase_rad)); -// phase_rad += phase_step_rad; -// } } galileo_volk_e1_dll_pll_veml_tracking_cc::~galileo_volk_e1_dll_pll_veml_tracking_cc() @@ -389,47 +376,39 @@ int galileo_volk_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr update_local_code(); update_local_carrier(); - //perform carrier wipe-off and compute Very Early, Early, Prompt, Late and Very Late correlation -// d_correlator.Carrier_wipeoff_and_VEPL_volk(d_current_prn_length_samples, -// in, -// d_carr_sign, -// d_very_early_code, -// d_early_code, -// d_prompt_code, -// d_late_code, -// d_very_late_code, -// d_Very_Early, -// d_Early, -// d_Prompt, -// d_Late, -// d_Very_Late, -// is_unaligned()); -// -// volk_gnsssdr_32fc_x7_cw_vepl_corr_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in, d_carr_sign, d_very_early_code, d_early_code, d_prompt_code, d_late_code, d_very_late_code, d_current_prn_length_samples); -// -// volk_gnsssdr_32fc_convert_16ic(d_very_early_code16, d_very_early_code, d_current_prn_length_samples); -// volk_gnsssdr_32fc_convert_16ic(d_early_code16, d_early_code, d_current_prn_length_samples); -// volk_gnsssdr_32fc_convert_16ic(d_prompt_code16, d_prompt_code, d_current_prn_length_samples); -// volk_gnsssdr_32fc_convert_16ic(d_late_code16, d_late_code, d_current_prn_length_samples); -// volk_gnsssdr_32fc_convert_16ic(d_very_late_code16, d_very_late_code, d_current_prn_length_samples); -// volk_gnsssdr_32fc_convert_16ic(in16, in, d_current_prn_length_samples); -// volk_gnsssdr_32fc_convert_16ic(d_carr_sign16, d_carr_sign, d_current_prn_length_samples); -// -// volk_gnsssdr_16ic_x7_cw_vepl_corr_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in16, d_carr_sign16, d_very_early_code16, d_early_code16, d_prompt_code16, d_late_code16, d_very_late_code16, d_current_prn_length_samples); + //HERE YOU CAN CHOOSE THE DESIRED VOLK IMPLEMENTATION - volk_gnsssdr_32fc_convert_8ic(d_very_early_code8, d_very_early_code, d_current_prn_length_samples); - volk_gnsssdr_32fc_convert_8ic(d_early_code8, d_early_code, d_current_prn_length_samples); - volk_gnsssdr_32fc_convert_8ic(d_prompt_code8, d_prompt_code, d_current_prn_length_samples); - volk_gnsssdr_32fc_convert_8ic(d_late_code8, d_late_code, d_current_prn_length_samples); - volk_gnsssdr_32fc_convert_8ic(d_very_late_code8, d_very_late_code, d_current_prn_length_samples); - volk_gnsssdr_32fc_convert_8ic(d_carr_sign8, d_carr_sign, d_current_prn_length_samples); - volk_gnsssdr_32fc_s32f_convert_8ic(in8, in, 4, d_current_prn_length_samples); + //Float implementation: + + //volk_gnsssdr_32fc_x7_cw_vepl_corr_32fc_x5_manual(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in, d_carr_sign, d_very_early_code, d_early_code, d_prompt_code, d_late_code, d_very_late_code, d_current_prn_length_samples, "generic"); + + //volk_gnsssdr_32fc_x7_cw_vepl_corr_32fc_x5_manual(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in, d_carr_sign, d_very_early_code, d_early_code, d_prompt_code, d_late_code, d_very_late_code, d_current_prn_length_samples, "u_avx"); + + //Integer 16 bits implementation + /*volk_gnsssdr_32fc_convert_16ic(d_very_early_code16, d_very_early_code, d_current_prn_length_samples); + volk_gnsssdr_32fc_convert_16ic(d_early_code16, d_early_code, d_current_prn_length_samples); + volk_gnsssdr_32fc_convert_16ic(d_prompt_code16, d_prompt_code, d_current_prn_length_samples); + volk_gnsssdr_32fc_convert_16ic(d_late_code16, d_late_code, d_current_prn_length_samples); + volk_gnsssdr_32fc_convert_16ic(d_very_late_code16, d_very_late_code, d_current_prn_length_samples); + volk_gnsssdr_32fc_convert_16ic(in16, in, d_current_prn_length_samples); + volk_gnsssdr_32fc_convert_16ic(d_carr_sign16, d_carr_sign, d_current_prn_length_samples); + + volk_gnsssdr_16ic_x7_cw_vepl_corr_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in16, d_carr_sign16, d_very_early_code16, d_early_code16, d_prompt_code16, d_late_code16, d_very_late_code16, d_current_prn_length_samples);*/ + + //Integer 8 bits implementation + volk_gnsssdr_32fc_convert_8ic_manual(d_very_early_code8, d_very_early_code, d_current_prn_length_samples,"u_sse2"); + volk_gnsssdr_32fc_convert_8ic_manual(d_early_code8, d_early_code, d_current_prn_length_samples,"u_sse2"); + volk_gnsssdr_32fc_convert_8ic_manual(d_prompt_code8, d_prompt_code, d_current_prn_length_samples,"u_sse2"); + volk_gnsssdr_32fc_convert_8ic_manual(d_late_code8, d_late_code, d_current_prn_length_samples,"u_sse2"); + volk_gnsssdr_32fc_convert_8ic_manual(d_very_late_code8, d_very_late_code, d_current_prn_length_samples,"u_sse2"); + volk_gnsssdr_32fc_convert_8ic_manual(d_carr_sign8, d_carr_sign, d_current_prn_length_samples,"u_sse2"); + volk_gnsssdr_32fc_s32f_convert_8ic_manual(in8, in, 4, d_current_prn_length_samples,"u_sse2"); + + volk_gnsssdr_8ic_x7_cw_vepl_corr_safe_32fc_x5_manual(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in8, d_carr_sign8, d_very_early_code8, d_early_code8, d_prompt_code8, d_late_code8, d_very_late_code8, d_current_prn_length_samples, "u_sse4_1"); //volk_gnsssdr_8ic_x7_cw_vepl_corr_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in8, d_carr_sign8, d_very_early_code8, d_early_code8, d_prompt_code8, d_late_code8, d_very_late_code8, d_current_prn_length_samples); - + //volk_gnsssdr_8ic_x7_cw_vepl_corr_unsafe_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in8, d_carr_sign8, d_very_early_code8, d_early_code8, d_prompt_code8, d_late_code8, d_very_late_code8, d_current_prn_length_samples); - - volk_gnsssdr_8ic_x7_cw_vepl_corr_safe_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in8, d_carr_sign8, d_very_early_code8, d_early_code8, d_prompt_code8, d_late_code8, d_very_late_code8, d_current_prn_length_samples); // ################## PLL ##########################################################