diff --git a/src/algorithms/libs/gnss_signal_processing.cc b/src/algorithms/libs/gnss_signal_processing.cc index 738bb3eda..8c566460f 100644 --- a/src/algorithms/libs/gnss_signal_processing.cc +++ b/src/algorithms/libs/gnss_signal_processing.cc @@ -35,19 +35,15 @@ -void complex_exp_gen(std::complex* _dest, double _f, double _fs, unsigned int _samps) { - - double phase, phase_step; - - phase_step = (GPS_TWO_PI*_f)/_fs; - - for(unsigned int i = 0; i < _samps; i++) { - +void complex_exp_gen(std::complex* _dest, double _f, double _fs, unsigned int _samps) +{ + double phase = 0; + double phase_step = (GPS_TWO_PI*_f)/_fs; + for(unsigned int i = 0; i < _samps; i++) + { _dest[i] = std::complex(cos(phase),sin(phase)); - phase += phase_step; } - }