|
Radar_NoData, Radar_ValIsNoData, Radar_ValIsData, Radar_ErrMsgAppend, Radar_ErrMsgGet, Radar_SwapOn, Radar_SwapOff, Radar_ToggleSwap, Radar_GetSINT16, Radar_GetUINT16, Radar_GetSINT32, Radar_GetUINT32, Radar_GetFLOAT32, Radar_SwapArr16, Radar_AllocArr3, Radar_FreeArr3, Radar_AllocArr4, Radar_FreeArr4, Radar_GrndRng, Radar_RayRng, Radar_ArrSearch, Radar_AzArrSearch, Radar_BilinInterp, Radar_PolarDataInit, Radar_PolarDataSetAlloc, Radar_PolarDataFree, − radar data functions. |
|
2 |
#include <radar.h> float Radar_NoData(void); int Radar_ValIsNoData(float v); int Radar_ValIsData(float v); void Radar_ErrMsgAppend(char *msg); char *Radar_ErrMsgGet(void); void Radar_SwapOn(void); void Radar_SwapOff(void); void Radar_ToggleSwap(void); int Radar_GetSINT16(char *b); unsigned Radar_GetUINT16(char *b); int Radar_GetSINT32(char *b); unsigned Radar_GetUINT32(char *b); double Radar_GetFLOAT32(char *b); void Radar_SwapArr16(unsigned short *r, size_t nw); float *** Radar_AllocArr3(unsigned i, unsigned j, unsigned k); void Radar_FreeArr3(float ***d); float **** Radar_AllocArr4(unsigned i, unsigned j, unsigned k); void Radar_FreeArr4(float ****d); double Radar_GrndRng(double d, double h, Angle tilt); double Radar_RayRng(double d, double h, Angle tilt); int Radar_ArrSearch(float *xx, int n, float x); int Radar_AzArrSearch(Angle *xx, int n, Angle x); float Radar_BilinInterp(Angle *az0, float *r0, float **z0, Angle az1, float r1); void Radar_PolarDataInit(struct Radar_PolarData *rpdPtr); int Radar_PolarDataSetAlloc(struct Radar_PolarData *rpdPtr, GeoPt ctr, unsigned n_az, unsigned n_rng); void Radar_PolarDataFree(struct Radar_PolarData *rpdPtr); |
|
These utility functions are used by other functions that access and manipulate radar data. |
|
Radar_NoData returns a value that indicates unusable data. |
|
Radar_ValIsNoData returns true if v equals this value. Radar_ValIsData returns false if v is not this value, i.e. if v is usable data. |
|
Radar_ErrMsgAppend appends msg to an internal error string. |
|
Radar_ErrMsgGet returns this string and resets it to "". The return value should not be modified by the user. |
|
The Radar_Get functions access integers, applying byte swapping if necessary. |
|
Radar_SwapOn switches byte swapping on. |
|
Radar_SwapOff switches byte swapping off. |
|
Radar_ToggleSwap switches byte swapping on if it is off, or vice versa. |
|
Radar_GetSINT16 retrieves a signed 16 bit integer from address |
|
b, applying byte swapping if necessary (as indicated by previous calls to Radar_ToggleSwap). |
|
Radar_GetUINT16 retrieves an unsigned 16 bit integer from |
|
address b, applying byte swapping if necessary. |
|
Radar_GetSINT32 retrieves a signed 32 bit integer from |
|
address b, applying byte swapping if necessary. |
|
Radar_GetUINT32 retrieves an unsigned 32 bit integer from address |
|
b, applying byte swapping if necessary. |
|
Radar_GetFLOAT32 retrieves a 32 bit floating point value from address |
|
b, applying byte swapping if necessary. |
|
Radar_SwapArr16 swaps nw pairs of bytes at address *r if |
|
directed to by previous calls to Radar_ToggleSwap. Otherwise it does nothing. |
|
Radar_AllocArr3 returns a dynamically allocated array dimensioned |
|
[i][j][k], or NULL if allocation fails. The memory should be freed by handing the return value to Radar_FreeArr3. |
|
Radar_AllocArr4 returns a dynamically allocated array dimensioned |
|
[i][j][k][l], or NULL if allocation fails. The memory should be freed by handing the return value to Radar_FreeArr3. |
|
Radar_GrndRng returns the distance along the ground to the point below |
|
a cell at distance d meters along a ray elevated to tilt degrees. Radar antenna is h meters above ground. Return value is in meters. |
|
Radar_RayRng returns the distance along a ray elevated to tilt |
|
degrees to a cell above a point d meters from the radar. Radar antenna is h meters above ground. Return value is in meters. |
|
Radar_ArrSearch searches monotonic array xx of length n for |
|
an interval containing x. If it finds one, it returns the index of the lower boundary. If x is out of bounds, the function returns -1. Radar_AzArrSearch behaves like Radar_ArrSearch except the input array and sought for value are angles. Zero crossings are handled correctly. |
|
Radar_BilinInterp returns the value for a field at azimuth az |
|
and range r from a radar, given bounding azimuths in az_g[2] and bounding ranges in r_g[2], and corner values in z[2][2]. It uses bilinear interpolation. |
|
The Radar_PolarData functions access polar data stored in structures |
|
declared as: struct Radar_PolarData {
GeoPt ctr;
unsigned n_az;
Angle *az;
unsigned n_rng;
float *rng;
float **dat;
};
|
|
Radar_PolarDataInit initializes the polar data structure at rpdPtr with bogus values. rpdPtr is assumed to contain bogus values. Radar_PolarDataSetAlloc sets the origin of the polar data structure at rpdPtr to ctr, and allocates the grid and data arrays to store data for n_az azimuths and n_rng range values. Radar_PolarDataFree frees internal storage associated with rpdPtr. The structure itself remains allocated. rpdPtr is re-initialized with bogus values. |
|
radar data |
|
Gordon Carrie (user0 at tkgeomap.org) |