Elaboradar  0.1

◆ BYTEtoZ()

double radarelab::algo::DBZ::BYTEtoZ ( unsigned char  byte)
static

funzione che converte byte in Z

Parametri
[in]bytevalore da convertire in z espresso tra 0 e 255
[in]gain- first conversion factor
[in]offset- second conversion factor
Restituisce
Z value (linear not dBZ)

Definizione alla linea 125 del file dbz.cpp.

126 {
127  const double gain = 80. / 255.;
128  const double offset = -20.;
129  static bool precomputed = false;
130  static double Z[256];
131 
132  if (!precomputed)
133  {
134  for (unsigned i=0; i < 256; ++i)
135  Z[i] = pow(10., (i * gain + offset) * 0.1);
136  precomputed = true;
137  }
138 
139  return Z[byte];
140 }