31 #ifndef POLAR_ODIM_STRUCT
32 #define POLAR_ODIM_STRUCT
34 #include <drain/util/Geo.h>
35 #include <drain/Type.h>
100 double wavelength = 0.0;
110 static const CoordinatePolicy polarLeft(EdgePolicy::POLAR, EdgePolicy::WRAP, EdgePolicy::LIMIT, EdgePolicy::WRAP);
150 double getNyquist(
int errorThreshold = LOG_NOTICE)
const;
156 return 2.0*M_PI/
static_cast<double>(area.height);
169 signed char checkAliasing(
double v1,
double v2,
double NI_threshold)
const;
174 return elangle * drain::DEG2RAD;
187 return (
static_cast<double>(i))*
rscale;
199 return static_cast<int>(d *
static_cast<double>(area.height)/(2.0 * M_PI)) ;
205 return static_cast<int>(d *
static_cast<double>(area.height) / 360.0) ;
212 return static_cast<double>(j)*2.0*M_PI /
static_cast<double>(area.height);
221 return static_cast<int>(degree *
static_cast<double>(area.height)/360.0 + 0.5) ;
231 return static_cast<int>(spanM/
rscale + 0.5) ;
238 double getGroundAngle(
size_t i)
const {
253 static int defaultRange;
void updateFromMap(const std::map< std::string, T2 > &m)
Assign values from a map. Updates existing entries only.
Definition: SmartMap.h:294
Policies for coordinate underflows and overflows.
Definition: CoordinatePolicy.h:106
Class for multi-channel digital images. Supports dynamic typing with base types (char,...
Definition: Image.h:184
double scaleForward(double x) const
Converts a quantity from storage scale: y = offset + gain*y .
Definition: EncodingODIM.h:225
static const group_t ALL_LEVELS
Abbreviation for linking (referencing) attributes at different levels (tree depths).
Definition: ODIMPath.h:118
ODIM metadata (quantity, gain, offset, undetect, nodata, date, time)
Definition: ODIM.h:79
drain::Point2D< double > resolution
Spatial resolution in metres.
Definition: ODIM.h:156
std::string quantity
dataX/what (obligatory)
Definition: ODIM.h:181
Metadata structure for single-radar data (polar scans, volumes and products).
Definition: PolarODIM.h:45
virtual void updateLenient(const PolarODIM &odim)
Sets number of bins (geometry.width) and number of rays (geometry.height)
Definition: PolarODIM.cpp:75
double freeze
Freezing level.
Definition: PolarODIM.h:103
signed char checkAliasing(double v1, double v2, double NI_threshold) const
Detect Doppler speed aliasing (wrapping)
Definition: PolarODIM.cpp:213
int getBinIndex(double d) const
Returns the index of bin at given (bin center) distance along the beam.
Definition: PolarODIM.h:192
virtual const drain::image::CoordinatePolicy & getCoordinatePolicy() const
Returns recommended coordinate policy (Polar coords, origin at left)
Definition: PolarODIM.h:108
double getMaxRange(bool warn=false) const
Returns the range in metres (i.e. distance to the end of the last measurement volume).
Definition: PolarODIM.cpp:104
int getAzimuthalBins(double degree) const
Returns the span of bins for the given azimuthal span.
Definition: PolarODIM.h:220
long a1gate
Index of the first azimuth gate radiated in the scan.
Definition: PolarODIM.h:91
double getAzimuth(T j) const
Returns the azimuth in radians of the bin with vertical index j.
Definition: PolarODIM.h:211
double getBinSpan(size_t i) const
Returns the radial distance covered by i consecutive bins.
Definition: PolarODIM.h:186
double lat
Latitude position of the radar antenna (degrees), normalized to the WGS-84 reference ellipsoid and da...
Definition: PolarODIM.h:82
double & rscale
Beam-directional bin length [m].
Definition: PolarODIM.h:77
void mapDopplerSpeed(double d, double &x, double &y) const
Converts Doppler speed [-NI,NI] to unit circle.
Definition: PolarODIM.h:244
double getBeamWidth() const
Azimuthal resolution in radians.
Definition: PolarODIM.h:155
double height
Height of the centre of the antenna in meters above sea level.
Definition: PolarODIM.h:84
double getNyquist(int errorThreshold=LOG_NOTICE) const
Definition: PolarODIM.cpp:135
double lon
Longitude position of the radar antenna (degrees), normalized to the WGS-84 reference ellipsoid and d...
Definition: PolarODIM.h:80
double getBinDistance(size_t i) const
Returns the distance along the beam to the center of the i'th bin.
Definition: PolarODIM.h:180
double getElangleR() const
Returns elevation angle in radians.
Definition: PolarODIM.h:173
int getDRayIndex(double d) const
Returns the index of a ray at a given azimuth [degrees].
Definition: PolarODIM.h:204
double elangle
Antenna elevation angle (degrees) above the horizon.
Definition: PolarODIM.h:87
bool deriveDifference(double v1, double v2, double &dOmega) const
Given two Doppler speeds (m/s), computes their difference (m/s).
Definition: PolarODIM.cpp:190
int getBeamBins(double spanM) const
Returns the span of bins for the given distance range in meters.
Definition: PolarODIM.h:230
bool optimiseVRAD()
For VRAD, set encoding range to cover [-NI,NI].
Definition: PolarODIM.h:136
int getRayIndex(double d) const
Returns the index of a ray at a given azimuth [radians].
Definition: PolarODIM.h:198
double rstart
The range (km) of the start of the first range bin.
Definition: PolarODIM.h:89
Namespace for images and image processing tools.
Definition: AccumulationArray.cpp:45
Definition: DataSelector.cpp:1277
Definition: DataSelector.cpp:44
const double EARTH_RADIUS_43
The standard 4/3 radius applied in radar to compensate the decreasing density of the atmosphere.
Definition: Constants.h:53