mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
19 lines
No EOL
404 B
C++
19 lines
No EOL
404 B
C++
#include "delay_one_imag.h"
|
|
|
|
DelayOneImag::DelayOneImag()
|
|
{
|
|
lastSamp = 0;
|
|
}
|
|
|
|
void DelayOneImag::work(std::complex<float> *in, int length, std::complex<float> *out)
|
|
{
|
|
for (int i = 0; i < length; i++)
|
|
{
|
|
float imag = i == 0 ? lastSamp : in[i - 1].imag();
|
|
float real = in[i].real();
|
|
|
|
out[i] = std::complex<float>(real, imag);
|
|
}
|
|
|
|
lastSamp = in[length - 1].imag();
|
|
} |