GNU Radio's CCSDS Package
argmax.h
Go to the documentation of this file.
1 #ifndef ARGMAX_H
2 #define ARGMAX_H
3 #include <iostream>
4 #include <vector>
5 #include <valarray>
6 #include <algorithm>
7 #include <cassert>
8 #include <string>
9 
10 class argmax
11 {
12 public:
13  argmax(std::string syncword,int matchingFuntion, int ambiguity);
14  void setSyncWord(std::vector<float> sync);
15  void argMaxSync(float *in,
16  int frame_length, float &maxCorrelation, int &indexMaxCorrelation);
17 private:
18  float (argmax::*d_mtxFunction)(std::vector<float> in0,std::vector<float> in1);
19  std::vector<float> d_sync;
20  std::vector<float> extractSyncWord(float *in, int pos, int length);
21  void printVector(std::vector<float> in);
22  float hardCorr(std::vector<float> in0,std::vector<float> in1);
23  float softCorr(std::vector<float> in0,std::vector<float> in1);
24  float masseyCorr(std::vector<float> in0,std::vector<float> in1);
25  float binarySlice(float in);
26  std::string hex_str_to_bin_str(const std::string& hex);
27  const char* hex_char_to_bin(char c);
28 };
29 
30 #endif // ARGMAX_H
argmax(std::string syncword, int matchingFuntion, int ambiguity)
Definition: argmax.h:10
void setSyncWord(std::vector< float > sync)
void argMaxSync(float *in, int frame_length, float &maxCorrelation, int &indexMaxCorrelation)