12 #define SPC_LAT 44.6547
13 #define SPC_LON 11.6236
15 #define GAT_LAT 44.7914
16 #define GAT_LON 10.4992
28 vector<double> make_elev_array(
const int* data,
unsigned count)
32 for (
unsigned i = 0; i < count; ++i)
33 res.push_back(data[i] * 360. / 4096.);
51 radarSite.lat_r=GAT_LAT;
52 radarSite.lon_r=GAT_LON;
53 radarSite.height_r = 35.;
54 radarSite.antennaTowerHeight=25.;
55 radarSite.source=
"RAD:IYai,PLC:itgat,NOD:itgat ";
57 vpr_iaz_min=IAZ_MIN_GAT;
58 vpr_iaz_max=IAZ_MAX_GAT;
63 return getenv_default(
"FILE_DEM_GAT",
"../../PP+BLOC/dati/dem_Gatta.txt");
68 if (1 <= month && month <= 3)
69 return (datipath+
"/FIRST_LEVEL_GAT_2006_INV").c_str();
70 else if (4 <= month && month <= 9)
72 return (datipath+
"FIRST_LEVEL_GAT_2006_PRI-EST").c_str();
75 return (datipath+
"FIRST_LEVEL_GAT_2006_AUT").c_str();
82 static const int elev_data[]={6,16,26,37,47,57,80,109,148,205,284, 300, 305, 310, 315 };
83 return make_elev_array(elev_data,
sizeof(elev_data) /
sizeof(
int));
85 static const int elev_data[]={6,16,26,37,47,57,80,109,148,205,284, 300, 305, 310, 315 };
86 return make_elev_array(elev_data,
sizeof(elev_data) /
sizeof(
int));
106 radarSite.lat_r=SPC_LAT;
107 radarSite.lon_r=SPC_LON;
108 radarSite.height_r = 11.;
109 radarSite.antennaTowerHeight=20.;
110 radarSite.source=
"WMO:16144,RAD:IY46,PLC:itspc,NOD:itspc ";
111 vpr_iaz_min=IAZ_MIN_SPC;
112 vpr_iaz_max=IAZ_MAX_SPC;
119 return getenv_default(
"FILE_DEM_SPC",
"../../PP+BLOC/dati/dem_SanPi.txt");
124 if (1 <= month && month <= 3)
126 return (datipath+
"FIRST_LEVEL_SPC_2006_INV").c_str();
127 else if (4 <= month && month <= 9)
129 return (datipath+
"FIRST_LEVEL_SPC_2006_PRI-EST").c_str();
132 return (datipath+
"FIRST_LEVEL_SPC_2006_AUT").c_str();
139 static const int elev_data[]={6,16,26,36,47,57,80,108,148,205,284,300,305,310,315};
140 return make_elev_array(elev_data,
sizeof(elev_data) /
sizeof(
int));
142 static const int elev_data[]={6,16,26,36,47,57,80,108,148,205,284,300,305,310,315};
143 return make_elev_array(elev_data,
sizeof(elev_data) /
sizeof(
int));
150 if (when >= 1380108600)
159 const Site& Site::get(
const char* name)
161 if (strcmp(name,
"GAT") == 0){
164 else if (strcmp(name,
"SPC") == 0){
170 throw domain_error(errmsg +
" is not a valid radar site name");
name space generale del programma
const char * getenv_default(const char *envname, const char *default_value)
A wrapper of getenv, that returns 'default_value' if the given environment name is not defined.
definisce struttura Site Contiene le informazioni di base che caratterizzano il sito radar
virtual const char * get_dem_file_name() const
Return dem file name.
virtual std::vector< double > get_elev_array(bool medium=false) const
return the elev array used
virtual const char * get_first_level_file_name(unsigned month) const
Return first_elev file name.
virtual unsigned char get_bin_wind_magic_number(time_t when) const
Return the magic number for wind to be used in clean procedure.
struttura Site custom per GAT
virtual const char * get_first_level_file_name(unsigned month) const
Return first_elev file name.
virtual const char * get_dem_file_name() const
Return dem file name.
virtual std::vector< double > get_elev_array(bool medium=false) const
return the elev array used
virtual unsigned char get_bin_wind_magic_number(time_t when) const
Return the magic number for wind to be used in clean procedure.
struttura Site custom per SPC