We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f763ed8 commit b34a27dCopy full SHA for b34a27d
R/utils_sims.R
@@ -97,10 +97,21 @@ generate_seed <- function(seed_list = NULL) {
97
}
98
99
obj <- lapply(obj, function(x) {
100
- error_x <- stats::rnorm(nrow(x), mean = 0, sd = error)
101
- error_y <- stats::rnorm(nrow(x), mean = 0, sd = error)
102
- x[c("x", "y")] <- x[c("x", "y")] + c(error_x, error_y)
103
- return(x) })
+
+ x$error_x <- x$error_y <- stats::rnorm(
+ nrow(x), mean = 0, sd = error)
104
+ x$HDOP <- sqrt(2) * sqrt(x$error_x^2 + x$error_y^2) /
105
+ sqrt(-2 * log(0.05))
106
107
+ x$original_x <- x$x
108
+ x$original_y <- x$y
109
+ x[c("x", "y")] <- x[c("x", "y")] + c(x$error_x, x$error_y)
110
111
+ ctmm::uere(x) <- 1
112
+ return(x)
113
114
+ }) # end of lapply
115
116
return(obj)
117
0 commit comments