31#ifndef POLAR_ODIM_STRUCT
32#define POLAR_ODIM_STRUCT
35#include <drain/util/Units.h>
102 double highprf = 0.0;
104 double wavelength = 0.0;
160 return 2.0*
M_PI/
static_cast<double>(area.height);
178 return elangle * drain::DEG2RAD;
191 return (
static_cast<double>(i))*
rscale;
203 return static_cast<int>(
d *
static_cast<double>(area.height)/(2.0 *
M_PI)) ;
209 return static_cast<int>(
d *
static_cast<double>(area.height) / 360.0) ;
216 return static_cast<double>(j)*2.0*
M_PI /
static_cast<double>(area.height);
225 return static_cast<int>(
degree *
static_cast<double>(area.height)/360.0 + 0.5) ;
242 double getGroundAngle(
size_t i)
const {
256 static double defaultRange;
void updateFromMap(const std::map< std::string, T2 > &m)
Assign values from a map. Updates existing entries only.
Definition SmartMap.h:282
Policies for coordinate underflows and overflows.
Definition CoordinatePolicy.h:100
Class for multi-channel digital images. Supports dynamic typing with base types (char,...
Definition Image.h:183
A map of radar data, indexed by quantity code (DBZH, VRAD, etc).
Definition Data.h:1293
double scaleForward(double x) const
Converts a quantity from storage scale: y = offset + gain*y .
Definition EncodingODIM.h:241
DOC: Add class description.
Definition ODIMPath.h:82
static const group_t ALL_LEVELS
Abbreviation for linking (referencing) attributes at different levels (tree depths).
Definition ODIMPath.h:121
ODIM metadata (quantity, gain, offset, undetect, nodata, date, time)
Definition ODIM.h:79
drain::Point2D< double > resolution
Spatial resolution in metres.
Definition ODIM.h:167
std::string quantity
dataX/what (obligatory)
Definition ODIM.h:192
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
PolarODIM(group_t initialize=ODIMPathElem::ALL_LEVELS)
Default constructor.
Definition PolarODIM.h:51
double freeze
Freezing level.
Definition PolarODIM.h:107
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:196
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:224
long a1gate
Index of the first azimuth gate radiated in the scan.
Definition PolarODIM.h:95
double getAzimuth(T j) const
Returns the azimuth in radians of the bin with vertical index j.
Definition PolarODIM.h:215
PolarODIM(const PolarODIM &odim)
Copy constructor.
Definition PolarODIM.h:56
double getBinSpan(size_t i) const
Returns the radial distance covered by i consecutive bins.
Definition PolarODIM.h:190
double lat
Latitude position of the radar antenna (degrees), normalized to the WGS-84 reference ellipsoid and da...
Definition PolarODIM.h:86
double & rscale
Beam-directional bin length [m].
Definition PolarODIM.h:81
void mapDopplerSpeed(double d, double &x, double &y) const
Converts Doppler speed [-NI,NI] to unit circle.
Definition PolarODIM.h:248
double getBeamWidth() const
Azimuthal resolution in radians.
Definition PolarODIM.h:159
double height
Height of the centre of the antenna in meters above sea level.
Definition PolarODIM.h:88
PolarODIM(const drain::image::Image &img, const std::string &quantity="")
Constructor.
Definition PolarODIM.h:69
PolarODIM(const std::map< std::string, T > &m)
Constructor.
Definition PolarODIM.h:63
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:84
double getBinDistance(size_t i) const
Returns the distance along the beam to the center of the i'th bin.
Definition PolarODIM.h:184
double getElangleR() const
Returns elevation angle in radians.
Definition PolarODIM.h:177
int getDRayIndex(double d) const
Returns the index of a ray at a given azimuth [degrees].
Definition PolarODIM.h:208
double elangle
Antenna elevation angle (degrees) above the horizon.
Definition PolarODIM.h:91
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:234
bool optimiseVRAD()
For VRAD, set encoding range to cover [-NI,NI].
Definition PolarODIM.h:140
int getRayIndex(double d) const
Returns the index of a ray at a given azimuth [radians].
Definition PolarODIM.h:202
virtual const drain::image::CoordinatePolicy & getCoordinatePolicy() const
Returns recommended coordinate policy (Polar coords, origin at left)
Definition PolarODIM.h:112
double rstart
The range (km) of the start of the first range bin.
Definition PolarODIM.h:93
Namespace for images and image processing tools.
Definition AccumulationArray.cpp:45
Definition AltitudeOp.cpp:42
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