Learn R Programming

triangulation (version 0.5.0)

determine_region: Determine confidence region for position

Description

This function is similar to determine_position()except for the fact that it is assumed that the angles are subject to measurement error. Hence a confidence region (error 'ellipse') is returned instead of an exact position.

Usage

determine_region(A, B, C, observer_angle_AB, observer_angle_AC, angle_error = pi/24, number_of_points = 200, output_plot = TRUE, lines_in_plot = FALSE, coordinates_in_plot = FALSE, decimals_in_plot = 2)

Arguments

A
A point defined by a vector containing an x- and an y-coordinate
B
A point defined by a vector containing an x- and an y-coordinate
C
A point defined by a vector containing an x- and an y-coordinate
observer_angle_AB
An angle (numeric) expressed in radians
observer_angle_AC
An angle (numeric) expressed in radians
angle_error
A numeric indicating the measurement error in radians
number_of_points
A numeric indicating the number of error points tested
output_plot
Boolean variable indicating whether a plot should be created
lines_in_plot
Boolean variable indicating whether lines should be drawn in the plot
coordinates_in_plot
Boolean variable indicating whether the coordinates should be printet in the plot
decimals_in_plot
Integer indicating the number of decimals used

Value

Coordinates indicating the outer border of the confidence region. Note that several different regions may exist.

Examples

Run this code
determine_region(A = c(0, 0), B = c(10, 0), C = c(5, 5 * 3^0.5), observer_angle_AB = pi * 2/3,
observer_angle_AC = pi * 1/2)

determine_region(A = c(0, 0), B = c(10, 0), C = c(5, 5), observer_angle_AB = pi * 5/6,
observer_angle_AC = pi * 1/2, lines_in_plot = FALSE)

Run the code above in your browser using DataLab