mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-25 06:32:51 +00:00
added phase initialization that removes warning when compiling
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@226 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
parent
706e0372b9
commit
db5d130bff
@ -35,19 +35,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void complex_exp_gen(std::complex<float>* _dest, double _f, double _fs, unsigned int _samps) {
|
void complex_exp_gen(std::complex<float>* _dest, double _f, double _fs, unsigned int _samps)
|
||||||
|
{
|
||||||
double phase, phase_step;
|
double phase = 0;
|
||||||
|
double phase_step = (GPS_TWO_PI*_f)/_fs;
|
||||||
phase_step = (GPS_TWO_PI*_f)/_fs;
|
for(unsigned int i = 0; i < _samps; i++)
|
||||||
|
{
|
||||||
for(unsigned int i = 0; i < _samps; i++) {
|
|
||||||
|
|
||||||
_dest[i] = std::complex<float>(cos(phase),sin(phase));
|
_dest[i] = std::complex<float>(cos(phase),sin(phase));
|
||||||
|
|
||||||
phase += phase_step;
|
phase += phase_step;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user