Skip to content

Commit

Permalink
modolus in azimuth
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiste committed Dec 10, 2024
1 parent f402d9a commit 8c9cd76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/coordinates.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ vec2lin0 <- function(x, y, z) {
# nz <- sapply(n[, 3], function(x) ifelse(x < 0, -x, x))
nz <- n[, 3]
# cbind(
azimuth <- atan2d(n[, 2], n[, 1])
azimuth <- atan2d(n[, 2], n[, 1]) %% 360
plunge <- asind(nz)
# )

Expand All @@ -38,7 +38,7 @@ vec2fol0 <- function(x, y, z) {
# nz <- sapply(n[, 3], function(x) ifelse(x < 0, -x, x))
nz <- n[, 3]

dip_direction <- (atan2d(n[, 2], n[, 1]) + 180)
dip_direction <- (atan2d(n[, 2], n[, 1]) + 180) %% 360
dip <- 90 - asind(nz)

res <- mapply(correct_inc, azi = dip_direction, inc = dip) |> t()
Expand Down

0 comments on commit 8c9cd76

Please sign in to comment.