RAVE
compositeengine.h File Reference

Provides base functionality for creating composites. More...

#include "projection_pipeline.h"
#include "rave_object.h"
#include "rave_properties.h"
#include "rave_types.h"
#include "cartesian.h"
#include "composite_utils.h"
#include "compositearguments.h"
#include "compositeenginebase.h"
#include "limits.h"

Go to the source code of this file.

Classes

struct  CompositeEngineRadarData_t
 Contains information required when determining what data point to use. More...
 

Macros

#define COMPOSITE_ENGINE_DISTANCE_TO_RADAR_RESOLUTION   2000.0
 The resolution to use for scaling the distance from pixel to used radar.
 
#define COMPOSITE_ENGINE_HEIGHT_RESOLUTION   100.0
 Same for height, scaled to 100 m resolution up to 25.5 km.
 
#define COMPOSITE_ENGINE_DISTANCE_TO_RADAR_HOW_TASK   "se.smhi.composite.distance.radar"
 The name of the task for specifying distance to radar.
 
#define COMPOSITE_ENGINE_HEIGHT_ABOVE_SEA_HOW_TASK   "se.smhi.composite.height.radar"
 The name of the task for specifying height above sea level.
 
#define COMPOSITE_ENGINE_RADAR_INDEX_HOW_TASK   "se.smhi.composite.index.radar"
 The name of the task for indexing the radars used.
 
#define COMPOSITE_ENGINE_DEFAULT_QUALITY_FIELDS_GAIN   (1.0/UCHAR_MAX)
 Default gain for quality fields without type definition.
 
#define COMPOSITE_ENGINE_DEFAULT_QUALITY_FIELDS_OFFSET   0.0
 Default offset for quality fields without type definition.
 

Typedefs

typedef struct _CompositeEngine_t CompositeEngine_t
 Defines a Composite engine.
 
typedef int(* composite_engine_onStarting_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *bindings, int nbindings)
 Will be called before the looping over the cartesian product will be done.
 
typedef int(* composite_engine_onFinished_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *bindings, int nbindings)
 Will be called after the looping over the cartesian product has finished Gives the user a possibility to perform some final cleanups and checks.
 
typedef int(* composite_engine_getLonLat_fun) (CompositeEngine_t *engine, void *extradata, CompositeEngineObjectBinding_t *binding, double herex, double herey, double *olon, double *olat)
 Function pointer used during composite generation (CompositeEngine_generate).
 
typedef int(* composite_engine_selectRadarData_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *binding, int index, double olon, double olat, struct CompositeEngineRadarData_t *cvalues, int ncvalues)
 Function pointer used during composite generation (CompositeEngine_generate).
 
typedef int(* composite_engine_getPolarValueAtPosition_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *binding, const char *quantity, PolarNavigationInfo *navinfo, const char *qiFieldName, RaveValueType *otype, double *ovalue, double *qivalue)
 Function pointer used during composite generation (CompositeEngine_generate) from the default selectRadarData function.
 
typedef int(* composite_engine_setRadarData_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, Cartesian_t *cartesian, double olon, double olat, long x, long y, struct CompositeEngineRadarData_t *cvalues, int ncvalues)
 Sets the radar data in the cartesian product.
 
typedef int(* composite_engine_addQualityFlagsToCartesian_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, Cartesian_t *cartesian)
 Adds quality flags to the cartesian product.
 
typedef int(* composite_engine_getQualityValue_fun) (CompositeEngine_t *self, void *extradata, CompositeArguments_t *args, RaveCoreObject *obj, const char *quantity, const char *qfieldname, PolarNavigationInfo *navinfo, double *v)
 
typedef int(* composite_engine_fillQualityInformation_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, long x, long y, CartesianParam_t *param, double radardist, int radarindex, PolarNavigationInfo *info)
 Fills the quality information in the cartesian product.
 
typedef struct CompositeEngineRadarData_t CompositeEngineRadarData_t
 Contains information required when determining what data point to use.
 

Functions

int CompositeEngineUtility_getLonLat (CompositeEngine_t *engine, CompositeEngineObjectBinding_t *binding, double herex, double herey, double *olon, double *olat)
 Calculates the lon/lat coordinate using the provided pipeline.
 
int CompositeEngineUtility_selectRadarData (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *binding, int index, double olon, double olat, CompositeEngineRadarData_t *cvalues, int ncvalues)
 Fetches the radar data for specified position using NEAREST.
 
int CompositeEngineUtility_getPolarValueAtPosition (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *binding, const char *quantity, PolarNavigationInfo *navinfo, const char *qiFieldName, RaveValueType *otype, double *ovalue, double *qivalue)
 Fetches the polar value from specified position for specified quantity.
 
int CompositeEngineUtility_setRadarData (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, Cartesian_t *cartesian, double olon, double olat, long x, long y, CompositeEngineRadarData_t *cvalues, int ncvalues)
 Sets the radar data for specified position using NEAREST.
 
int CompositeEngineUtility_addQualityFlagsToCartesian (CompositeEngine_t *engine, CompositeArguments_t *arguments, Cartesian_t *cartesian)
 Creates the quality fields in the cartesian product using arguments and default parameters.
 
int CompositeEngineUtility_fillQualityInformation (CompositeEngine_t *self, void *extradata, CompositeArguments_t *arguments, long x, long y, CartesianParam_t *param, double radardist, int radarindex, PolarNavigationInfo *navinfo)
 Fills the quality information for the provided parameter.
 
CompositeEngineRadarData_tCompositeEngineUtility_createRadarData (CompositeArguments_t *arguments, Cartesian_t *cartesian, int *nentries)
 Creates an array of CompositeEngineRadarData_t.
 
void CompositeEngineUtility_resetRadarData (CompositeArguments_t *arguments, CompositeEngineRadarData_t *cvalues, int nentries)
 Resets the array of CompositeEngineRadarData_t except the CartesianParam parameter.
 
void CompositeEngineUtility_freeRadarData (CompositeEngineRadarData_t **cvalues, int nparam)
 Frees the CompositeEngineRadarData_t and ensures that all associated parameters are released.
 
int CompositeEngineFunction_onStarting (CompositeEngine_t *self, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *bindings, int nbindings)
 Delegates to the onStarting function pointer.
 
int CompositeEngineFunction_onFinished (CompositeEngine_t *self, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *bindings, int nbindings)
 Delegates to the onFinished function pointer.
 
int CompositeEngineFunction_getLonLat (CompositeEngine_t *self, void *extradata, CompositeEngineObjectBinding_t *binding, double herex, double herey, double *olon, double *olat)
 This delegates the call to the set lon-lat function.
 
int CompositeEngineFunction_selectRadarData (CompositeEngine_t *self, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *binding, int index, double olon, double olat, CompositeEngineRadarData_t *cvalues, int ncvalues)
 
int CompositeEngineFunction_getPolarValueAtPosition (CompositeEngine_t *self, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *binding, const char *quantity, PolarNavigationInfo *navinfo, const char *qiFieldName, RaveValueType *otype, double *ovalue, double *qivalue)
 
int CompositeEngineFunction_setRadarData (CompositeEngine_t *self, void *extradata, CompositeArguments_t *arguments, Cartesian_t *cartesian, double olon, double olat, long x, long y, CompositeEngineRadarData_t *cvalues, int ncvalues)
 
int CompositeEngineFunction_addQualityFlagsToCartesian (CompositeEngine_t *self, void *extradata, CompositeArguments_t *arguments, Cartesian_t *cartesian)
 Adds the quality flags to the cartesian product.
 
int CompositeEngineFunction_getQualityValue (CompositeEngine_t *self, void *extradata, CompositeArguments_t *args, RaveCoreObject *obj, const char *quantity, const char *qfieldname, PolarNavigationInfo *navinfo, double *v)
 Returns the quality value at specified polar navigation info.
 
int CompositeEngineFunction_fillQualityInformation (CompositeEngine_t *self, void *extradata, CompositeArguments_t *arguments, long x, long y, CartesianParam_t *param, double radardist, int radarindex, PolarNavigationInfo *info)
 Fills the quality information into the product.
 
int CompositeEngine_setOnStartingFunction (CompositeEngine_t *self, composite_engine_onStarting_fun onStarting)
 Sets the on starting function.
 
int CompositeEngine_setOnFinishedFunction (CompositeEngine_t *self, composite_engine_onFinished_fun onFinished)
 Sets the on finished function.
 
int CompositeEngine_setLonLatFunction (CompositeEngine_t *self, composite_engine_getLonLat_fun getLonLat)
 Sets the lon-lat function.
 
int CompositeEngine_setSelectRadarDataFunction (CompositeEngine_t *self, composite_engine_selectRadarData_fun selectRadarData)
 Sets the select radar data function.
 
int CompositeEngine_setDefaultPolarValueAtPositionFunction (CompositeEngine_t *self, composite_engine_getPolarValueAtPosition_fun getPolarValueAtPosition)
 Sets the default polarValueAtPosition function,.
 
int CompositeEngine_registerPolarValueAtPositionFunction (CompositeEngine_t *self, const char *quantity, composite_engine_getPolarValueAtPosition_fun getPolarValueAtPosition)
 Registers a polar value at position function for the specified quantity.
 
int CompositeEngine_setSetRadarDataFunction (CompositeEngine_t *self, composite_engine_setRadarData_fun setRadarData)
 Sets the set radar data function.
 
int CompositeEngine_setAddQualityFlagsToCartesianFunction (CompositeEngine_t *self, composite_engine_addQualityFlagsToCartesian_fun addQualityFlagsToCartesian)
 Sets the add quality flags to cartesian that will add the quality flags to the cartesian product.
 
int CompositeEngine_setGetQualityValueFunction (CompositeEngine_t *self, composite_engine_getQualityValue_fun getQualityValue)
 The get quality value function.
 
int CompositeEngine_setFillQualityInformationFunction (CompositeEngine_t *self, composite_engine_fillQualityInformation_fun fillQualityInformation)
 The fill quality information function.
 
void CompositeEngine_setProperties (CompositeEngine_t *self, RaveProperties_t *properties)
 Sets the properties in this engine.
 
RaveProperties_tCompositeEngine_getProperties (CompositeEngine_t *self)
 
int CompositeEngine_registerQualityFlagDefinition (CompositeEngine_t *self, CompositeQualityFlagDefinition_t *definition)
 Registers a definition for a quality flag so that correct datatype, offset and gain are used.
 
Cartesian_tCompositeEngine_generate (CompositeEngine_t *self, CompositeArguments_t *arguments, void *extradata)
 Generates the composite using a basic approach.
 

Variables

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

Detailed Description

Provides base functionality for creating composites.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2025-01-31

Macro Definition Documentation

◆ COMPOSITE_ENGINE_DEFAULT_QUALITY_FIELDS_GAIN

#define COMPOSITE_ENGINE_DEFAULT_QUALITY_FIELDS_GAIN   (1.0/UCHAR_MAX)

Default gain for quality fields without type definition.

◆ COMPOSITE_ENGINE_DEFAULT_QUALITY_FIELDS_OFFSET

#define COMPOSITE_ENGINE_DEFAULT_QUALITY_FIELDS_OFFSET   0.0

Default offset for quality fields without type definition.

◆ COMPOSITE_ENGINE_DISTANCE_TO_RADAR_HOW_TASK

#define COMPOSITE_ENGINE_DISTANCE_TO_RADAR_HOW_TASK   "se.smhi.composite.distance.radar"

The name of the task for specifying distance to radar.

◆ COMPOSITE_ENGINE_DISTANCE_TO_RADAR_RESOLUTION

#define COMPOSITE_ENGINE_DISTANCE_TO_RADAR_RESOLUTION   2000.0

The resolution to use for scaling the distance from pixel to used radar.

By multiplying the values in the distance field by 2000, we get the value in unit meters.

◆ COMPOSITE_ENGINE_HEIGHT_ABOVE_SEA_HOW_TASK

#define COMPOSITE_ENGINE_HEIGHT_ABOVE_SEA_HOW_TASK   "se.smhi.composite.height.radar"

The name of the task for specifying height above sea level.

◆ COMPOSITE_ENGINE_HEIGHT_RESOLUTION

#define COMPOSITE_ENGINE_HEIGHT_RESOLUTION   100.0

Same for height, scaled to 100 m resolution up to 25.5 km.

◆ COMPOSITE_ENGINE_RADAR_INDEX_HOW_TASK

#define COMPOSITE_ENGINE_RADAR_INDEX_HOW_TASK   "se.smhi.composite.index.radar"

The name of the task for indexing the radars used.

Typedef Documentation

◆ composite_engine_addQualityFlagsToCartesian_fun

typedef int(* composite_engine_addQualityFlagsToCartesian_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, Cartesian_t *cartesian)

Adds quality flags to the cartesian product.

◆ composite_engine_fillQualityInformation_fun

typedef int(* composite_engine_fillQualityInformation_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, long x, long y, CartesianParam_t *param, double radardist, int radarindex, PolarNavigationInfo *info)

Fills the quality information in the cartesian product.

◆ composite_engine_getLonLat_fun

typedef int(* composite_engine_getLonLat_fun) (CompositeEngine_t *engine, void *extradata, CompositeEngineObjectBinding_t *binding, double herex, double herey, double *olon, double *olat)

Function pointer used during composite generation (CompositeEngine_generate).

Called when translating a surface coordinate into a lon/lat position. Will be called for each pixel in the resulting cartesian product.

Parameters
[in]engine- self
[in]extradata- the extradata passed to the CompositeEngine_generate function.
[in]binding- the object binding
[in]herex- the surface x coordinate
[in]herey- the surface y coordinate
[out]olon- out longitude in radians
[out]olat- out latitude in radians

◆ composite_engine_getPolarValueAtPosition_fun

typedef int(* composite_engine_getPolarValueAtPosition_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *binding, const char *quantity, PolarNavigationInfo *navinfo, const char *qiFieldName, RaveValueType *otype, double *ovalue, double *qivalue)

Function pointer used during composite generation (CompositeEngine_generate) from the default selectRadarData function.

This function is registered for each quantity.

Parameters
[in]extradata- the extradata passed to the CompositeEngine_generate function.
[in]arguments-the arguments used when calling CompositeEngine_generate function.
[in]binding- the object binding
[in]quantity- the quantity
[in]navinfo- navigation info for position in radar data
[in]qiFieldName- name of the quality field if that also should be retrieved
[out]otype- the rave type of value
[out]ovalue- the value
[out]qivalue- the quality value
Returns
1 on success otherwise 0

◆ composite_engine_getQualityValue_fun

typedef int(* composite_engine_getQualityValue_fun) (CompositeEngine_t *self, void *extradata, CompositeArguments_t *args, RaveCoreObject *obj, const char *quantity, const char *qfieldname, PolarNavigationInfo *navinfo, double *v)
Returns
the quality value at specified position (navinfo ei,ri,ai).

◆ composite_engine_onFinished_fun

typedef int(* composite_engine_onFinished_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *bindings, int nbindings)

Will be called after the looping over the cartesian product has finished Gives the user a possibility to perform some final cleanups and checks.

Parameters
[in]engine- self
[in]extradata- the extradata passed to the CompositeEngine_generate function.
[in]arguments- the arguments
[in]bindings- the bindings
[in]nbindings- number of bindings
Returns
0 on failure (and generation will terminate), 1 on success

◆ composite_engine_onStarting_fun

typedef int(* composite_engine_onStarting_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *bindings, int nbindings)

Will be called before the looping over the cartesian product will be done.

Gives the user a possibility to perform some final initializations or checks

Parameters
[in]engine- self
[in]extradata- the extradata passed to the CompositeEngine_generate function.
[in]arguments- the arguments
[in]bindings- the bindings
[in]nbindings- number of bindings
Returns
0 on failure (and generation will terminate), 1 on success

◆ composite_engine_selectRadarData_fun

typedef int(* composite_engine_selectRadarData_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *binding, int index, double olon, double olat, struct CompositeEngineRadarData_t *cvalues, int ncvalues)

Function pointer used during composite generation (CompositeEngine_generate).

Called when identifying the radar values to use. Will fill the cvalues struct for each affected parameter if the polar object data should be used..

Parameters
[in]engine- self
[in]extradata- the extradata passed to the CompositeEngine_generate function.
[in]arguments-the arguments used when calling CompositeEngine_generate function.
[in]binding- the object binding (Not an array)
[in]index- the index of the binding (index of this binding)
[in]olon- longitude in radians
[in]olat- latitude in radians
[in,out]cvalues- the parameter values array to be filled
[in]ncvalues- number of values in the cvalues array
Returns
1 on success otherwise 0

◆ composite_engine_setRadarData_fun

typedef int(* composite_engine_setRadarData_fun) (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, Cartesian_t *cartesian, double olon, double olat, long x, long y, struct CompositeEngineRadarData_t *cvalues, int ncvalues)

Sets the radar data in the cartesian product.

◆ CompositeEngine_t

Defines a Composite engine.

◆ CompositeEngineRadarData_t

typedef struct CompositeEngineRadarData_t CompositeEngineRadarData_t

Contains information required when determining what data point to use.

Function Documentation

◆ CompositeEngine_generate()

Cartesian_t * CompositeEngine_generate ( CompositeEngine_t * self,
CompositeArguments_t * arguments,
void * extradata )

Generates the composite using a basic approach.

◆ CompositeEngine_getProperties()

RaveProperties_t * CompositeEngine_getProperties ( CompositeEngine_t * self)
Parameters
[in]self- self
Returns
the properties or NULL

◆ CompositeEngine_registerPolarValueAtPositionFunction()

int CompositeEngine_registerPolarValueAtPositionFunction ( CompositeEngine_t * self,
const char * quantity,
composite_engine_getPolarValueAtPosition_fun getPolarValueAtPosition )

Registers a polar value at position function for the specified quantity.

This is using the composite utils definition in order to speed up calls instead of looking up for each quantity. This function will use navinfo to retrieve data from wanted position. If getPolarValueAtPosition is NULL, the mapping is removed.

Parameters
[in]self- self
[in]quantity- the quantity that should trigger this call (can be NULL)
[in]getPolarValueAtPosition- the function that will be called for the specified quantity
Returns
1 on success otherwise 0

◆ CompositeEngine_registerQualityFlagDefinition()

int CompositeEngine_registerQualityFlagDefinition ( CompositeEngine_t * self,
CompositeQualityFlagDefinition_t * definition )

Registers a definition for a quality flag so that correct datatype, offset and gain are used.

Parameters
[in]self- self
[in]definition- the definition
Returns
1 on success, otherwise 0

◆ CompositeEngine_setAddQualityFlagsToCartesianFunction()

int CompositeEngine_setAddQualityFlagsToCartesianFunction ( CompositeEngine_t * self,
composite_engine_addQualityFlagsToCartesian_fun addQualityFlagsToCartesian )

Sets the add quality flags to cartesian that will add the quality flags to the cartesian product.

◆ CompositeEngine_setDefaultPolarValueAtPositionFunction()

int CompositeEngine_setDefaultPolarValueAtPositionFunction ( CompositeEngine_t * self,
composite_engine_getPolarValueAtPosition_fun getPolarValueAtPosition )

Sets the default polarValueAtPosition function,.

Parameters
[in]self- self
[in]getPolarValueAtPosition- the function that will be called for the specified quantity
Returns
1 on success otherwise 0

◆ CompositeEngine_setFillQualityInformationFunction()

int CompositeEngine_setFillQualityInformationFunction ( CompositeEngine_t * self,
composite_engine_fillQualityInformation_fun fillQualityInformation )

The fill quality information function.

◆ CompositeEngine_setGetQualityValueFunction()

int CompositeEngine_setGetQualityValueFunction ( CompositeEngine_t * self,
composite_engine_getQualityValue_fun getQualityValue )

The get quality value function.

◆ CompositeEngine_setLonLatFunction()

int CompositeEngine_setLonLatFunction ( CompositeEngine_t * self,
composite_engine_getLonLat_fun getLonLat )

Sets the lon-lat function.

Default is to use standard vol/scan information.

◆ CompositeEngine_setOnFinishedFunction()

int CompositeEngine_setOnFinishedFunction ( CompositeEngine_t * self,
composite_engine_onFinished_fun onFinished )

Sets the on finished function.

◆ CompositeEngine_setOnStartingFunction()

int CompositeEngine_setOnStartingFunction ( CompositeEngine_t * self,
composite_engine_onStarting_fun onStarting )

Sets the on starting function.

◆ CompositeEngine_setProperties()

void CompositeEngine_setProperties ( CompositeEngine_t * self,
RaveProperties_t * properties )

Sets the properties in this engine.

Parameters
[in]self- self
[in]properties- the properties to use

◆ CompositeEngine_setSelectRadarDataFunction()

int CompositeEngine_setSelectRadarDataFunction ( CompositeEngine_t * self,
composite_engine_selectRadarData_fun selectRadarData )

Sets the select radar data function.

Default is to use standard nearest information.

◆ CompositeEngine_setSetRadarDataFunction()

int CompositeEngine_setSetRadarDataFunction ( CompositeEngine_t * self,
composite_engine_setRadarData_fun setRadarData )

Sets the set radar data function.

Default is to set data and quality information.

◆ CompositeEngineFunction_addQualityFlagsToCartesian()

int CompositeEngineFunction_addQualityFlagsToCartesian ( CompositeEngine_t * self,
void * extradata,
CompositeArguments_t * arguments,
Cartesian_t * cartesian )

Adds the quality flags to the cartesian product.

Parameters
[in]self- self
[in]extradata- the extradata, normally the calling instance
[in]arguments- the arguments
[in]cartesian- the cartesian object to write to
Returns
1 on success otherwise false;

◆ CompositeEngineFunction_fillQualityInformation()

int CompositeEngineFunction_fillQualityInformation ( CompositeEngine_t * self,
void * extradata,
CompositeArguments_t * arguments,
long x,
long y,
CartesianParam_t * param,
double radardist,
int radarindex,
PolarNavigationInfo * info )

Fills the quality information into the product.

Parameters
[in]self- self
[in]extradata- the extradata, normally the calling instance
[in]arguments- the arguments
[in]x- the x position in the cartesian parameter
[in]y- the y position in the cartesian parameter
[in]radardist- the distance to the radar
[in]radarindex- index of radar affecting this position
Returns
1 on success otherwise false;

◆ CompositeEngineFunction_getLonLat()

int CompositeEngineFunction_getLonLat ( CompositeEngine_t * self,
void * extradata,
CompositeEngineObjectBinding_t * binding,
double herex,
double herey,
double * olon,
double * olat )

This delegates the call to the set lon-lat function.

Parameters
[in]self- self
[in]extradata- the extradata, normally the calling instance
[in]binding- the object binding to use for getting lon/lat
[in]herex- cartesian surface x
[in]herey- cartesian surface y
[out]olon- the longitude
[out]olat- the latitude
Returns
1 on success otherwise 0

◆ CompositeEngineFunction_getPolarValueAtPosition()

int CompositeEngineFunction_getPolarValueAtPosition ( CompositeEngine_t * self,
void * extradata,
CompositeArguments_t * arguments,
CompositeEngineObjectBinding_t * binding,
const char * quantity,
PolarNavigationInfo * navinfo,
const char * qiFieldName,
RaveValueType * otype,
double * ovalue,
double * qivalue )
Parameters
[in]self- self
[in]extradata- the extradata, normally the calling instance
[in]arguments- the arguments
[in]binding- the object binding
[in]quantity- the parameter from which to get the value
[in]navinfo- the polar navigation info of value
[in]qiFieldName- if a quality value should be fetched at same time
[out]otype- value type of value found
[out]ovalue- the value
[out]qivalue- the quality value if requested.
Returns
1 on success otherwise 0

◆ CompositeEngineFunction_getQualityValue()

int CompositeEngineFunction_getQualityValue ( CompositeEngine_t * self,
void * extradata,
CompositeArguments_t * args,
RaveCoreObject * obj,
const char * quantity,
const char * qfieldname,
PolarNavigationInfo * navinfo,
double * v )

Returns the quality value at specified polar navigation info.

Parameters
[in]self- self
[in]extradata- the extradata, normally the calling instance
[in]args- the arguments
[in]obj- the object from which to pick the value
[in]quantity- the parameter from which to pick value
[in]qfieldname- the how/task value of the quality field
[in]navinfo- the polar navigation info
[out]v- the found quality value
Returns
1 on success otherwise 0

◆ CompositeEngineFunction_onFinished()

int CompositeEngineFunction_onFinished ( CompositeEngine_t * self,
void * extradata,
CompositeArguments_t * arguments,
CompositeEngineObjectBinding_t * bindings,
int nbindings )

Delegates to the onFinished function pointer.

Parameters
[in]self- self
[in]extradata- the extradata, normally the calling instance
[in]arguments- the arguments
[in]bindings- the object binding array
[in]nbindings- the number of objects in the array
Returns
1 on success, 0 on failure and will terminate generation

◆ CompositeEngineFunction_onStarting()

int CompositeEngineFunction_onStarting ( CompositeEngine_t * self,
void * extradata,
CompositeArguments_t * arguments,
CompositeEngineObjectBinding_t * bindings,
int nbindings )

Delegates to the onStarting function pointer.

Parameters
[in]self- self
[in]extradata- the extradata, normally the calling instance
[in]arguments- the arguments
[in]bindings- the bindings
[in]nbindings- number of bindings
Returns
1 on success, 0 on failure and will terminate generation

◆ CompositeEngineFunction_selectRadarData()

int CompositeEngineFunction_selectRadarData ( CompositeEngine_t * self,
void * extradata,
CompositeArguments_t * arguments,
CompositeEngineObjectBinding_t * binding,
int index,
double olon,
double olat,
CompositeEngineRadarData_t * cvalues,
int ncvalues )
Parameters
[in]self- self
[in]extradata- the extradata, normally the calling instance
[in]arguments- the arguments
[in]binding- the object binding to use for getting the data
[in]index- index of the object in the list (used for radarindexing)
[in]olon- the longitude
[in]olat- the latitude
[in,out]cvalues- the composite values that should be filled in
[in]ncvalues- number of values in cvalues

◆ CompositeEngineFunction_setRadarData()

int CompositeEngineFunction_setRadarData ( CompositeEngine_t * self,
void * extradata,
CompositeArguments_t * arguments,
Cartesian_t * cartesian,
double olon,
double olat,
long x,
long y,
CompositeEngineRadarData_t * cvalues,
int ncvalues )
Parameters
[in]self- self
[in]extradata- the extradata, normally the calling instance
[in]arguments- the arguments
[in]cartesian- the cartesian object to write to
[in]olon- the longitude
[in]olat- the latitude
[in]x- x coordinate in cartesian
[in]y- y coordinate in cartesian
[in,out]cvalues- the composite values that should be filled in
[in]ncvalues- number of values in cvalues

◆ CompositeEngineUtility_addQualityFlagsToCartesian()

int CompositeEngineUtility_addQualityFlagsToCartesian ( CompositeEngine_t * engine,
CompositeArguments_t * arguments,
Cartesian_t * cartesian )

Creates the quality fields in the cartesian product using arguments and default parameters.

The default configuration for the quality flags is: static CompositeQualityFlagSettings_t COMPOSITE_ENGINE_QUALITY_FLAG_DEFINITIONS[] = { {COMPOSITE_ENGINE_DISTANCE_TO_RADAR_HOW_TASK, RaveDataType_UCHAR, 0.0, COMPOSITE_ENGINE_DISTANCE_TO_RADAR_RESOLUTION}, {COMPOSITE_ENGINE_HEIGHT_ABOVE_SEA_HOW_TASK, RaveDataType_UCHAR, 0.0, COMPOSITE_ENGINE_HEIGHT_RESOLUTION}, {COMPOSITE_ENGINE_RADAR_INDEX_HOW_TASK, RaveDataType_UCHAR, 0.0, 1.0}, {NULL, RaveDataType_UNDEFINED, 0.0, 0.0} };

Parameters
[in]engine- the engine
[in]arguments- the arguments
[in]cartesian- the cartesian to fill
Returns
1 on success otherwise 0

◆ CompositeEngineUtility_createRadarData()

CompositeEngineRadarData_t * CompositeEngineUtility_createRadarData ( CompositeArguments_t * arguments,
Cartesian_t * cartesian,
int * nentries )

Creates an array of CompositeEngineRadarData_t.

The array length will be the same as number of parameters and the parameter in the struct will be associated with corresponding parameter in the cartesian product.

Parameters
[in]arguments- the arguments structure
[in]cartesian- the cartesian that was created from the arguments
[in]nentries- number of entries in the returned array
Returns
the array on success or NULL on failure

◆ CompositeEngineUtility_fillQualityInformation()

int CompositeEngineUtility_fillQualityInformation ( CompositeEngine_t * self,
void * extradata,
CompositeArguments_t * arguments,
long x,
long y,
CartesianParam_t * param,
double radardist,
int radarindex,
PolarNavigationInfo * navinfo )

Fills the quality information for the provided parameter.

Parameters
[in]self- the engine
[in]extradata- the extradata, typically the data passed to the generate function.
[in]arguments- the arguments
[in]x- the x position in cartesian
[in]y- the y position in cartesian
[in]param- the cartesian parameter to fill
[in]radardist- the distance to the radar for the specified point
[in]radarindex- the radar index in list of objects affected
[in]navinfo- the navigation info used
Returns
1 on success otherwise 0

◆ CompositeEngineUtility_freeRadarData()

void CompositeEngineUtility_freeRadarData ( CompositeEngineRadarData_t ** cvalues,
int nparam )

Frees the CompositeEngineRadarData_t and ensures that all associated parameters are released.

Parameters
[in,out]cvalues- the cvalue struct.
[in]nparam- number of entries in the array

◆ CompositeEngineUtility_getLonLat()

int CompositeEngineUtility_getLonLat ( CompositeEngine_t * engine,
CompositeEngineObjectBinding_t * binding,
double herex,
double herey,
double * olon,
double * olat )

Calculates the lon/lat coordinate using the provided pipeline.

Parameters
[in]engine- the engine
[in]binding- the object binding
[in]herex- the x surface coordinate
[in]herey- the y surface coordinate
[out]olon- the longitude in radians
[out]olat- the latitude in radians
Returns
1 on success otherwise 0

◆ CompositeEngineUtility_getPolarValueAtPosition()

int CompositeEngineUtility_getPolarValueAtPosition ( CompositeEngine_t * engine,
void * extradata,
CompositeArguments_t * arguments,
CompositeEngineObjectBinding_t * binding,
const char * quantity,
PolarNavigationInfo * navinfo,
const char * qiFieldName,
RaveValueType * otype,
double * ovalue,
double * qivalue )

Fetches the polar value from specified position for specified quantity.

◆ CompositeEngineUtility_resetRadarData()

void CompositeEngineUtility_resetRadarData ( CompositeArguments_t * arguments,
CompositeEngineRadarData_t * cvalues,
int nentries )

Resets the array of CompositeEngineRadarData_t except the CartesianParam parameter.

Parameters
[in]arguments- the arguments structure
[in]cvalues- pointer at the array
[in]nentries- number of entries

◆ CompositeEngineUtility_selectRadarData()

int CompositeEngineUtility_selectRadarData ( CompositeEngine_t * engine,
void * extradata,
CompositeArguments_t * arguments,
CompositeEngineObjectBinding_t * binding,
int index,
double olon,
double olat,
CompositeEngineRadarData_t * cvalues,
int ncvalues )

Fetches the radar data for specified position using NEAREST.

Parameters
[in]engine- the engine
[in]arguments- the arguments
[in]binding- the object binding
[in]index- the index in object list (this has to be set in order to get proper radar indexing)
[out]olon- the longitude in radians
[out]olat- the latitude in radians
[in,out]cvalues- the composite parameter values
[in]ncvalues- number of entries in cvalues
Returns
1 on success otherwise 0

◆ CompositeEngineUtility_setRadarData()

int CompositeEngineUtility_setRadarData ( CompositeEngine_t * engine,
void * extradata,
CompositeArguments_t * arguments,
Cartesian_t * cartesian,
double olon,
double olat,
long x,
long y,
CompositeEngineRadarData_t * cvalues,
int ncvalues )

Sets the radar data for specified position using NEAREST.

Will also invoke fillQualityInformation function.

Parameters
[in]engine- the engine
[in]extradata- the extradata passed to the fillQualityInformation
[in]arguments- the arguments
[in]cartesian- the cartesian to fill
[in]olon- the longitude in radians
[in]olat- the latitude in radians
[in]x- the x position in cartesian
[in]y- the y position in cartesian
[in]cvalues- the composite parameter values
[in]ncvalues- number of entries in cvalues
Returns
1 on success otherwise 0

We don't want to calculate vertical max for each overlapping object so we locate vertical max in setter instead

Variable Documentation

◆ CompositeEngine_TYPE

RaveCoreObjectType CompositeEngine_TYPE
extern

Type definition to use when creating a rave object.