RAVE
polarscan.h File Reference

Defines the functions available when working with polar scans. More...

#include "polarnav.h"
#include "projection.h"
#include "polarscanparam.h"
#include "rave_object.h"
#include "rave_types.h"
#include "rave_list.h"
#include "raveobject_list.h"
#include "rave_field.h"
#include "rave_legend.h"

Go to the source code of this file.

Typedefs

typedef struct _PolarScan_t PolarScan_t
 Defines a Polar Scan.
 
typedef enum PolarScanSelectionMethod_t PolarScanSelectionMethod_t
 Enum defining how a an integer value should be selected from a float type-value.
 

Enumerations

enum  PolarScanSelectionMethod_t { PolarScanSelectionMethod_ROUND = 0 , PolarScanSelectionMethod_FLOOR , PolarScanSelectionMethod_CEIL }
 Enum defining how a an integer value should be selected from a float type-value. More...
 

Functions

void PolarScan_setNavigator (PolarScan_t *scan, PolarNavigator_t *navigator)
 Sets a navigator for the polar scan, this is preferrable to use when this scan is included in a volume since the settings will be identical for all scans included in the volume.
 
PolarNavigator_tPolarScan_getNavigator (PolarScan_t *scan)
 Returns the navigator that is used for this scan.
 
void PolarScan_setProjection (PolarScan_t *scan, Projection_t *projection)
 Sets the projection to be used for this scan.
 
Projection_tPolarScan_getProjection (PolarScan_t *scan)
 Returns the current projection for this scan.
 
int PolarScan_setTime (PolarScan_t *scan, const char *value)
 Sets the nominal time.
 
const char * PolarScan_getTime (PolarScan_t *scan)
 Returns the nominal time.
 
int PolarScan_setStartTime (PolarScan_t *scan, const char *value)
 Sets the start time.
 
const char * PolarScan_getStartTime (PolarScan_t *scan)
 Returns the start time.
 
int PolarScan_setEndTime (PolarScan_t *scan, const char *value)
 Sets the end time.
 
const char * PolarScan_getEndTime (PolarScan_t *scan)
 Returns the end time.
 
int PolarScan_setDate (PolarScan_t *scan, const char *value)
 Sets the nominal date.
 
const char * PolarScan_getDate (PolarScan_t *scan)
 Returns the nominal date.
 
int PolarScan_setStartDate (PolarScan_t *scan, const char *value)
 Sets the start date.
 
const char * PolarScan_getStartDate (PolarScan_t *scan)
 Returns the start date.
 
int PolarScan_setEndDate (PolarScan_t *scan, const char *value)
 Sets the end date.
 
const char * PolarScan_getEndDate (PolarScan_t *scan)
 Returns the end date.
 
int PolarScan_setSource (PolarScan_t *scan, const char *value)
 Sets the source.
 
const char * PolarScan_getSource (PolarScan_t *scan)
 Returns the source.
 
void PolarScan_setLongitude (PolarScan_t *scan, double lon)
 Sets the longitude.
 
double PolarScan_getLongitude (PolarScan_t *scan)
 Returns the longitude.
 
void PolarScan_setLatitude (PolarScan_t *scan, double lat)
 Sets the latitude.
 
double PolarScan_getLatitude (PolarScan_t *scan)
 Returns the latitude.
 
void PolarScan_setHeight (PolarScan_t *scan, double height)
 Sets the height.
 
double PolarScan_getHeight (PolarScan_t *scan)
 Returns the height.
 
double PolarScan_getDistance (PolarScan_t *scan, double lon, double lat)
 Returns the distance from the radar to the specified lon/lat coordinate pair.
 
double PolarScan_getMaxDistance (PolarScan_t *scan)
 Returns the maximum distance (at ground level) that this scan will cover.
 
void PolarScan_setElangle (PolarScan_t *scan, double elangle)
 Sets the elevation angle for the scan.
 
double PolarScan_getElangle (PolarScan_t *scan)
 Returns the elevation angle for the scan.
 
long PolarScan_getNbins (PolarScan_t *scan)
 Returns the number of bins.
 
void PolarScan_setRscale (PolarScan_t *scan, double rscale)
 Sets the range scale for the scan.
 
double PolarScan_getRscale (PolarScan_t *scan)
 Returns the range bin scale for the scan.
 
long PolarScan_getNrays (PolarScan_t *scan)
 Returns the number of rays/scan.
 
void PolarScan_setRstart (PolarScan_t *scan, double rstart)
 Sets the ray start for the scan.
 
double PolarScan_getRstart (PolarScan_t *scan)
 Returns the ray start for the scan.
 
RaveDataType PolarScan_getDataType (PolarScan_t *scan)
 Returns the data type.
 
void PolarScan_setA1gate (PolarScan_t *scan, long a1gate)
 Sets the a1gate.
 
long PolarScan_getA1gate (PolarScan_t *scan)
 Returns the a1gate.
 
void PolarScan_setBeamwidth (PolarScan_t *scan, double beamwidth)
 Sets the horizontal beamwidth (same as PolarScan_setBeamwH).
 
double PolarScan_getBeamwidth (PolarScan_t *scan)
 Returns the horizontal beamwidth (same as PolarScan_getBeamwH).
 
void PolarScan_setBeamwH (PolarScan_t *scan, double beamwidth)
 Sets the horizontal beamwidth.
 
double PolarScan_getBeamwH (PolarScan_t *scan)
 Returns the horizontal beamwidth.
 
void PolarScan_setBeamwV (PolarScan_t *scan, double beamwidth)
 Sets the vertical beamwidth.
 
double PolarScan_getBeamwV (PolarScan_t *scan)
 Returns the vertical beamwidth.
 
int PolarScan_setDefaultParameter (PolarScan_t *scan, const char *quantity)
 Sets the default parameter for this scan.
 
const char * PolarScan_getDefaultParameter (PolarScan_t *scan)
 Returns the currently specified default parameter name.
 
int PolarScan_addParameter (PolarScan_t *scan, PolarScanParam_t *parameter)
 Adds a parameter to the polar scan.
 
PolarScanParam_tPolarScan_removeParameter (PolarScan_t *scan, const char *quantity)
 Removes (and returns) the parameter that is specified by the quantity.
 
int PolarScan_removeAllParameters (PolarScan_t *scan)
 Removes all parameters that are in the scan as well as dereferencing the default parameter.
 
PolarScanParam_tPolarScan_getParameter (PolarScan_t *scan, const char *quantity)
 Returns the parameter that is specified by the quantity.
 
RaveObjectList_tPolarScan_getParameters (PolarScan_t *scan)
 Returns all parameters belonging to this scan.
 
int PolarScan_hasParameter (PolarScan_t *scan, const char *quantity)
 Returns if the scan contains the specified parameter or not.
 
RaveList_tPolarScan_getParameterNames (PolarScan_t *scan)
 Returns this scans parameter names.
 
int PolarScan_addQualityField (PolarScan_t *scan, RaveField_t *field)
 Adds a quality field to this scan.
 
int PolarScan_addOrReplaceQualityField (PolarScan_t *scan, RaveField_t *field)
 Adds or replaces a quality field.
 
RaveField_tPolarScan_getQualityField (PolarScan_t *scan, int index)
 Returns the quality field at the specified location.
 
int PolarScan_getNumberOfQualityFields (PolarScan_t *scan)
 Returns the number of quality fields.
 
void PolarScan_removeQualityField (PolarScan_t *scan, int index)
 Removes the quality field at the specified location.
 
RaveObjectList_tPolarScan_getQualityFields (PolarScan_t *scan)
 Returns all quality fields belonging to this scan.
 
RaveField_tPolarScan_getQualityFieldByHowTask (PolarScan_t *scan, const char *value)
 Returns a quality field based on the value of how/task that should be a string.
 
RaveField_tPolarScan_findQualityFieldByHowTask (PolarScan_t *scan, const char *value, const char *quantity)
 Atempts to locate a quality field with how/task = value.
 
RaveField_tPolarScan_findAnyQualityFieldByHowTask (PolarScan_t *scan, const char *value)
 Basically the same as PolarScan_findQualityFieldByHowTask with the exception that all quantities are searched until first occurance is found.
 
int PolarScan_getRangeIndex (PolarScan_t *scan, double r, PolarScanSelectionMethod_t selectionMethod, int rangeMidpoint)
 Returns the range index for the specified range (in meters).
 
double PolarScan_getRange (PolarScan_t *scan, int ri, int rangeMidpoint)
 Returns the range for the specified range index.
 
void PolarScan_setUseAzimuthalNavInformation (PolarScan_t *self, int v)
 Sets if the azimuthal nav information (astart / startazA / stopazA) should be used when calculating azimuthal index.
 
int PolarScan_useAzimuthalNavInformation (PolarScan_t *self)
 Returns if the azimuthal nav information should be used or not.
 
int PolarScan_getNorthmostIndex (PolarScan_t *self)
 Returns the nothmost index by checking the occurance of startazA/stopazA and the index of the angle closest to north.
 
int PolarScan_getRotationRequiredToNorthmost (PolarScan_t *self)
 Returns the rotation needed to to get the first ray in the scan to be the north most ray.
 
int PolarScan_getAzimuthIndex (PolarScan_t *scan, double a, PolarScanSelectionMethod_t selectionMethod)
 Returns the azimuth index for the specified azimuth.
 
double PolarScan_getAzimuth (PolarScan_t *scan, int ai)
 Returns the azimuth for the specified azimuth index.
 
int PolarScan_setValue (PolarScan_t *scan, int bin, int ray, double v)
 Sets the value at the specified position.
 
int PolarScan_setParameterValue (PolarScan_t *scan, const char *quantity, int bin, int ray, double v)
 Sets the parameter value at the specified position.
 
RaveValueType PolarScan_getValue (PolarScan_t *scan, int bin, int ray, double *v)
 Returns the value at the specified index.
 
RaveValueType PolarScan_getParameterValue (PolarScan_t *scan, const char *quantity, int bin, int ray, double *v)
 Returns the parameter value at the specified index.
 
RaveValueType PolarScan_getConvertedValue (PolarScan_t *scan, int bin, int ray, double *v)
 Returns the linear converted value at the specified index.
 
RaveValueType PolarScan_getConvertedParameterValue (PolarScan_t *scan, const char *quantity, int bin, int ray, double *v)
 Returns the linear converted parameter value at the specified index.
 
int PolarScan_getIndexFromAzimuthAndRange (PolarScan_t *scan, double a, double r, PolarScanSelectionMethod_t azimuthSelectionMethod, PolarScanSelectionMethod_t rangeSelectionMethod, int rangeMidpoint, int *ray, int *bin)
 Returns the bin and ray index from a specified azimuth and range.
 
int PolarScan_getAzimuthAndRangeFromIndex (PolarScan_t *scan, int bin, int ray, double *a, double *r)
 Calculates the azimuth and range from bin and ray index.
 
RaveValueType PolarScan_getValueAtAzimuthAndRange (PolarScan_t *scan, double a, double r, int convert, double *v)
 Gets the value at the provided azimuth and range.
 
RaveValueType PolarScan_getParameterValueAtAzimuthAndRange (PolarScan_t *scan, const char *quantity, double a, double r, double *v)
 Returns the parameter value at the specified azimuth and range.
 
RaveValueType PolarScan_getConvertedParameterValueAtAzimuthAndRange (PolarScan_t *scan, const char *quantity, double a, double r, double *v)
 Returns the converted value at the specified azimuth and range.
 
void PolarScan_getLonLatNavigationInfo (PolarScan_t *scan, double lon, double lat, PolarNavigationInfo *info)
 Returns the navigation information that is the result from finding the lon/lat-coordinate for this scan.
 
int PolarScan_fillNavigationIndexFromAzimuthAndRange (PolarScan_t *scan, PolarScanSelectionMethod_t azimuthSelectionMethod, PolarScanSelectionMethod_t rangeSelectionMethod, int rangeMidpoint, PolarNavigationInfo *info)
 Calculates range and elevation index from the azimuth and range in the info object.
 
RaveValueType PolarScan_getNearest (PolarScan_t *scan, double lon, double lat, int convert, double *v)
 Returns the nearest value to the specified longitude, latitude.
 
RaveValueType PolarScan_getNearestParameterValue (PolarScan_t *scan, const char *quantity, double lon, double lat, double *v)
 Returns the nearest parameter value to the specified longitude, latitude.
 
int PolarScan_addSurroundingNavigationInfosForTarget (PolarScan_t *scan, PolarNavigationInfo *targetNavInfo, int surroundingRangeBins, int surroundingRays, int noofNavinfos, PolarNavigationInfo navinfos[])
 Appends navigation info structs to array, based on a target navigation info struct and input parameters.
 
int PolarScan_getSurroundingNavigationInfos (PolarScan_t *scan, double lon, double lat, int surroundingRangeBins, int surroundingRays, PolarNavigationInfo navinfos[])
 Returns an array of surrounding navigation info structs for the specified lon/lat.
 
int PolarScan_getNearestNavigationInfo (PolarScan_t *scan, double lon, double lat, PolarNavigationInfo *navinfo)
 Returns the navigation information for the specified lon/lat.
 
RaveValueType PolarScan_getNearestConvertedParameterValue (PolarScan_t *scan, const char *quantity, double lon, double lat, double *v, PolarNavigationInfo *navinfo)
 Returns the nearest converted parameter value to the specified longitude, latitude.
 
int PolarScan_getNearestIndex (PolarScan_t *scan, double lon, double lat, int *bin, int *ray)
 Returns the nearest index to the specified long/lat pair.
 
int PolarScan_getLonLatFromIndex (PolarScan_t *scan, int bin, int ray, double *lon, double *lat)
 Calculates the lon / lat from the index with the adjusted elevation angle.
 
int PolarScan_getQualityValueAt (PolarScan_t *scan, const char *quantity, int ri, int ai, const char *name, int convert, double *v)
 Returns the quality value for the quality field that has a name matching the how/task attribute in the list of fields.
 
int PolarScan_isTransformable (PolarScan_t *scan)
 Verifies that all preconditions are met in order to perform a transformation.
 
int PolarScan_addAttribute (PolarScan_t *scan, RaveAttribute_t *attribute)
 Adds a rave attribute to the scan.
 
int PolarScan_addAttributeVersion (PolarScan_t *scan, RaveAttribute_t *attribute, RaveIO_ODIM_Version version)
 Adds a rave attribute to the scan and specifies the odim version as well.
 
void PolarScan_removeAttribute (PolarScan_t *scan, const char *attrname)
 Removes a rave attribute from the scan.
 
RaveAttribute_tPolarScan_getAttribute (PolarScan_t *scan, const char *name)
 Returns the rave attribute that is named accordingly.
 
RaveAttribute_tPolarScan_getAttributeVersion (PolarScan_t *scan, const char *name, RaveIO_ODIM_Version version)
 Returns the rave attribute that is named accordingly for specified version.
 
int PolarScan_hasAttribute (PolarScan_t *scan, const char *name)
 Returns if the specified attribute exists.
 
RaveList_tPolarScan_getAttributeNames (PolarScan_t *scan)
 Returns a list of attribute names.
 
RaveList_tPolarScan_getAttributeNamesVersion (PolarScan_t *scan, RaveIO_ODIM_Version version)
 Returns a list of attribute names for specified version.
 
RaveObjectList_tPolarScan_getAttributeValues (PolarScan_t *scan)
 Returns a list of attribute values belonging to this scan.
 
RaveObjectList_tPolarScan_getAttributeValuesVersion (PolarScan_t *scan, RaveIO_ODIM_Version version)
 Returns a list of attribute values belonging to this scan for the specified version.
 
int PolarScan_shiftAttribute (PolarScan_t *scan, const char *name, int nx)
 Performs a circular shift of an array attribute.
 
int PolarScan_isValid (PolarScan_t *scan, Rave_ObjectType otype)
 Validates the scan can be seen to be valid regarding storage.
 
PolarScan_tPolarScan_createFromScanAndField (PolarScan_t *self, RaveField_t *field)
 Creates a new scan with settings from the scan and data is defined by the field.
 
RaveField_tPolarScan_getDistanceField (PolarScan_t *self)
 Gets the distance field for self.
 
RaveField_tPolarScan_getHeightField (PolarScan_t *self)
 Gets the height field for self.
 
int PolarScan_shiftData (PolarScan_t *self, int nrays)
 Performs a circular shift of the datasets that are associated with this scan.
 
int PolarScan_shiftDataAndAttributes (PolarScan_t *self, int nrays)
 Performs a circular shift of the datsets that are associated with the scan and also all attributes that are associated with the rays.
 
int PolarScan_removeParametersExcept (PolarScan_t *scan, RaveList_t *parameters)
 Removes all parameters from a scan except the ones specified in parameters (list of strings)
 
void PolarScanInternal_setPolarVolumeBeamwH (PolarScan_t *scan, double bw)
 Framework internal function for setting the beamwidth in a scan, used to indicate that the beamwidth comes from the polar volume.
 
void PolarScanInternal_setPolarVolumeBeamwV (PolarScan_t *scan, double bw)
 Framework internal function for setting the beamwidth in a scan, used to indicate that the beamwidth comes from the polar volume.
 
int PolarScanInternal_isPolarVolumeBeamwH (PolarScan_t *scan)
 Returns if the beamwidth comes from a volume or not.
 
int PolarScanInternal_isPolarVolumeBeamwV (PolarScan_t *scan)
 Returns if the beamwidth comes from a volume or not.
 

Variables

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

Detailed Description

Defines the functions available when working with polar scans.

This object supports RAVE_OBJECT_CLONE.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-10-15

Typedef Documentation

◆ PolarScan_t

typedef struct _PolarScan_t PolarScan_t

Defines a Polar Scan.

◆ PolarScanSelectionMethod_t

Enum defining how a an integer value should be selected from a float type-value.

Enumeration Type Documentation

◆ PolarScanSelectionMethod_t

Enum defining how a an integer value should be selected from a float type-value.

Function Documentation

◆ PolarScan_addAttribute()

int PolarScan_addAttribute ( PolarScan_t * scan,
RaveAttribute_t * attribute )

Adds a rave attribute to the scan.

Parameters
[in]scan- self
[in]attribute- the attribute
Returns
1 on success otherwise 0

◆ PolarScan_addAttributeVersion()

int PolarScan_addAttributeVersion ( PolarScan_t * scan,
RaveAttribute_t * attribute,
RaveIO_ODIM_Version version )

Adds a rave attribute to the scan and specifies the odim version as well.

NOTE! This method is usually only used internally.

Parameters
[in]scan- self
[in]attribute- the attribute
[in]version- the attribute version
Returns
1 on success otherwise 0

◆ PolarScan_addOrReplaceQualityField()

int PolarScan_addOrReplaceQualityField ( PolarScan_t * scan,
RaveField_t * field )

Adds or replaces a quality field.

The field is replaced if the field contains a how/task attribute and it already exists another quality field with the same how/task name.

Parameters
[in]scan- self
[in]field- the field to add or replace
Returns
1 on success otherwise 0

◆ PolarScan_addParameter()

int PolarScan_addParameter ( PolarScan_t * scan,
PolarScanParam_t * parameter )

Adds a parameter to the polar scan.

Note, if there already exists a parameter with the same quantity, that parameter will be replaced by this. Also, several consistency checks will be performed to ensure that dimensions and similar are the same for all parameters that are added.

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

◆ PolarScan_addQualityField()

int PolarScan_addQualityField ( PolarScan_t * scan,
RaveField_t * field )

Adds a quality field to this scan.

Parameters
[in]scan- self
[in]field- the field to add
Returns
1 on success otherwise 0

◆ PolarScan_addSurroundingNavigationInfosForTarget()

int PolarScan_addSurroundingNavigationInfosForTarget ( PolarScan_t * scan,
PolarNavigationInfo * targetNavInfo,
int surroundingRangeBins,
int surroundingRays,
int noofNavinfos,
PolarNavigationInfo navinfos[] )

Appends navigation info structs to array, based on a target navigation info struct and input parameters.

The added navigation infos will represent positions surrounding the position of the target navigation info in range and azimuth dimensions. The parameters surroundingRangeBins and surroundingRays controls whether positions on both sides of the target shall be added, or only the closest.

Parameters
[in]scan- the scan
[in]targetNavInfo- the target navigation info
[in]surroundingRangeBins- boolean indicating whether surrounding or only closest range bin shall be added. 0 for closest, surrounding otherwise.
[in]surroundingRays- boolean indicating whether surrounding or only closest rays/azimuths shall be added. 0 for closest, surrounding otherwise.
[in]noofNavinfos- no of valid elements in the navinfos array at function call
[in,out]navinfos- array of navigation infos. will be updated with surrounding navigation infos
Returns
no of valid elements in navinfos array after additions

◆ PolarScan_createFromScanAndField()

PolarScan_t * PolarScan_createFromScanAndField ( PolarScan_t * self,
RaveField_t * field )

Creates a new scan with settings from the scan and data is defined by the field.

Since the field does not necessarily define the quantity the default parameter will either be UNKNOWN or the how/quantity value from the field.

Parameters
[in]self- self
[in]field- the data field to use
Returns
a polar scan on success otherwise NULL

◆ PolarScan_fillNavigationIndexFromAzimuthAndRange()

int PolarScan_fillNavigationIndexFromAzimuthAndRange ( PolarScan_t * scan,
PolarScanSelectionMethod_t azimuthSelectionMethod,
PolarScanSelectionMethod_t rangeSelectionMethod,
int rangeMidpoint,
PolarNavigationInfo * info )

Calculates range and elevation index from the azimuth and range in the info object.

Parameters
[in]scan- self
[in]azimuthSelectionMethod- defines how azimuth index shall be selected. 'ceiled', 'floored' or 'rounded'
[in]rangeSelectionMethod- defines how range index shall be selected. 'ceiled', 'floored' or 'rounded'
[in]rangeMidpoint- defines whether range should be calculated from range midpoints or from their starting points. 0 for using starting points and other values for midpoints.
[in,out]info- Will use info.azimuth and info.range to calculate info.ai and info.ri
Returns
1 if indexes are in range, otherwise 0

◆ PolarScan_findAnyQualityFieldByHowTask()

RaveField_t * PolarScan_findAnyQualityFieldByHowTask ( PolarScan_t * scan,
const char * value )

Basically the same as PolarScan_findQualityFieldByHowTask with the exception that all quantities are searched until first occurance is found.

Parameters
[in]scan- self
[in]value- the how/task value
Returns
the field if found, otherwise NULL

◆ PolarScan_findQualityFieldByHowTask()

RaveField_t * PolarScan_findQualityFieldByHowTask ( PolarScan_t * scan,
const char * value,
const char * quantity )

Atempts to locate a quality field with how/task = value.

First it will check in the default parameter, then it will check the scan it self.

Parameters
[in]scan- self
[in]value- the how/task value
[in]quantity- the parameter to search in. If NULL, then default parameter will be searched.
Returns
the field if found, otherwise NULL

◆ PolarScan_getA1gate()

long PolarScan_getA1gate ( PolarScan_t * scan)

Returns the a1gate.

Parameters
[in]scan- the scan
Returns
the a1gate

◆ PolarScan_getAttribute()

RaveAttribute_t * PolarScan_getAttribute ( PolarScan_t * scan,
const char * name )

Returns the rave attribute that is named accordingly.

Parameters
[in]scan- self
[in]name- the name of the attribute
Returns
the attribute if found otherwise NULL

◆ PolarScan_getAttributeNames()

RaveList_t * PolarScan_getAttributeNames ( PolarScan_t * scan)

Returns a list of attribute names.

Release with @ref RaveList_freeAndDestroy.

Parameters
[in]scan- self
Returns
a list of attribute names

◆ PolarScan_getAttributeNamesVersion()

RaveList_t * PolarScan_getAttributeNamesVersion ( PolarScan_t * scan,
RaveIO_ODIM_Version version )

Returns a list of attribute names for specified version.

Release with @ref RaveList_freeAndDestroy. NOTE! This method is usually only used internally.

Parameters
[in]scan- self
[in]version- the attribute version
Returns
a list of attribute names

◆ PolarScan_getAttributeValues()

RaveObjectList_t * PolarScan_getAttributeValues ( PolarScan_t * scan)

Returns a list of attribute values belonging to this scan.

Parameters
[in]scan- self
Returns
a list of RaveAttributes.

◆ PolarScan_getAttributeValuesVersion()

RaveObjectList_t * PolarScan_getAttributeValuesVersion ( PolarScan_t * scan,
RaveIO_ODIM_Version version )

Returns a list of attribute values belonging to this scan for the specified version.

NOTE! This method is usually only used internally.

Parameters
[in]scan- self
[in]version- the attribute version
Returns
a list of RaveAttributes.

◆ PolarScan_getAttributeVersion()

RaveAttribute_t * PolarScan_getAttributeVersion ( PolarScan_t * scan,
const char * name,
RaveIO_ODIM_Version version )

Returns the rave attribute that is named accordingly for specified version.

NOTE! This method is usually only used internally.

Parameters
[in]scan- self
[in]name- the name of the attribute
[in]version- the attribute version
Returns
the attribute if found otherwise NULL

◆ PolarScan_getAzimuth()

double PolarScan_getAzimuth ( PolarScan_t * scan,
int ai )

Returns the azimuth for the specified azimuth index.

If something goes wrong a negative value will be returned.

Parameters
[in]scan- self
[in]ai- azimuth index
Returns
the azimuth or a negative value upon bad input

◆ PolarScan_getAzimuthAndRangeFromIndex()

int PolarScan_getAzimuthAndRangeFromIndex ( PolarScan_t * scan,
int bin,
int ray,
double * a,
double * r )

Calculates the azimuth and range from bin and ray index.

Parameters
[in]scan- self
[in]bin- the bin index
[in]ray- the ray index
[out]a- azimuth
[out]r- range
Returns
1 on success otherwise 0

◆ PolarScan_getAzimuthIndex()

int PolarScan_getAzimuthIndex ( PolarScan_t * scan,
double a,
PolarScanSelectionMethod_t selectionMethod )

Returns the azimuth index for the specified azimuth.

Parameters
[in]scan- the scan
[in]a- the azimuth (in radians)
[in]selectionMethod- defines how azimuth index shall be selected. 'ceiled', 'floored' or 'rounded'
Returns
-1 on failure, otherwise a index between 0 and nrays.

Best first guess where we try to find the index closest directly. Since the angles always will increasing / decreasing we can test index before and after to see if we have found best fit immediately. If not we either search backward or forward and break when we are starting to get increased angles again.

◆ PolarScan_getBeamwH()

double PolarScan_getBeamwH ( PolarScan_t * scan)

Returns the horizontal beamwidth.

Default is 1.0 * M_PI/360.0.

Parameters
[in]scan- the polar scan
Returns
the beam width om radians

◆ PolarScan_getBeamwidth()

double PolarScan_getBeamwidth ( PolarScan_t * scan)

Returns the horizontal beamwidth (same as PolarScan_getBeamwH).

Default is 1.0 * M_PI/360.0.

Parameters
[in]scan- the polar scan
Returns
the beam width om radians

◆ PolarScan_getBeamwV()

double PolarScan_getBeamwV ( PolarScan_t * scan)

Returns the vertical beamwidth.

Default is 1.0 * M_PI/360.0.

Parameters
[in]scan- the polar scan
Returns
the beam width om radians

◆ PolarScan_getConvertedParameterValue()

RaveValueType PolarScan_getConvertedParameterValue ( PolarScan_t * scan,
const char * quantity,
int bin,
int ray,
double * v )

Returns the linear converted parameter value at the specified index.

That is, offset + gain * value;

Parameters
[in]scan- the scan
[in]quantity- the parameter (MAY NOT BE NULL)
[in]bin- the bin index
[in]ray- the ray index
[out]v- the data at the specified index
Returns
the type of data

◆ PolarScan_getConvertedParameterValueAtAzimuthAndRange()

RaveValueType PolarScan_getConvertedParameterValueAtAzimuthAndRange ( PolarScan_t * scan,
const char * quantity,
double a,
double r,
double * v )

Returns the converted value at the specified azimuth and range.

Parameters
[in]scan- self
[in]quantity- the parameter name
[in]a- the azimuth (in radians)
[in]r- the range (in meters)
[out]v- the value
Returns
a rave value type (if scan does not contain specified parameter, RaveValueType_UNDEFINED will be returned).

◆ PolarScan_getConvertedValue()

RaveValueType PolarScan_getConvertedValue ( PolarScan_t * scan,
int bin,
int ray,
double * v )

Returns the linear converted value at the specified index.

That is, offset + gain * value;

Parameters
[in]scan- the scan
[in]bin- the bin index
[in]ray- the ray index
[out]v- the data at the specified index
Returns
the type of data

◆ PolarScan_getDataType()

RaveDataType PolarScan_getDataType ( PolarScan_t * scan)

Returns the data type.

Parameters
[in]scan- the scan
Returns
the data type

◆ PolarScan_getDate()

const char * PolarScan_getDate ( PolarScan_t * scan)

Returns the nominal date.

Parameters
[in]scan- self
Returns
the nominal time (or NULL if there is none)

◆ PolarScan_getDefaultParameter()

const char * PolarScan_getDefaultParameter ( PolarScan_t * scan)

Returns the currently specified default parameter name.

Parameters
[in]scan- self
Returns
the default parameter name

◆ PolarScan_getDistance()

double PolarScan_getDistance ( PolarScan_t * scan,
double lon,
double lat )

Returns the distance from the radar to the specified lon/lat coordinate pair.

Parameters
[in]scan- self
[in]lon- the longitude
[in]lat- the latitude
Returns
the distance in meters.

◆ PolarScan_getDistanceField()

RaveField_t * PolarScan_getDistanceField ( PolarScan_t * self)

Gets the distance field for self.

Will always be a 1-dimensional array with nbins length. The distance represents the distance on ground to get to the same position as the bin location.

Parameters
[in]self- self
Returns
the distance field

◆ PolarScan_getElangle()

double PolarScan_getElangle ( PolarScan_t * scan)

Returns the elevation angle for the scan.

Parameters
[in]scan- the scan
Returns
the elevation angle

◆ PolarScan_getEndDate()

const char * PolarScan_getEndDate ( PolarScan_t * scan)

Returns the end date.

Parameters
[in]scan- self
Returns
the end date (or NULL if there is none)

◆ PolarScan_getEndTime()

const char * PolarScan_getEndTime ( PolarScan_t * scan)

Returns the end time.

Parameters
[in]scan- self
Returns
the end time (or NULL if there is none)

◆ PolarScan_getHeight()

double PolarScan_getHeight ( PolarScan_t * scan)

Returns the height.

Parameters
[in]scan- self
Returns
the height

◆ PolarScan_getHeightField()

RaveField_t * PolarScan_getHeightField ( PolarScan_t * self)

Gets the height field for self.

Will always be a 1-dimensional array with nbins length. The height represents the altitude for the bin

Parameters
[in]self- self
Returns
the height field

◆ PolarScan_getIndexFromAzimuthAndRange()

int PolarScan_getIndexFromAzimuthAndRange ( PolarScan_t * scan,
double a,
double r,
PolarScanSelectionMethod_t azimuthSelectionMethod,
PolarScanSelectionMethod_t rangeSelectionMethod,
int rangeMidpoint,
int * ray,
int * bin )

Returns the bin and ray index from a specified azimuth and range.

Parameters
[in]scan- self (MAY NOT BE NULL)
[in]a- the azimuth (in radians)
[in]r- the range (in meters)
[in]azimuthSelectionMethod- defines how azimuth index shall be selected. 'ceiled', 'floored' or 'rounded'
[in]rangeSelectionMethod- defines how range index shall be selected. 'ceiled', 'floored' or 'rounded'
[in]rangeMidpoint- defines whether range should be calculated from range midpoints or from their starting points. 0 for using starting points and other values for midpoints.
[out]ray- the ray index (MAY NOT BE NULL)
[out]bin- the bin index (MAY NOT BE NULL)
Returns
1 on success, otherwise 0 and in that case, bin and ray can not be relied on.

◆ PolarScan_getLatitude()

double PolarScan_getLatitude ( PolarScan_t * scan)

Returns the latitude.

Parameters
[in]scan- self
Returns
the latitude

◆ PolarScan_getLongitude()

double PolarScan_getLongitude ( PolarScan_t * scan)

Returns the longitude.

Parameters
[in]scan- self
Returns
the longitude

◆ PolarScan_getLonLatFromIndex()

int PolarScan_getLonLatFromIndex ( PolarScan_t * scan,
int bin,
int ray,
double * lon,
double * lat )

Calculates the lon / lat from the index with the adjusted elevation angle.

Beamwidth will also be taken into account. Which means that the maximum position will be on the edges of the beam.

Parameters
[in]scan- self @þaram[in] bin - the bin index
[in]ray- the ray index
[out]lon- the longitude in radians
[out]lat- the latitude in radians
Returns
1 on success otherwise 0

◆ PolarScan_getLonLatNavigationInfo()

void PolarScan_getLonLatNavigationInfo ( PolarScan_t * scan,
double lon,
double lat,
PolarNavigationInfo * info )

Returns the navigation information that is the result from finding the lon/lat-coordinate for this scan.

Parameters
[in]scan- self
[in]lon- the longitude (in radians)
[in]lat- the latitude (in radians)
[in,out]info- the navigation information

◆ PolarScan_getMaxDistance()

double PolarScan_getMaxDistance ( PolarScan_t * scan)

Returns the maximum distance (at ground level) that this scan will cover.

Parameters
[in]scan
Returns
the maximum distance in meters

◆ PolarScan_getNavigator()

PolarNavigator_t * PolarScan_getNavigator ( PolarScan_t * scan)

Returns the navigator that is used for this scan.

Parameters
[in]scan- the scan
Returns
the polar navigator

◆ PolarScan_getNbins()

long PolarScan_getNbins ( PolarScan_t * scan)

Returns the number of bins.

Parameters
[in]scan- the scan
Returns
the number of bins

◆ PolarScan_getNearest()

RaveValueType PolarScan_getNearest ( PolarScan_t * scan,
double lon,
double lat,
int convert,
double * v )

Returns the nearest value to the specified longitude, latitude.

Parameters
[in]scan- the scan
[in]lon- the longitude (in radians)
[in]lat- the latitude (in radians)
[in]convert- indicates if value should be converted with gain and offset or not. 0 for false, true otherwise
[out]v- the found value
Returns
a rave value type

◆ PolarScan_getNearestConvertedParameterValue()

RaveValueType PolarScan_getNearestConvertedParameterValue ( PolarScan_t * scan,
const char * quantity,
double lon,
double lat,
double * v,
PolarNavigationInfo * navinfo )

Returns the nearest converted parameter value to the specified longitude, latitude.

Parameters
[in]scan- the scan
[in]quantity- the quantity
[in]lon- the longitude (in radians)
[in]lat- the latitude (in radians)
[out]v- the found value
[in,out]navinfo- the navigation information (may be NULL)
Returns
a rave value type

◆ PolarScan_getNearestIndex()

int PolarScan_getNearestIndex ( PolarScan_t * scan,
double lon,
double lat,
int * bin,
int * ray )

Returns the nearest index to the specified long/lat pair.

Parameters
[in]scan- self
[in]lon- the longitude (in radians)
[in]lat- the latitude (in radians)
[out]bin- the bin index (MAY NOT BE NULL)
[out]ray- the ray index (MAY NOT BE NULL)
Returns
0 if either bin and/or ray is outside boundaries, otherwise 1

◆ PolarScan_getNearestNavigationInfo()

int PolarScan_getNearestNavigationInfo ( PolarScan_t * scan,
double lon,
double lat,
PolarNavigationInfo * navinfo )

Returns the navigation information for the specified lon/lat.

Parameters
[in]scan- self
[in]lon- longitude (in radians)
[in]lat- latitude (in radians)
[in,out]navinfo- the navigation information (MAY NOT BE NULL)
Returns
1 if navigation info is in range of scan otherwise 0

◆ PolarScan_getNearestParameterValue()

RaveValueType PolarScan_getNearestParameterValue ( PolarScan_t * scan,
const char * quantity,
double lon,
double lat,
double * v )

Returns the nearest parameter value to the specified longitude, latitude.

Parameters
[in]scan- the scan
[in]quantity- the quantity
[in]lon- the longitude (in radians)
[in]lat- the latitude (in radians)
[out]v- the found value
Returns
a rave value type

◆ PolarScan_getNorthmostIndex()

int PolarScan_getNorthmostIndex ( PolarScan_t * self)

Returns the nothmost index by checking the occurance of startazA/stopazA and the index of the angle closest to north.

If startazA/stopazA doesn't exist. This method will always return 0.

Parameters
[in]self- self
Returns
the index of the northmost ray

◆ PolarScan_getNrays()

long PolarScan_getNrays ( PolarScan_t * scan)

Returns the number of rays/scan.

Parameters
[in]scan- the scan
Returns
the number of rays

◆ PolarScan_getNumberOfQualityFields()

int PolarScan_getNumberOfQualityFields ( PolarScan_t * scan)

Returns the number of quality fields.

Parameters
[in]scan- self
Returns
the number of quality fields

◆ PolarScan_getParameter()

PolarScanParam_t * PolarScan_getParameter ( PolarScan_t * scan,
const char * quantity )

Returns the parameter that is specified by the quantity.

Note, since the parameter returned is inc-refed, remember to release it.

Parameters
[in]scan- self
[in]key- the quantity name
Returns
NULL if nothing found or the parameter if it exists.

◆ PolarScan_getParameterNames()

RaveList_t * PolarScan_getParameterNames ( PolarScan_t * scan)

Returns this scans parameter names.

Parameters
[in]scan- self
Returns
this scans contained parameters. NULL on failure. Use RaveList_freeAndDestroy to destroy

◆ PolarScan_getParameters()

RaveObjectList_t * PolarScan_getParameters ( PolarScan_t * scan)

Returns all parameters belonging to this scan.

Parameters
[in]scan- self
Returns
a list of 0 or more parameters on success otherwise NULL.

◆ PolarScan_getParameterValue()

RaveValueType PolarScan_getParameterValue ( PolarScan_t * scan,
const char * quantity,
int bin,
int ray,
double * v )

Returns the parameter value at the specified index.

Parameters
[in]scan- self
[in]quantity- the parameter (MAY NOT be NULL)
[in]bin- the bin index
[in]ray- the ray index
[out]v- the found value

◆ PolarScan_getParameterValueAtAzimuthAndRange()

RaveValueType PolarScan_getParameterValueAtAzimuthAndRange ( PolarScan_t * scan,
const char * quantity,
double a,
double r,
double * v )

Returns the parameter value at the specified azimuth and range.

Parameters
[in]scan- self
[in]quantity- the parameter name
[in]a- the azimuth (in radians)
[in]r- the range (in meters)
[out]v- the value
Returns
a rave value type (if scan does not contain specified parameter, RaveValueType_UNDEFINED will be returned).

◆ PolarScan_getProjection()

Projection_t * PolarScan_getProjection ( PolarScan_t * scan)

Returns the current projection for this scan.

Parameters
[in]scan- the scan
Returns
the projection used within this scan.

◆ PolarScan_getQualityField()

RaveField_t * PolarScan_getQualityField ( PolarScan_t * scan,
int index )

Returns the quality field at the specified location.

Parameters
[in]scan- self
[in]index- the index
Returns
the quality field if found, otherwise NULL

◆ PolarScan_getQualityFieldByHowTask()

RaveField_t * PolarScan_getQualityFieldByHowTask ( PolarScan_t * scan,
const char * value )

Returns a quality field based on the value of how/task that should be a string.

Parameters
[in]scan- self
[in]value- the value of the how/task attribute
Returns
the field if found otherwise NULL

◆ PolarScan_getQualityFields()

RaveObjectList_t * PolarScan_getQualityFields ( PolarScan_t * scan)

Returns all quality fields belonging to this scan.

The returned object is only a reference so do not modify it.

Parameters
[in]scan- self
Returns
a list of 0 or more quality fields or NULL on error.

◆ PolarScan_getQualityValueAt()

int PolarScan_getQualityValueAt ( PolarScan_t * scan,
const char * quantity,
int ri,
int ai,
const char * name,
int convert,
double * v )

Returns the quality value for the quality field that has a name matching the how/task attribute in the list of fields.

It will first search the parameter for the quality field, then it will search the scan for the quality field if no field is found it will return 0.

Parameters
[in]scan- self
[in]quantity- the parameter quantity
[in]ri- the range index (bin)
[in]ai- the azimuth index (ray)
[in]name- the value of the how/task attribute
[in]convert- indicates if value should be converted with gain and offset or not. 0 for false, true otherwise
[out]v- the found value
Returns
1 if value found otherwise 0

◆ PolarScan_getRange()

double PolarScan_getRange ( PolarScan_t * scan,
int ri,
int rangeMidpoint )

Returns the range for the specified range index.

Same as rscale * ri. If something goes wrong a negative value will be returned.

Parameters
[in]scan- self
[in]ri- range index
[in]rangeMidpoint- defines whether range should be calculated from range midpoints or from their starting points. 0 for using starting points and other values for midpoints.
Returns
the range in meters or a negative value upon bad input

◆ PolarScan_getRangeIndex()

int PolarScan_getRangeIndex ( PolarScan_t * scan,
double r,
PolarScanSelectionMethod_t selectionMethod,
int rangeMidpoint )

Returns the range index for the specified range (in meters).

Parameters
[in]scan- the scan
[in]r- the range
[in]selectionMethod- defines how range index shall be selected. 'ceiled', 'floored' or 'rounded'
[in]rangeMidpoint- defines whether range indices should be calculated from range midpoints or from their starting points. 0 for using starting points and other values for midpoints.
Returns
-1 on failure, otherwise a index between 0 and nbins

◆ PolarScan_getRotationRequiredToNorthmost()

int PolarScan_getRotationRequiredToNorthmost ( PolarScan_t * self)

Returns the rotation needed to to get the first ray in the scan to be the north most ray.

If a negative value is returned, the shift should be performed in a negative circular direction, if 0, no rotation required, if greater than 0, a positive circular shift is required. If startazA/stopazA doesn't exist. This method will always return 0.

Parameters
[in]self- self
Returns
the rotation required to shift the scan so that first ray is the north most. If no rotation required, 0 is returned.

◆ PolarScan_getRscale()

double PolarScan_getRscale ( PolarScan_t * scan)

Returns the range bin scale for the scan.

Parameters
[in]scan- the scan
Returns
the scale of the range bin

◆ PolarScan_getRstart()

double PolarScan_getRstart ( PolarScan_t * scan)

Returns the ray start for the scan.

Parameters
[in]scan- the scan
Returns
the ray start position

◆ PolarScan_getSource()

const char * PolarScan_getSource ( PolarScan_t * scan)

Returns the source.

Parameters
[in]scan- self
Returns
the source or NULL if there is none

◆ PolarScan_getStartDate()

const char * PolarScan_getStartDate ( PolarScan_t * scan)

Returns the start date.

Parameters
[in]scan- self
Returns
the start date (or NULL if there is none)

◆ PolarScan_getStartTime()

const char * PolarScan_getStartTime ( PolarScan_t * scan)

Returns the start time.

Parameters
[in]scan- self
Returns
the start time (or NULL if there is none)

◆ PolarScan_getSurroundingNavigationInfos()

int PolarScan_getSurroundingNavigationInfos ( PolarScan_t * scan,
double lon,
double lat,
int surroundingRangeBins,
int surroundingRays,
PolarNavigationInfo navinfos[] )

Returns an array of surrounding navigation info structs for the specified lon/lat.

The returned navigation infos will represent positions surrounding the lon/lat in range and azimuth dimensions. The parameters surroundingRangeBins and surroundingRays controls whether positions on both sides of the lon/lat target shall be added, or only the closest.

Parameters
[in]scan- the scan
[in]lon- the longitude (in radians)
[in]lat- the latitude (in radians)
[in]surroundingRangeBins- boolean indicating whether surrounding or only closest range bin shall be added. 0 for closest, surrounding otherwise.
[in]surroundingRays- boolean indicating whether surrounding or only closest rays/azimuths shall be added. 0 for closest, surrounding otherwise.
[out]navinfos- array of navigation infos. is assumed to be empty at function call. must be allocated by calling function to admit expected no of surrounding navigation infos
Returns
no of valid elements in navinfos array after additions

◆ PolarScan_getTime()

const char * PolarScan_getTime ( PolarScan_t * scan)

Returns the nominal time.

Parameters
[in]scan- self
Returns
the nominal time (or NULL if there is none)

◆ PolarScan_getValue()

RaveValueType PolarScan_getValue ( PolarScan_t * scan,
int bin,
int ray,
double * v )

Returns the value at the specified index.

Parameters
[in]scan- the scan
[in]bin- the bin index
[in]ray- the ray index
[out]v- the data at the specified index
Returns
the type of data

◆ PolarScan_getValueAtAzimuthAndRange()

RaveValueType PolarScan_getValueAtAzimuthAndRange ( PolarScan_t * scan,
double a,
double r,
int convert,
double * v )

Gets the value at the provided azimuth and range.

Parameters
[in]scan- the scan
[in]a- the azimuth (in radians)
[in]r- the range (in meters)
[in]convert- indicates if value should be converted with gain and offset or not. 0 for false, true otherwise
[out]v- the value
Returns
a rave value type

◆ PolarScan_hasAttribute()

int PolarScan_hasAttribute ( PolarScan_t * scan,
const char * name )

Returns if the specified attribute exists.

Parameters
[in]scan- self
[in]name- the name of the attribute
Returns
1 if attribute exists, otherwise 0

◆ PolarScan_hasParameter()

int PolarScan_hasParameter ( PolarScan_t * scan,
const char * quantity )

Returns if the scan contains the specified parameter or not.

Parameters
[in]scan- self
[in]quantity- the quantity name
Returns
1 if the parameter exists, otherwise 0

◆ PolarScan_isTransformable()

int PolarScan_isTransformable ( PolarScan_t * scan)

Verifies that all preconditions are met in order to perform a transformation.

Parameters
[in]scan- the polar scan
Returns
1 if the polar scan is ready, otherwise 0.

◆ PolarScan_isValid()

int PolarScan_isValid ( PolarScan_t * scan,
Rave_ObjectType otype )

Validates the scan can be seen to be valid regarding storage.

Parameters
[in]scan- self
[in]otype- the object type this scan should be accounted for
Returns
1 if valid, otherwise 0

◆ PolarScan_removeAllParameters()

int PolarScan_removeAllParameters ( PolarScan_t * scan)

Removes all parameters that are in the scan as well as dereferencing the default parameter.

Parameters
[in]scan- self
Returns
1 on success or 0 on failure (if default name can not be reset)

◆ PolarScan_removeAttribute()

void PolarScan_removeAttribute ( PolarScan_t * scan,
const char * attrname )

Removes a rave attribute from the scan.

Parameters
[in]scan- self
[in]attrname- the name of the attribute to remove

◆ PolarScan_removeParameter()

PolarScanParam_t * PolarScan_removeParameter ( PolarScan_t * scan,
const char * quantity )

Removes (and returns) the parameter that is specified by the quantity.

Note, since the parameter returned is inc-refed, remember to release it.

Parameters
[in]scan- self
[in]key- the quantity name
Returns
NULL if nothing found or the parameter if it exists.

◆ PolarScan_removeParametersExcept()

int PolarScan_removeParametersExcept ( PolarScan_t * scan,
RaveList_t * parameters )

Removes all parameters from a scan except the ones specified in parameters (list of strings)

Parameters
[in]scan- self
[in]parameters- a list of character arrays
Returns
1 on success otherwise 0

◆ PolarScan_removeQualityField()

void PolarScan_removeQualityField ( PolarScan_t * scan,
int index )

Removes the quality field at the specified location.

Parameters
[in]scan- self
[in]index- the index

◆ PolarScan_setA1gate()

void PolarScan_setA1gate ( PolarScan_t * scan,
long a1gate )

Sets the a1gate.

Parameters
[in]scan- the scan
[in]a1gate- a1gate

◆ PolarScan_setBeamwH()

void PolarScan_setBeamwH ( PolarScan_t * scan,
double beamwidth )

Sets the horizontal beamwidth.

Default is 1.0 * M_PI/360.0

Parameters
[in]scan- the polar scan
[in]beamwidth- the beam width in radians

◆ PolarScan_setBeamwidth()

void PolarScan_setBeamwidth ( PolarScan_t * scan,
double beamwidth )

Sets the horizontal beamwidth (same as PolarScan_setBeamwH).

Default is 1.0 * M_PI/360.0

Parameters
[in]scan- the polar scan
[in]beamwidth- the beam width in radians

◆ PolarScan_setBeamwV()

void PolarScan_setBeamwV ( PolarScan_t * scan,
double beamwidth )

Sets the vertical beamwidth.

Default is 1.0 * M_PI/360.0

Parameters
[in]scan- the polar scan
[in]beamwidth- the beam width in radians

◆ PolarScan_setDate()

int PolarScan_setDate ( PolarScan_t * scan,
const char * value )

Sets the nominal date.

Parameters
[in]scan- self
[in]value- the date in the format YYYYMMDD
Returns
1 on success, otherwise 0

◆ PolarScan_setDefaultParameter()

int PolarScan_setDefaultParameter ( PolarScan_t * scan,
const char * quantity )

Sets the default parameter for this scan.

I.e. all operations that retrieves/sets values that does not contain a parameter name as well will use the default parameter. Note, there is nothing verifying if the parameter actually exists so if you are uncertain use #hasParameter first.

Parameters
[in]scan- self
[in]quantity- the parameter
Returns
1 on success otherwise 0

◆ PolarScan_setElangle()

void PolarScan_setElangle ( PolarScan_t * scan,
double elangle )

Sets the elevation angle for the scan.

Parameters
[in]scan- self
[in]elangle- the elevation angle

◆ PolarScan_setEndDate()

int PolarScan_setEndDate ( PolarScan_t * scan,
const char * value )

Sets the end date.

Parameters
[in]scan- self
[in]value- the date in the format YYYYMMDD
Returns
1 on success, otherwise 0

◆ PolarScan_setEndTime()

int PolarScan_setEndTime ( PolarScan_t * scan,
const char * value )

Sets the end time.

Parameters
[in]scan- self
[in]value- the time in the format HHmmss
Returns
1 on success, otherwise 0

◆ PolarScan_setHeight()

void PolarScan_setHeight ( PolarScan_t * scan,
double height )

Sets the height.

Parameters
[in]scan- self
[in]height- the height

◆ PolarScan_setLatitude()

void PolarScan_setLatitude ( PolarScan_t * scan,
double lat )

Sets the latitude.

Parameters
[in]scan- self
[in]lat- the latitude

◆ PolarScan_setLongitude()

void PolarScan_setLongitude ( PolarScan_t * scan,
double lon )

Sets the longitude.

Parameters
[in]scan- self
[in]lon- the longitude

◆ PolarScan_setNavigator()

void PolarScan_setNavigator ( PolarScan_t * scan,
PolarNavigator_t * navigator )

Sets a navigator for the polar scan, this is preferrable to use when this scan is included in a volume since the settings will be identical for all scans included in the volume.

Otherwise, if the scan is managed separately, use longitude/latitude and height instead.

Parameters
[in]scan- the scan
[in]navigator- the polar navigator (MAY NOT BE NULL)

◆ PolarScan_setParameterValue()

int PolarScan_setParameterValue ( PolarScan_t * scan,
const char * quantity,
int bin,
int ray,
double v )

Sets the parameter value at the specified position.

Parameters
[in]scan- self
[in]quantity- the parameter (MAY NOT BE NULL)
[in]bin- the bin index
[in]ray- the ray index
[in]v- the value
Returns
1 on success otherwise 0

◆ PolarScan_setProjection()

void PolarScan_setProjection ( PolarScan_t * scan,
Projection_t * projection )

Sets the projection to be used for this scan.

Parameters
[in]scan- the scan
[in]projection- the projection (MAY NOT BE NULL)

◆ PolarScan_setRscale()

void PolarScan_setRscale ( PolarScan_t * scan,
double rscale )

Sets the range scale for the scan.

Parameters
[in]scan- the scan
[in]rscale- the scale of the range bin

◆ PolarScan_setRstart()

void PolarScan_setRstart ( PolarScan_t * scan,
double rstart )

Sets the ray start for the scan.

Parameters
[in]scan- the scan
[in]rstart- the start position of the ray

◆ PolarScan_setSource()

int PolarScan_setSource ( PolarScan_t * scan,
const char * value )

Sets the source.

Parameters
[in]scan- self
[in]value- the source
Returns
1 on success, otherwise 0

◆ PolarScan_setStartDate()

int PolarScan_setStartDate ( PolarScan_t * scan,
const char * value )

Sets the start date.

Parameters
[in]scan- self
[in]value- the date in the format YYYYMMDD
Returns
1 on success, otherwise 0

◆ PolarScan_setStartTime()

int PolarScan_setStartTime ( PolarScan_t * scan,
const char * value )

Sets the start time.

Parameters
[in]scan- self
[in]value- the time in the format HHmmss
Returns
1 on success, otherwise 0

◆ PolarScan_setTime()

int PolarScan_setTime ( PolarScan_t * scan,
const char * value )

Sets the nominal time.

Parameters
[in]scan- self
[in]value- the time in the format HHmmss
Returns
1 on success, otherwise 0

◆ PolarScan_setUseAzimuthalNavInformation()

void PolarScan_setUseAzimuthalNavInformation ( PolarScan_t * self,
int v )

Sets if the azimuthal nav information (astart / startazA / stopazA) should be used when calculating azimuthal index.

Parameters
[in]self- self
[in]v- 1 if nav information should be used, otherwise 0

◆ PolarScan_setValue()

int PolarScan_setValue ( PolarScan_t * scan,
int bin,
int ray,
double v )

Sets the value at the specified position.

Parameters
[in]scan- self
[in]bin- the bin index
[in]ray- the ray index
[in]v- the value
Returns
1 on success otherwise 0

◆ PolarScan_shiftAttribute()

int PolarScan_shiftAttribute ( PolarScan_t * scan,
const char * name,
int nx )

Performs a circular shift of an array attribute.

if nx < 0, then shift is performed counter clockwise, if nx > 0, shift is performed clock wise, if 0, no shift is performed.

Parameters
[in]scan- self
[in]name- attribute to shift
[in]nx- number of positions to shift return 1 if successful, 0 if trying to shift an attribute that isn't an array or an error occurs during shift.

◆ PolarScan_shiftData()

int PolarScan_shiftData ( PolarScan_t * self,
int nrays )

Performs a circular shift of the datasets that are associated with this scan.

It can be negative for counter clock wise and positive for clock wise rotation. If for some reason a value != 1 is returned you should not use this scan since the internals might have been altered in such a way that there are inconsistancies.

Parameters
[in]self- self
[in]nrays- the number of rays to shift
Returns
1 if successful otherwise 0

◆ PolarScan_shiftDataAndAttributes()

int PolarScan_shiftDataAndAttributes ( PolarScan_t * self,
int nrays )

Performs a circular shift of the datsets that are associated with the scan and also all attributes that are associated with the rays.

Currently these attributes are:

  • how/elangles
  • how/startazA
  • how/stopazA
  • how/startazT
  • how/stopazT
  • how/startelA
  • how/stopelA
  • how/startelT
  • how/stopelT
  • how/TXpower If for some reason a value != 1 is returned you should not use this scan since the internals might have been altered in such a way that there are inconsistancies.
    Parameters
    [in]self- self
    [in]nrays- number of rays the data & array values should be shifted. If negative, counter clockwise, if positive clockwise.
    Returns
    1 on success 0 on error

◆ PolarScan_useAzimuthalNavInformation()

int PolarScan_useAzimuthalNavInformation ( PolarScan_t * self)

Returns if the azimuthal nav information should be used or not.

Parameters
[in]self- self
Returns
1 if nav information should be used, otherwise 0.

◆ PolarScanInternal_isPolarVolumeBeamwH()

int PolarScanInternal_isPolarVolumeBeamwH ( PolarScan_t * scan)

Returns if the beamwidth comes from a volume or not.

I.E. DO NOT USE UNLESS YOU KNOW WHY.

Parameters
[in]scan- self
Returns
-1 if default setting, 1 if beamwidth comes from a polar volume otherwise 0

◆ PolarScanInternal_isPolarVolumeBeamwV()

int PolarScanInternal_isPolarVolumeBeamwV ( PolarScan_t * scan)

Returns if the beamwidth comes from a volume or not.

I.E. DO NOT USE UNLESS YOU KNOW WHY.

Parameters
[in]scan- self
Returns
-1 if default setting, 1 if beamwidth comes from a polar volume otherwise 0

◆ PolarScanInternal_setPolarVolumeBeamwH()

void PolarScanInternal_setPolarVolumeBeamwH ( PolarScan_t * scan,
double bw )

Framework internal function for setting the beamwidth in a scan, used to indicate that the beamwidth comes from the polar volume.

I.E. DO NOT USE UNLESS YOU KNOW WHY.

Parameters
[in]scan- self
[in]bw- the beam width in radians

◆ PolarScanInternal_setPolarVolumeBeamwV()

void PolarScanInternal_setPolarVolumeBeamwV ( PolarScan_t * scan,
double bw )

Framework internal function for setting the beamwidth in a scan, used to indicate that the beamwidth comes from the polar volume.

I.E. DO NOT USE UNLESS YOU KNOW WHY.

Parameters
[in]scan- self
[in]bw- the beam width in radians

Variable Documentation

◆ PolarScan_TYPE

RaveCoreObjectType PolarScan_TYPE
extern

Type definition to use when creating a rave object.