flightconflicts

Tools to analyze conflicts between aircraft.
git clone https://git.eamoncaddigan.net/flightconflicts.git
Log | Files | Refs | README | LICENSE

commit 05ea1add4f6b1171fd40fc41ab2e712d1d10256b
parent b4161ea2fe438a5e6c69bc7f2317f0b386d661d8
Author: eamoncaddigan <eamon.caddigan@gmail.com>
Date:   Fri, 20 May 2016 16:58:14 -0400

Code for identify LoWC

Diffstat:
MR/identifyNMAC.R | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/R/identifyNMAC.R b/R/identifyNMAC.R @@ -31,3 +31,22 @@ identifyNMAC <- function(trajectory1, trajectory2) { return(isNMAC) } + + + +#' Determine whether loss of Well Clear (LoWC) has occurred at each time point. +#' +#' @param trajectory1 A \code{flighttrajectory} object corresponding to the +#' first aircraft. +#' @param trajectory2 A \code{flighttrajectory} object corresponding to the +#' second aircraft. +#' @return The logical vector indicating whether Well Clear has been violated at +#' each time point. +#' +#' @details This code relies on \code{\link{calculateSLoWC}}, see its +#' documentation for details. +#' +#' @export +identifyLoWC <- function(trajectory1, trajectory2) { + return(calculateSLoWC(trajectory1, trajectory2) > 0) +}