determine_angles: Determine angles as seen by observer

Description Usage Arguments Value Examples

View source: R/determine_angles.R

Description

Determine the angles (between three known points) as seen by an observer with a known position.

Usage

1
2
determine_angles(A, B, C, observer_position = c(0, 0), output_plot = TRUE,
  lines_in_plot = TRUE, angles_in_plot = TRUE, 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_position

A vector containing an x- and an y-coordinate

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

angles_in_plot

Boolean variable indicating whether the angles should be printet in the plot

decimals_in_plot

Integer indicating the number of decimals used

Value

The angles as seen by the observer expressed in radians.

Examples

1
2
3
4
determine_angles(A = c(0, 0), B = c(10, 0), C = c(5, 5), observer_position=c(4,1))

determine_angles(A = c(0, 0), B = c(10, 0), C = c(5, 5), observer_position=c(4,40),
angles_in_plot = FALSE)

Example output

observer_angle_AB observer_angle_AC observer_angle_BC 
         2.731465          2.060754          1.490966 
observer_angle_AB observer_angle_AC observer_angle_BC 
        0.2485586         0.1282323         0.1203263 

triangulation documentation built on May 2, 2019, 5:34 a.m.