31 #ifndef RADAR_POLAR_SECTOR_H
32 #define RADAR_POLAR_SECTOR_H
37 #include "drain/util/BeanLike.h"
38 #include "drain/util/Range.h"
40 #include "data/PolarODIM.h"
52 parameters.link(
"azm",
azmRange.tuple(),
"deg");
54 parameters.link(
"ray",
rayRange.tuple(),
"index");
55 parameters.link(
"bin",
binRange.tuple(),
"index");
76 this->distanceRange.set(range2, range);
81 this->distanceRange.set(range, range2);
89 void setAzimuth(
double azm,
double azm2 = std::numeric_limits<double>::max()){
91 if (azm2 != std::numeric_limits<double>::max())
92 this->azmRange.set(azm, azm2);
94 this->azmRange.set(azm, azm);
99 int getSafeRay(
const PolarODIM & odim,
int j){
100 j = j % odim.area.height;
102 j += odim.area.height;
110 void deriveWindow(
const PolarODIM & srcOdim,
int & ray1,
int & bin1,
int & ray2,
int & bin2)
const;
Something which has a name, a description and possibly some parameters of varying type.
Definition: BeanLike.h:60
Metadata structure for single-radar data (polar scans, volumes and products).
Definition: PolarODIM.h:45
Definition: PolarSector.h:47
void adjustIndices(const PolarODIM &odim)
Given scaling (ODIM nbins, rscale, nrays), convert azimuths and ranges to ray and bin indices.
Definition: PolarSector.cpp:54
void deriveWindow(const PolarODIM &srcOdim, int &ray1, int &bin1, int &ray2, int &bin2) const
Given scaling (ODIM nbins, rscale, nrays), convert current azm and range data to ray and bin indices.
Definition: PolarSector.cpp:107
void setRange(int range, int range2=0)
Sets range such that range1 < range2.
Definition: PolarSector.h:74
drain::Range< double > distanceRange
Radial distance range [km].
Definition: PolarSector.h:62
void setAzimuth(double azm, double azm2=std::numeric_limits< double >::max())
Sets azimuth(s)
Definition: PolarSector.h:89
drain::Range< int > binRange
Radial distance range [index].
Definition: PolarSector.h:68
drain::Range< double > azmRange
Azimuthal sector [deg].
Definition: PolarSector.h:59
drain::Range< int > rayRange
Azimuthal [index].
Definition: PolarSector.h:65
Definition: DataSelector.cpp:44