6static const double ker = 8494666.666667;
12PolarScanBase::PolarScanBase(
unsigned beam_count,
unsigned beam_size)
13 : beam_count(beam_count), beam_size(beam_size),
14 azimuths_real(beam_count), elevations_real(beam_count)
18PolarScanBase::PolarScanBase(
const PolarScanBase& s)
19 : beam_count(s.beam_count), beam_size(s.beam_size),
20 azimuths_real(s.azimuths_real),
21 elevation(s.elevation),
22 elevations_real(s.elevations_real),
23 cell_size(s.cell_size)
27double PolarScanBase::height(
unsigned rg,
double beam_half_width)
29 return sample_height(elevation + beam_half_width, (
double)rg*cell_size) / 1000.;
32double PolarScanBase::diff_height(
unsigned rg_start,
unsigned rg_end)
34 return fabs(height(rg_end) - height(rg_start));
37double PolarScanBase::sample_height(
unsigned cell_idx)
const
39 return sample_height(elevation, (
double)cell_idx * cell_size);
42double PolarScanBase::sample_height(
double elevation,
double range,
double equiv_earth_radius)
46 + equiv_earth_radius * equiv_earth_radius
47 + 2. * equiv_earth_radius * range * sin(elevation * M_PI / 180.)
48 ) - equiv_earth_radius;
51double PolarScanBase::sample_height(
double elevation,
double range)
53 return sample_height(elevation, range, ker);
56void VolumeStats::print(FILE* out)
58 fprintf(out,
"Nel Zeros Ones Others Sum\n");
59 for (
size_t iel =0; iel<count_zeros.size(); ++iel){
60 fprintf(out,
"%4zu %8u %8u %8u %8u\n",iel,count_zeros[iel],count_ones[iel],count_others[iel],sum_others[iel]);
64template class PolarScan<double>;
65template class Volume<double>;
68template class Scans<double>;
Definisce le principali strutture che contengono i dati.