14typedef Eigen::Matrix<unsigned char, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> IndexMatrix;
17struct ElevFin :
public IndexMatrix
27 unsigned max_size = 512;
28 for (
unsigned iel = 0; iel <
volume.size(); ++iel)
30 if (
volume.scan(iel).beam_size &&
volume.scan(iel).beam_size > max_size)
31 max_size =
volume.scan(iel).beam_size;
34 IndexMatrix::operator=(IndexMatrix::Zero(
volume.beam_count, max_size));
37 inline double elevation_rad_at_elev_preci(
unsigned az_idx,
unsigned ray_idx)
const
39 return elevation_at_elev_preci(az_idx, ray_idx) * M_PI / 180.;
42 inline double elevation_at_elev_preci(
unsigned az_idx,
unsigned ray_idx)
const
44 unsigned el = (*this)(az_idx, ray_idx);
45 return volume.scan(el).elevations_real(az_idx);
48 inline double db_at_elev_preci(
unsigned az_idx,
unsigned ray_idx)
const
52 return s.
get(az_idx, ray_idx);
58 void write_info_to_debug_file(H5::H5File out)
63 hsize_t dims[2] = { this->rows(), this->cols() };
64 DataSpace file_data_space(2, dims);
67 IntType datatype( PredType::NATIVE_UCHAR );
70 DSetCreatPropList props;
71 unsigned char fill_value(0);
72 props.setFillValue(datatype, &fill_value);
75 DataSet ds = out.createDataSet(
"/elev_fin", datatype, file_data_space, props);
78 hsize_t mdims[1] = { this->cols() };
79 DataSpace memory_data_space(1, mdims);
80 hsize_t count[] = { 1, this->cols() };
81 for (
unsigned i = 0; i < this->rows(); ++i)
83 hsize_t start[] = { i, 0 };
84 file_data_space.selectHyperslab(H5S_SELECT_SET, count, start);
86 ds.write(this->row(i).data(), datatype, memory_data_space, file_data_space);