blah2
A real-time passive radar
Detection.h
Go to the documentation of this file.
1 
6 #ifndef DETECTION_H
7 #define DETECTION_H
8 
9 #include <stdint.h>
10 #include <vector>
11 #include <complex>
12 
13 class Detection
14 {
15 private:
17  std::vector<double> delay;
18 
20  std::vector<double> doppler;
21 
23  std::vector<double> snr;
24 
25 public:
30  Detection(std::vector<double> delay, std::vector<double> doppler, std::vector<double> snr);
31 
36  Detection(double delay, double doppler, double snr);
37 
40  std::vector<double> get_delay();
41 
44  std::vector<double> get_doppler();
45 
48  std::vector<double> get_snr();
49 
52  size_t get_nDetections();
53 
57  std::string to_json(uint64_t timestamp);
58 
63  std::string delay_bin_to_km(std::string json, uint32_t fs);
64 
69  bool save(std::string json, std::string path);
70 };
71 
72 #endif
A class to store detection data.
Definition: Detection.h:14
std::vector< double > get_snr()
Detections in SNR.
Definition: Detection.cpp:36
std::string to_json(uint64_t timestamp)
Generate JSON of the detections and metadata.
Definition: Detection.cpp:46
size_t get_nDetections()
Get number of detections.
Definition: Detection.cpp:41
std::vector< double > get_delay()
Get detections in delay.
Definition: Detection.cpp:26
std::vector< double > get_doppler()
Get detections in Doppler.
Definition: Detection.cpp:31
Detection(std::vector< double > delay, std::vector< double > doppler, std::vector< double > snr)
Constructor.
Definition: Detection.cpp:12
std::string delay_bin_to_km(std::string json, uint32_t fs)
Update JSON to convert delay bins to km.
Definition: Detection.cpp:86
bool save(std::string json, std::string path)
Append the detections to a save file.
Definition: Detection.cpp:107
std::vector< double > delay
Detections in delay (bins).
Definition: Detection.h:17
std::vector< double > snr
Detections in SNR.
Definition: Detection.h:23
std::vector< double > doppler
Detections in Doppler (Hz).
Definition: Detection.h:20