Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
j-miszczyszyn committed Sep 23, 2024
2 parents c3dee12 + d3b135a commit 0750f5c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/calculate_new_tree_position.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ calculate_new_tree_position <- function(plot, save, crs, dataset, plot_center_x,

# Convert azimuth and distance to Cartesian coordinates
x <- dplyr::mutate(x,
x_pos = plot_center_x + distance * sin(azimuth * pi / 180),
y_pos = plot_center_y + distance * cos(azimuth * pi / 180)
x_pos = plot_center_x + distance * sin(azimuth * pi / 180),
y_pos = plot_center_y + distance * cos(azimuth * pi / 180)
)

# Create an sf object with the specified CRS (EPSG: 2180)
Expand All @@ -46,4 +46,3 @@ calculate_new_tree_position <- function(plot, save, crs, dataset, plot_center_x,

return(trees_sf)
}

0 comments on commit 0750f5c

Please sign in to comment.