Elaboradar  0.1
 Tutto Classi Namespace File Funzioni Variabili Tipi enumerati (enum) Gruppi
void elaboradar::Assets::write_dbz_coefficients ( const radarelab::algo::DBZ dbz)

Write in $OUTPUT_Z_LOWRIS_DIR/MP_coeff the MP coefficients.

Parametri
[in]dbz- DBZ object with MP coefficients

Definizione alla linea 450 del file assets.cpp.

Referenzia radarelab::File::open().

451 {
452  const char* dirname = getenv("OUTPUT_Z_LOWRIS_DIR");
453  if (!dirname) throw runtime_error("OUTPUT_Z_LOWRIS_DIR is not set");
454  string fname(dirname);
455  fname += "/MP_coeff";
456  File out(logging_category);
457  out.open(fname, "wb", "MP coefficients");
458 
459  unsigned char MP_coeff[2]; /* a/10 e b*10 per scrivere come 2 byte */
460  MP_coeff[0]=(unsigned char)(dbz.aMP/10);
461  MP_coeff[1]=(unsigned char)(dbz.bMP*10);
462 
463  fwrite(MP_coeff, sizeof(MP_coeff), 1, out);
464 }
Open a file taking its name from a given env variable.
Definition: utils.h:21