mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
25 lines
No EOL
590 B
C++
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
|