plot_error: Plot [location error / bearing error / range error] by [range...

View source: R/plot_error.R

plot_errorR Documentation

Plot [location error / bearing error / range error] by [range / time]

Description

This figure plots one of several choices for system error (location error, range error, bearing error) against time or range. Can be split by target assigned or track number.

Usage

plot_error(
  scenario,
  rangeCutoff,
  xTerm = "rangeToShip",
  yTerm = "locationError",
  colorTerm = "tgtAssigned",
  doFacet = FALSE,
  plotFalseTracks = FALSE
)

Arguments

scenario

MUST contain assignmentData (from target_assignment())

rangeCutoff

the position for a horizontal cutoff line. This should be equal to the cutoff you used in your analysis. Will only draw a single line, so if the cutoff specified has 2 or 3 terms it may be less useful

xTerm

(string) the variable plotted on the x-axis. Currently there are two options:

  • "rangeToShip"

  • "time"

yTerm

(string) the variable plotted on the y-axis. Currently there are three options:

  • "locationError"

  • "bearingError"

  • "downrangeError"

colorTerm

(string) the variable to be split by color. Currently there are two options:

  • "tgtAssigned"

  • "trackNum"

doFacet

(default FALSE) boolean. Determines whether the graph will also facet by colorTerm

plotFalseTracks

(default FALSE) boolead. Determines whether graph will show fast track points or hide them

Value

ggplot object

Examples

myScenario=scenarioMaker::example1_scenario %>%
 target_assignment("point",cutoff=100)

plot_error(scenario=myScenario,
 rangeCutoff=2000,
 xTerm="rangeToShip",
 yTerm="locationError",
 colorTerm="tgtAssigned")

battleVerse/nautilus documentation built on July 16, 2024, 4:20 a.m.