BEAM BLOCKAGE
beamblockagemap.c File Reference

Beam-blockage topography map reading functionallity. More...

#include "beamblockagemap.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "math.h"
#include <string.h>
#include "rave_field.h"
#include "polarnav.h"
#include <stdio.h>
#include <arpa/inet.h>
#include "config.h"

Classes

struct  _BeamBlockageMap_t
 Represents the beam blockage algorithm. More...
 

Macros

#define RAD2DEG(rad)
 Converts a radian to a degree.
 
#define DEG2RAD(deg)
 Converts a degree into a radian.
 

Functions

BBTopography_tBeamBlockageMapInternal_makeTopographyField (BeamBlockageMap_t *self, const char *tnames, const char *orient)
 Read the actual tiles and concatenate them if required.
 
BBTopography_tBeamBlockageMap_readTopography (BeamBlockageMap_t *self, double lat, double lon, double d)
 Find out which maps are needed to cover given area.
 
BBTopography_tBeamBlockageMap_getTopographyForScan (BeamBlockageMap_t *self, PolarScan_t *scan)
 Returns a topography that matches the scan sweep strategy.
 
int BeamBlockageMap_setTopo30Directory (BeamBlockageMap_t *self, const char *topodirectory)
 Sets the topo30 directory.
 
const char * BeamBlockageMap_getTopo30Directory (BeamBlockageMap_t *self)
 Returns the topo30 directory.
 

Variables

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

Detailed Description

Beam-blockage topography map reading functionallity.

Author
Anders Henja (SMHI)
Date
2011-11-14

Macro Definition Documentation

◆ DEG2RAD

#define DEG2RAD ( deg)
Value:
(deg*M_PI/180.0)

Converts a degree into a radian.

◆ RAD2DEG

#define RAD2DEG ( rad)
Value:
(rad*180.0/M_PI)

Converts a radian to a degree.

Function Documentation

◆ BeamBlockageMap_getTopo30Directory()

const char * BeamBlockageMap_getTopo30Directory ( BeamBlockageMap_t * self)

Returns the topo30 directory.

Parameters
[in]self- self
Returns
the topo30 directory

◆ BeamBlockageMap_getTopographyForScan()

BBTopography_t * BeamBlockageMap_getTopographyForScan ( BeamBlockageMap_t * self,
PolarScan_t * scan )

Returns a topography that matches the scan sweep strategy.

I.e. the topography for each bin/ray index.

Parameters
[in]self- self
[in]scan- the polar scan
Returns
the topography with the corresponding dimensions. cols = bin and rows = rays

◆ BeamBlockageMap_readTopography()

BBTopography_t * BeamBlockageMap_readTopography ( BeamBlockageMap_t * self,
double lat,
double lon,
double d )

Find out which maps are needed to cover given area.

Parameters
[in]lat- latitude of radar in degrees
[in]lon- longitude of radar in degrees
[in]d- maximum range of radar in meters
Returns
flag corresponding to map to be read

◆ BeamBlockageMap_setTopo30Directory()

int BeamBlockageMap_setTopo30Directory ( BeamBlockageMap_t * self,
const char * topodirectory )

Sets the topo30 directory.

Parameters
[in]self- self
[in]topodirectory- the topo directory
Returns
1 on success otherwise 0

◆ BeamBlockageMapInternal_makeTopographyField()

BBTopography_t * BeamBlockageMapInternal_makeTopographyField ( BeamBlockageMap_t * self,
const char * tnames,
const char * orient )

Read the actual tiles and concatenate them if required.

Parameters
[in]tnames- comma-separated string (no spaces) containing the names of GTOPO30 tiles. If there are two aligned vertically, then the order is: "north,south". If there are two aligned horizontally, then the order is: "west,east". If there are four, then the order is: "nw,ne,sw,se".
[in]orient- concatenation orientation, when relevant: "v" or "h", otherwise NULL
Returns
flag corresponding to topography field made

Variable Documentation

◆ BeamBlockageMap_TYPE

RaveCoreObjectType BeamBlockageMap_TYPE
Initial value:
= {
"BeamBlockageMap",
BeamBlockageMap_constructor,
BeamBlockageMap_destructor,
BeamBlockageMap_copyconstructor
}
struct _BeamBlockageMap_t BeamBlockageMap_t
Defines a beam blockage object.
Definition beamblockagemap.h:36

Type definition to use when creating a rave object.