Elaboradar 0.1
|
◆ read_profile_gap()
Read the gap between the time in $LAST_VPR and the current acquisition time. funzione che calcola il numero di quarti d'ora che intercorrono dall'ultimo profilo calcolato (combinato) memorizzato in 'LAST_VPR'
Definizione alla linea 231 del file assets.cpp. 232{
233 LOG_CATEGORY("radar.vpr");
234 File in(logging_category);
235 if (!in.open_from_env("LAST_VPR", "rb"))
236 return 100;
237
238 // FIXME: time_t può essere 64 bit, qui viene sempre troncato.
239 // FIXME: l'ideale sarebbe, in questo caso, usare fprintf/fscanf invece di
240 // FIXME: fread/fwrite
241 uint32_t last_time;
242 fread(&last_time, 4, 1, in);
243
244 long int gap1 = abs(conf_acq_time - last_time)/900;
245 LOG_INFO("old_data_header.norm.maq.acq_date last_time gap %ld %u %ld", conf_acq_time, last_time, gap1);
246
247 return gap1;
248}
Referenzia radarelab::File::open_from_env(). Referenziato da elaboradar::CalcoloVPR::classifica_rain(), e find_vpr0(). |