View source: R/turbine_influences.R
get_dist_angles | R Documentation |
Calculate distances and angles for a turbine and all it's potentially influencing turbines.
get_dist_angles(t, o, wnkl, dist, polYgon, plotAngles = FALSE)
t |
A data.frame of the current individual with X and Y coordinates |
o |
A numeric value indicating the index of the current turbine |
wnkl |
The angle from which wake influences are considered to be negligible |
dist |
A numeric value indicating the distance, after which the wake effects are considered to be eliminated. |
polYgon |
A shapefile representing the considered area |
plotAngles |
A logical variable, which is used to plot the distances and
angles. Default is |
Returns a matrix with the distances, angles and heights of potentially influencing turbines
Other Wind Energy Calculation Functions:
barometric_height()
,
calculate_energy()
,
circle_intersection()
,
turbine_influences()
library(sf)
## Exemplary input Polygon with 2km x 2km:
Polygon1 <- sf::st_as_sf(sf::st_sfc(
sf::st_polygon(list(cbind(
c(4498482, 4498482, 4499991, 4499991, 4498482),
c(2668272, 2669343, 2669343, 2668272, 2668272)
))),
crs = 3035
))
## Create a random windfarm with 10 turbines
t <- st_coordinates(st_sample(Polygon1, 10))
t <- cbind(t, "Z" = 1)
wnkl <- 20
dist <- 100000
## Evaluate and plot for every turbine all other potentially influencing turbines
potInfTur <- list()
for (i in 1:(length(t[, 1]))) {
potInfTur[[i]] <- get_dist_angles(
t = t, o = i, wnkl = wnkl,
dist = dist, polYgon = Polygon1, plotAngles = TRUE
)
}
potInfTur
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.