mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-26 21:17:38 +00:00
Write public interface first, then private members in class definitions
This commit is contained in:
@@ -47,6 +47,15 @@
|
||||
*/
|
||||
class Tracking_2nd_DLL_filter
|
||||
{
|
||||
public:
|
||||
void set_DLL_BW(float dll_bw_hz); //!< Set DLL filter bandwidth [Hz]
|
||||
void set_pdi(float pdi_code); //!< Set Summation interval for code [s]
|
||||
void initialize(); //!< Start tracking with acquisition information
|
||||
float get_code_nco(float DLL_discriminator); //!< Numerically controlled oscillator
|
||||
Tracking_2nd_DLL_filter(float pdi_code);
|
||||
Tracking_2nd_DLL_filter();
|
||||
~Tracking_2nd_DLL_filter();
|
||||
|
||||
private:
|
||||
// PLL filter parameters
|
||||
float d_tau1_code = 0.0;
|
||||
@@ -57,15 +66,6 @@ private:
|
||||
float d_old_code_error = 0.0;
|
||||
float d_old_code_nco = 0.0;
|
||||
void calculate_lopp_coef(float* tau1, float* tau2, float lbw, float zeta, float k);
|
||||
|
||||
public:
|
||||
void set_DLL_BW(float dll_bw_hz); //! Set DLL filter bandwidth [Hz]
|
||||
void set_pdi(float pdi_code); //! Set Summation interval for code [s]
|
||||
void initialize(); //! Start tracking with acquisition information
|
||||
float get_code_nco(float DLL_discriminator); //! Numerically controlled oscillator
|
||||
Tracking_2nd_DLL_filter(float pdi_code);
|
||||
Tracking_2nd_DLL_filter();
|
||||
~Tracking_2nd_DLL_filter();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -46,28 +46,25 @@
|
||||
*/
|
||||
class Tracking_2nd_PLL_filter
|
||||
{
|
||||
private:
|
||||
// PLL filter parameters
|
||||
float d_tau1_carr = 0.0;
|
||||
float d_tau2_carr = 0.0;
|
||||
float d_pdi_carr = 0.0;
|
||||
|
||||
float d_pllnoisebandwidth = 0.0;
|
||||
float d_plldampingratio = 0.0;
|
||||
|
||||
float d_old_carr_error = 0.0;
|
||||
float d_old_carr_nco = 0.0;
|
||||
|
||||
void calculate_lopp_coef(float* tau1, float* tau2, float lbw, float zeta, float k);
|
||||
|
||||
public:
|
||||
void set_PLL_BW(float pll_bw_hz); //! Set PLL loop bandwidth [Hz]
|
||||
void set_pdi(float pdi_carr); //! Set Summation interval for code [s]
|
||||
void set_PLL_BW(float pll_bw_hz); //!< Set PLL loop bandwidth [Hz]
|
||||
void set_pdi(float pdi_carr); //!< Set Summation interval for code [s]
|
||||
void initialize();
|
||||
float get_carrier_nco(float PLL_discriminator);
|
||||
Tracking_2nd_PLL_filter(float pdi_carr);
|
||||
Tracking_2nd_PLL_filter();
|
||||
~Tracking_2nd_PLL_filter();
|
||||
|
||||
private:
|
||||
// PLL filter parameters
|
||||
float d_tau1_carr = 0.0;
|
||||
float d_tau2_carr = 0.0;
|
||||
float d_pdi_carr = 0.0;
|
||||
float d_pllnoisebandwidth = 0.0;
|
||||
float d_plldampingratio = 0.0;
|
||||
float d_old_carr_error = 0.0;
|
||||
float d_old_carr_nco = 0.0;
|
||||
void calculate_lopp_coef(float* tau1, float* tau2, float lbw, float zeta, float k);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,13 @@
|
||||
*/
|
||||
class Tracking_FLL_PLL_filter
|
||||
{
|
||||
public:
|
||||
void set_params(float fll_bw_hz, float pll_bw_hz, int order);
|
||||
void initialize(float d_acq_carrier_doppler_hz);
|
||||
float get_carrier_error(float FLL_discriminator, float PLL_discriminator, float correlation_time_s);
|
||||
Tracking_FLL_PLL_filter();
|
||||
~Tracking_FLL_PLL_filter();
|
||||
|
||||
private:
|
||||
// FLL + PLL filter parameters
|
||||
int d_order;
|
||||
@@ -49,13 +56,6 @@ private:
|
||||
float d_pll_w0p2;
|
||||
float d_pll_b3;
|
||||
float d_pll_w0p;
|
||||
|
||||
public:
|
||||
void set_params(float fll_bw_hz, float pll_bw_hz, int order);
|
||||
void initialize(float d_acq_carrier_doppler_hz);
|
||||
float get_carrier_error(float FLL_discriminator, float PLL_discriminator, float correlation_time_s);
|
||||
Tracking_FLL_PLL_filter();
|
||||
~Tracking_FLL_PLL_filter();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -43,6 +43,27 @@
|
||||
*/
|
||||
class Tracking_loop_filter
|
||||
{
|
||||
public:
|
||||
float get_noise_bandwidth(void) const;
|
||||
float get_update_interval(void) const;
|
||||
bool get_include_last_integrator(void) const;
|
||||
int get_order(void) const;
|
||||
|
||||
void set_noise_bandwidth(float noise_bandwidth);
|
||||
void set_update_interval(float update_interval);
|
||||
void set_include_last_integrator(bool include_last_integrator);
|
||||
void set_order(int loop_order);
|
||||
|
||||
void initialize(float initial_output = 0.0);
|
||||
float apply(float current_input);
|
||||
|
||||
Tracking_loop_filter(float update_interval, float noise_bandwidth,
|
||||
int loop_order = 2,
|
||||
bool include_last_integrator = false);
|
||||
|
||||
Tracking_loop_filter();
|
||||
~Tracking_loop_filter();
|
||||
|
||||
private:
|
||||
// Store the last inputs and outputs:
|
||||
std::vector<float> d_inputs;
|
||||
@@ -71,27 +92,6 @@ private:
|
||||
|
||||
// Compute the filter coefficients:
|
||||
void update_coefficients(void);
|
||||
|
||||
public:
|
||||
float get_noise_bandwidth(void) const;
|
||||
float get_update_interval(void) const;
|
||||
bool get_include_last_integrator(void) const;
|
||||
int get_order(void) const;
|
||||
|
||||
void set_noise_bandwidth(float noise_bandwidth);
|
||||
void set_update_interval(float update_interval);
|
||||
void set_include_last_integrator(bool include_last_integrator);
|
||||
void set_order(int loop_order);
|
||||
|
||||
void initialize(float initial_output = 0.0);
|
||||
float apply(float current_input);
|
||||
|
||||
Tracking_loop_filter(float update_interval, float noise_bandwidth,
|
||||
int loop_order = 2,
|
||||
bool include_last_integrator = false);
|
||||
|
||||
Tracking_loop_filter();
|
||||
~Tracking_loop_filter();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user