RAVE
radvol.c File Reference

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

#include "radvol.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "raveutil.h"
#include <string.h>
#include <math.h>

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

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
Initial value:
= {
"Radvol",
sizeof(Radvol_t),
Radvol_constructor,
Radvol_destructor,
Radvol_copyconstructor
}
Represents the Radvol.
Definition radvol.h:67

Type definition to use when creating a rave object.