RAVE
radvol.h File Reference

Radvol-QC general structures and algorithms. More...

#include "rave_object.h"
#include "rave_simplexml.h"
#include "polarvolume.h"
#include "polarscan.h"
#include <math.h>

Go to the source code of this file.

Classes

struct  Elevation_t
 Represents an elevation. More...
 
struct  _Radvol_t
 Represents the Radvol. More...
 
struct  _Radvol_params_t
 Represents argument parameters for Radvol's algorithms. More...
 

Macros

#define QI_GOOD   1.0
 the best QI value
 
#define QI_BAD   0.0
 the worst QI value
 
#define cNull   9999.0
 value for double no data
 
#define cEer   8493
 equivalent earth's radius [km]
 
#define DEFAULT_EQUATOR_RADIUS   6378160.0
 Radius at the equator.
 
#define DEFAULT_POLE_RADIUS   6356780.0
 Radius to the poles.
 
#define SameValue(a, b)
 1 if two values are the same (max acceptable difference 0.001), 0 otherwise
 

Typedefs

typedef struct Elevation_t Elevation_t
 Represents an elevation.
 
typedef struct _Radvol_t Radvol_t
 
typedef struct _Radvol_params_t Radvol_params_t
 

Functions

void Radvol_getName (Radvol_t *self, const char *source)
 Reads radar node name (NOD) into self->name.
 
int Radvol_getAttrDouble_scan (PolarScan_t *scan, char *name, double *value)
 Reads attribute value from scan.
 
int Radvol_getAttrDouble_pvol (PolarVolume_t *pvol, char *name, double *value)
 Reads attribute value from volume.
 
int Radvol_setTaskName (Radvol_t *self, const char *task_name)
 Sets name of task.
 
int Radvol_setTaskArgs (Radvol_t *self, const char *task_args)
 Sets arguments of task.
 
int Radvol_load_scan (Radvol_t *self, PolarScan_t *scan)
 Reads polar scan into radvolqc structure.
 
int Radvol_load_pvol (Radvol_t *self, PolarVolume_t *pvol)
 Reads polar volume into radvolqc structure.
 
int Radvol_save_scan (Radvol_t *self, PolarScan_t *scan)
 Writes data from radvolqc into polar scan.
 
int Radvol_save_pvol (Radvol_t *self, PolarVolume_t *pvol)
 Writes data from radvolqc into polar volume.
 
SimpleXmlNode_tRadvol_getFactorChild (Radvol_t *self, char *aFileName, char *aFactorName, int *IsDefault)
 Reads xml child for a specific radar and factor/algorithm from xml file.
 
int Radvol_getParValueDouble (SimpleXmlNode_t *node, char *aParamName, double *value)
 Returns value of a specific parameter as double from xml child.
 
int Radvol_getParValueInt (SimpleXmlNode_t *node, char *aParamName, int *value)
 Returns value of a specific parameter as int from xml child.
 
void Radvol_setEquivalentEarthRadius (Radvol_t *self, double lat)
 Estimates equivalent Earth radius based on radar site latitude.
 
double Radvol_getCurvature (Radvol_t *self, int ele, int aBin)
 Returns height of a particular bin in the scan resulting from Earth curvature.
 
double Radvol_getLinearQuality (double x, double a, double b)
 Returns quality index value for linear relationship.
 

Variables

RaveCoreObjectType Radvol_TYPE
 Type definition to use when creating a rave object.
 

Detailed Description

Radvol-QC general structures and algorithms.

Author
Katarzyna Osrodka (Institute of Meteorology and Water Management, IMGW-PIB)
Date
2012-12-20

Macro Definition Documentation

◆ cEer

#define cEer   8493

equivalent earth's radius [km]

◆ cNull

#define cNull   9999.0

value for double no data

◆ DEFAULT_EQUATOR_RADIUS

#define DEFAULT_EQUATOR_RADIUS   6378160.0

Radius at the equator.

◆ DEFAULT_POLE_RADIUS

#define DEFAULT_POLE_RADIUS   6356780.0

Radius to the poles.

◆ QI_BAD

#define QI_BAD   0.0

the worst QI value

◆ QI_GOOD

#define QI_GOOD   1.0

the best QI value

◆ SameValue

#define SameValue ( a,
b )
Value:
( (fabs(a - b) < 0.001) ? 1 : 0)

1 if two values are the same (max acceptable difference 0.001), 0 otherwise

Typedef Documentation

◆ Elevation_t

typedef struct Elevation_t Elevation_t

Represents an elevation.

Function Documentation

◆ Radvol_getAttrDouble_pvol()

int Radvol_getAttrDouble_pvol ( PolarVolume_t * pvol,
char * name,
double * value )

Reads attribute value from volume.

Parameters
pvol- polar volume
name- attribute name
value- read value
Returns
1 on success, otherwise 0

◆ Radvol_getAttrDouble_scan()

int Radvol_getAttrDouble_scan ( PolarScan_t * scan,
char * name,
double * value )

Reads attribute value from scan.

Parameters
scan- polar scan
name- attribute name
value- read value
Returns
1 on success, otherwise 0

◆ Radvol_getCurvature()

double Radvol_getCurvature ( Radvol_t * self,
int ele,
int aBin )

Returns height of a particular bin in the scan resulting from Earth curvature.

Parameters
self- self
ele- elevation number
aBin- bin number
Returns
altitude [km]

◆ Radvol_getFactorChild()

SimpleXmlNode_t * Radvol_getFactorChild ( Radvol_t * self,
char * aFileName,
char * aFactorName,
int * IsDefault )

Reads xml child for a specific radar and factor/algorithm from xml file.

Parameters
self- self
aFileName- xml filename
aFactorName- factor/algorithm name
IsDefault- 1 if returned child is default, 0 otherwise
Returns
related or default xml child on success, NULL otherwise

◆ Radvol_getLinearQuality()

double Radvol_getLinearQuality ( double x,
double a,
double b )

Returns quality index value for linear relationship.

Parameters
x- quality factor value
a- lower threshold in linear relationship
b- upper threshold in linear relationship
Returns
quality index value

◆ Radvol_getName()

void Radvol_getName ( Radvol_t * self,
const char * source )

Reads radar node name (NOD) into self->name.

Parameters
self- self
source- what/source from PVOL or SCAN

◆ Radvol_getParValueDouble()

int Radvol_getParValueDouble ( SimpleXmlNode_t * node,
char * aParamName,
double * value )

Returns value of a specific parameter as double from xml child.

Parameters
node- xml child
aParamName- parameter name
value- parameter value
Returns
1 on success, otherwise 0

◆ Radvol_getParValueInt()

int Radvol_getParValueInt ( SimpleXmlNode_t * node,
char * aParamName,
int * value )

Returns value of a specific parameter as int from xml child.

Parameters
node- xml child
aParamName- parameter name
value- parameter value
Returns
1 on success, otherwise 0

◆ Radvol_load_pvol()

int Radvol_load_pvol ( Radvol_t * self,
PolarVolume_t * pvol )

Reads polar volume into radvolqc structure.

Parameters
self- self
pvol- polar volume
Returns
1 on success, otherwise 0

◆ Radvol_load_scan()

int Radvol_load_scan ( Radvol_t * self,
PolarScan_t * scan )

Reads polar scan into radvolqc structure.

Parameters
self- self
scan- polar scan
Returns
1 on success, otherwise 0

◆ Radvol_save_pvol()

int Radvol_save_pvol ( Radvol_t * self,
PolarVolume_t * pvol )

Writes data from radvolqc into polar volume.

Parameters
self- self
pvol- polar volume
Returns
1 on success, otherwise 0

◆ Radvol_save_scan()

int Radvol_save_scan ( Radvol_t * self,
PolarScan_t * scan )

Writes data from radvolqc into polar scan.

Parameters
self- self
scan- polar scan
Returns
1 on success, otherwise 0

◆ Radvol_setEquivalentEarthRadius()

void Radvol_setEquivalentEarthRadius ( Radvol_t * self,
double lat )

Estimates equivalent Earth radius based on radar site latitude.

Parameters
self- self
lat- radar site latitude

◆ Radvol_setTaskArgs()

int Radvol_setTaskArgs ( Radvol_t * self,
const char * task_args )

Sets arguments of task.

Parameters
self- self
task_args- task arguments
Returns
1 on success, otherwise 0

◆ Radvol_setTaskName()

int Radvol_setTaskName ( Radvol_t * self,
const char * task_name )

Sets name of task.

Parameters
self- self
task_name- name of task
Returns
1 on success, otherwise 0

Variable Documentation

◆ Radvol_TYPE

RaveCoreObjectType Radvol_TYPE
extern

Type definition to use when creating a rave object.