Elaboradar 0.1
Caricamento in corso...
Ricerca in corso...
Nessun risultato
anaprop.h
Vai alla documentazione di questo file.
1
5#ifndef RADARELAB_ALGO_ANAPROP_H
6#define RADARELAB_ALGO_ANAPROP_H
7
8#include <radarelab/volume.h>
10
11namespace radarelab {
12namespace algo {
13
14namespace anaprop {
15// Matrici per statistiche
16struct GridStats
17{
18 // dim azim griglia per stat anap
19 const unsigned step_stat_az = 25;
20 // dim range griglia per stat anap
21 const unsigned step_stat_range = 40;
22
23 // Number of cells in the azimut direction
24 unsigned size_az = 0;
25 // Number of cells in the beam direction
26 unsigned size_beam = 0;
27
28 // statistica anaprop
29 unsigned* stat_anap = 0;
30 // contatore punti dentro ogni box per statistica
31 unsigned* stat_tot = 0;
32 // statistica beam blocking
33 unsigned* stat_bloc = 0;
34 // statistica cambio elevazione rispetto mappa statica
35 unsigned* stat_elev = 0;
36
37 GridStats();
38 ~GridStats();
39
40 void init(const Volume<double>& volume);
41
42 inline unsigned idx(unsigned az, unsigned beam) const
43 {
44 return az / step_stat_az * size_beam + beam / step_stat_range;
45 }
46
47 void incr_anap(unsigned az, unsigned beam) { stat_anap[idx(az, beam)]++; }
48 void incr_tot(unsigned az, unsigned beam) { stat_tot[idx(az, beam)]++; }
49 void incr_elev(unsigned az, unsigned beam) { stat_elev[idx(az, beam)]++; }
50 void incr_bloc(unsigned az, unsigned beam, unsigned amount) { stat_bloc[idx(az, beam)]++; }
51
52 unsigned count(unsigned az, unsigned beam) const
53 {
54 return stat_tot[idx(az, beam)];
55 }
56
57 unsigned char perc_anap(unsigned az, unsigned beam) const
58 {
59 return stat_anap[idx(az, beam)] * 100 / stat_tot[idx(az, beam)];
60 }
61
62 unsigned char perc_elev(unsigned az, unsigned beam) const
63 {
64 return stat_elev[idx(az, beam)] * 100 / stat_tot[idx(az, beam)];
65 }
66
67 unsigned char perc_bloc(unsigned az, unsigned beam) const
68 {
69 return stat_bloc[idx(az, beam)] * 100 / stat_tot[idx(az, beam)];
70 }
71};
72}
73
74static const int ANAP_OK = 0;
75static const int ANAP_YES = 1;
76static const int ANAP_NODAT = 2;
77static const int ANAP_NOCONTROL = 3;
78
79template<class T>
80class Anaprop
81{
82public:
83 log4c_category_t* logging_category;
84
85 // Anaprop configuration
86
91 double conf_texture_threshold = 3;
92 bool do_quality = false;
93 bool do_beamblocking = false;
94 bool do_bloccorr = false;
95
96
97 // Output data from the anaprop algorithm
98
99 anaprop::GridStats grid_stats;
100 volume::ElevFin<T> elev_fin;
101 PolarScan<unsigned char> dato_corrotto; // uscita controllo anaprop in coordinate azimut range
102 PolarScan<unsigned short> quota; /*quota fascio in prop standard e elev reali in coordinate azimut range*/
103
104 Anaprop(const Volume<T>& volume);
105
106 // Initialise basic structures and copy first_level_static to elev_fin
107 void init_elev_fin_static(const Volume<T>& volume, const PolarScan<unsigned char>& first_level_static);
108
109 // Initialise basic structures and performe anomalous propagation using sd and testing vertical gradient
110 void remove(
111 Volume<T>& volume,
112 PolarScan<unsigned char>& beam_blocking,
113 const PolarScan<unsigned char>& first_level,
114 const PolarScan<unsigned char>& first_level_static,
115 const Volume<double>& sd);
116
117 // Initialise basic structures and performe anomalous propagation testing vertical gradient
118 void remove_without_SD(
119 Volume<T>& volume,
120 PolarScan<unsigned char>& beam_blocking,
121 const PolarScan<unsigned char>& first_level,
122 const PolarScan<unsigned char>& first_level_static,
123 const Volume<double>& sd);
124};
125
126}
127}
128
129#endif
130
String functions.
Definition: cart.cpp:4
Definisce le principali strutture che contengono i dati.