Calculate distances and angles of possibly influencing turbines
Source:R/turbine_influences.R
get_dist_angles.Rd
Calculate distances and angles for a turbine and all it's potentially influencing turbines.
Arguments
- 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
FALSE
See also
Other Wind Energy Calculation Functions:
barometric_height()
,
calculate_energy()
,
turbine_influences()
Examples
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))
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
#> [[1]]
#> Ax Ay Bx By Cx Cy Laenge_C Laenge_B Laenge_A
#> [1,] 4498553 2669065 4498633 2668712 4498553 2668712 360.9764 352 80
#> alpha betha gamma
#> [1,] 12.78192 77.21808 90
#>
#> [[2]]
#> Ax Ay Bx By Cx Cy Laenge_C Laenge_B
#> [1,] 4499590 2668836 4499425 2668316 4499590 2668316 545.7016 520.00
#> [2,] 4499599 2669307 4499425 2668316 4499599 2668316 1006.4923 991.25
#> Laenge_A alpha betha gamma
#> [1,] 165.5 17.64306 72.35694 90
#> [2,] 174.5 9.97048 80.02952 90
#>
#> [[3]]
#> Ax Ay Bx By Cx Cy Laenge_C Laenge_B Laenge_A alpha betha gamma
#> [1,] 0 0 4499146 2668883 0 0 0 0 0 0 0 0
#>
#> [[4]]
#> Ax Ay Bx By Cx Cy Laenge_C Laenge_B Laenge_A
#> [1,] 4499599 2669307 4499590 2668836 4499599 2668836 471.3359 471.25 9
#> alpha betha gamma
#> [1,] 1.07496 88.92504 90
#>
#> [[5]]
#> Ax Ay Bx By Cx Cy Laenge_C Laenge_B Laenge_A
#> [1,] 4499590 2668836 4499665 2668452 4499590 2668452 391.5010 384.25 75
#> [2,] 4499599 2669307 4499665 2668452 4499599 2668452 858.0421 855.50 66
#> alpha betha gamma
#> [1,] 11.006655 78.99335 90
#> [2,] 4.405365 85.59464 90
#>
#> [[6]]
#> Ax Ay Bx By Cx Cy Laenge_C Laenge_B Laenge_A alpha betha gamma
#> [1,] 0 0 4498553 2669065 0 0 0 0 0 0 0 0
#>
#> [[7]]
#> Ax Ay Bx By Cx Cy Laenge_C Laenge_B Laenge_A alpha betha gamma
#> [1,] 0 0 4499599 2669307 0 0 0 0 0 0 0 0
#>
#> [[8]]
#> Ax Ay Bx By Cx Cy Laenge_C Laenge_B
#> [1,] 4499590 2668836 4499559 2668289 4499590 2668289 547.8777 547.00
#> [2,] 4499599 2669307 4499559 2668289 4499599 2668289 1019.0353 1018.25
#> Laenge_A alpha betha gamma
#> [1,] 31 3.276379 86.72362 90
#> [2,] 40 2.258703 87.74130 90
#>
#> [[9]]
#> Ax Ay Bx By Cx Cy Laenge_C Laenge_B Laenge_A alpha betha gamma
#> [1,] 0 0 4498900 2669188 0 0 0 0 0 0 0 0
#>
#> [[10]]
#> Ax Ay Bx By Cx Cy Laenge_C Laenge_B Laenge_A alpha betha gamma
#> [1,] 0 0 4498855 2669112 0 0 0 0 0 0 0 0
#>