Description Usage Arguments Value Examples
View source: R/determine_position.R
Determine the position of an observer based on angles between three known points as seen by the observer.
At least two angles must be provided - preferably observer_angle_AB
and observer_angle_AC
(since this combination allows for solutions outside the triangle formed by the points A
, B
and C
)
1 2 3 |
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 (or alternatively the symbol |
observer_angle_AC |
An angle (numeric) expressed in radians (or alternatively the symbol |
observer_angle_BC |
An angle (numeric) expressed in radians (or alternatively the symbol |
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 |
Coordinates indicating the observers position. Note that several solutions might exist.
1 2 3 4 5 6 7 8 | determine_position(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_position(A = c(0, 0), B = c(10, 0), C = c(5, 5), observer_angle_AB = pi * 5/6,
observer_angle_AC = pi * 1/2, observer_angle_BC = NA, lines_in_plot = FALSE)
determine_position(A = c(0, 0), B = c(10, 0), C = c(5, 5), observer_angle_AB = pi * 5/6,
observer_angle_AC = pi * 1/2, observer_angle_BC = pi * 2/3, lines_in_plot = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.