33#include <drain/util/BeanLike.h>
35#ifndef RACK_PRECIPITATION
36#define RACK_PRECIPITATION
94 std::map<std::string,std::string>
presets;
108 double rainRate(
double p)
const = 0;
126 double rainRate(
double p1,
double p2)
const = 0;
169 double rainRate(
double dbz)
const {
170 return pow(aInv *
pow(10.0, dbz*0.10), bInv);
191 presets[
"Marshall-Palmer"] =
"200,1.6";
215 presets[
"Leinonen2012"] =
"21,0.72";
226 double rainRate(
double kdp)
const {
228 r = a * ::pow(
kdp, b);
242 PrecipZZDR(
double a=0.0122,
double b=0.820,
double c=-2.28) :
260 double rainRate(
double dbz,
double zdr)
const {
262 r = a * ::pow(dbz, b) *
pow(
zdr, c);
278 PrecipKDPZDR(
double a=29.7,
double b=0.890,
double c=-0.927) :
292 double rainRate(
double kdp,
double zdr)
const {
294 r = a * ::pow(
kdp, b) * ::pow(
zdr, c);
Something which has a name, a description and possibly some parameters of varying type.
Definition BeanLike.h:58
const std::string description
Brief, human-readable description of this bean.
Definition BeanLike.h:309
map_t parameters
Parameters (name -> linked variable), typically linked to member variables of the derived class.
Definition BeanLike.h:313
const map_t & getParameters() const
Returns the parameter map (const access).
Definition BeanLike.h:116
const std::string name
Name of this bean, typically also the name of the (derived) class.
Definition BeanLike.h:306
void copyStruct(const ReferenceMap &m, const T &src, T &dst, extLinkPolicy policy=RESERVE)
Experimental. Copies references and values of a structure to another.
Definition ReferenceMap.h:412
char separator
Default character used for splitting input and output. See setValues.
Definition SmartMap.h:81
A map of radar data, indexed by quantity code (DBZH, VRAD, etc).
Definition Data.h:1293
Definition Precipitation.h:121
Definition Precipitation.h:273
Definition Precipitation.h:206
Definition Precipitation.h:238
Definition Precipitation.h:140
virtual void updateBean() const override
Called after setParameters()
Definition Precipitation.h:160
Definition Precipitation.h:186
Definition Precipitation.h:195
Definition Precipitation.h:40
std::map< std::string, std::string > presets
Redefined such that if argument is a preset, reinvoke with its arguments.
Definition Precipitation.h:94
Definition Precipitation.h:103
Definition AltitudeOp.cpp:42