update_ple: Update path loss exponent values

View source: R/update_ple.R

update_pleR Documentation

Update path loss exponent values

Description

Update path loss exponent values. This function estimates the path loss exponent using a raster object that contains information about the environment. Buildings and trees are notorious propapation blockers. Therefore, this raster object should contain an indicator for the amount of buildings, trees and other obstacles per grid tile. This function is called from validate_cellplan.

Usage

update_ple(cp, envir, ple_0 = 2.5, ple_1 = 4, ple_small = NA)

Arguments

cp

cellplan, validated with validate_cellplan

envir

raster object that contains per grid tile an indicator of the objects that block the propagation, e.g. buildings and trees.

ple_0

lowest path loss exponent value. This value is mapped to envir raster tile values of 0.

ple_1

highest loss exponent value. This value is mapped to envir raster tile values of 1.

ple_small

the path loss exponent of small cells. If NA (default), the small cells are considered as normal cells. Otherwise, this value will be used for path loss exponent values of small cells.

Details

Method: the values of envir is taken at a couple of points near the cell. The mean value is computed, and linearly transformed from the range [0, 1] to the range [ple_0, ple_1]. The method to select the sample point is the following. For omnidirectional cells, points are taken at 0, 90, 180 and 270 degrees. For directional cells, points are taken at the propatation direction plus -1, -.5, -.25, 0, .25, .5, and 1 times the horizontal beam width. For each direction, points are taken at 50, 150, 250, 500, and 1000 meter distance.

Value

cellplan (data.frame) with imputed values for the variable ple

Examples

## Not run: 
# set parameters
ZL_param <- prop_param()

# load data
data("ZL_cellplan", "ZL_muni", "ZL_elevation", "ZL_landuse")

# validate cellplan
ZL_cellplan <- validate_cellplan(ZL_cellplan, param = ZL_param, region = ZL_muni,
    envir = ZL_envir, elevation = ZL_elevation)

# default values of path loss exponent (ple) values have been used for imputation
table(ZL_cellplan$ple)

# create environment layer (needed to calculate path loss exponent (ple))
ZL_envir <- combine_raster_layers(ZL_landuse, weights = c(1, 1, 1, 0, 0))

# inspect this raster object
if (requireNamespace("tmap")) {
    library(tmap)
    tmap_mode("view")
    qtm(ZL_envir)
}

# impute the path loss exponent (ple) values using the ZL_envir object
ZL_cellplan <- update_ple(ZL_cellplan, ZL_envir, ple_0 = 2, ple_1 = 4, ple_small = 6)

# plot the distribution
hist(ZL_cellplan$ple, breaks = 30)

## End(Not run)

MobilePhoneESSnetBigData/mobloc documentation built on Feb. 18, 2024, 3:41 a.m.