satdump/src-core/modules/noaa/noaa_deframer.h
2021-04-05 14:23:59 +02:00

25 lines
No EOL
590 B
C++

#include <cstdint>
#include <vector>
namespace noaa
{
class NOAADeframer
{
private:
unsigned int d_state;
bool d_mid_bit;
unsigned char d_last_bit;
unsigned int d_bit_count;
unsigned int d_word_count;
unsigned long long d_shifter; // 60 bit sync word
unsigned short d_word; // 10 bit HRPT word
int d_thresold;
void enter_idle();
void enter_synced();
public:
NOAADeframer(int thresold);
std::vector<uint16_t> work(uint8_t *input, int length);
};
} // namespace noaa