Helper function to transform uncertainty angles into weighting factors
Usage
weighting(
x,
method = c("linear-inverse", "inverse", "cosine", "none"),
max.err = 90
)Details
Linear inverse: \(w = 1 - x/\sigma\), where \(\sigma\) is the maximum error expected for \(x\) (e.g. \(90^\circ\)).
Inverse: \(w = 1/x\)
Cosine: \(w = \cos{x}\)
Examples
x <- seq(0, 90, 1)
plot(x, weighting(x, "inverse"), col = 1, type = "l",
xlab = "Uncertainty angle in degrees", ylab = "weight")
lines(x, weighting(x, "cosine"), col = 2)
lines(x, weighting(x, "linear-inverse"), col = 3)
legend("topright", col = 1:3, lty = 1,
legend = c("inverse", "cosine", "linear-inverse"))
