create_scenario: Creates scenario

View source: R/create_scenario.R

create_scenarioR Documentation

Creates scenario

Description

Creates a scenario from the supplied data. This is one of the first scenarioMaker functions that users will need and one of the most important as most of the functions take a scenario as input. Users may supply as much of the raw data as they have, and create_scenario() will (by default) calculate as many of the target-track-ownship distances as possible.

Usage

create_scenario(
  scenarioName = "scenario",
  targetTruth = NA,
  ownShipTruth = NA,
  sensorData = NA,
  engagementData = NA,
  platformInfo = NA,
  verbose = TRUE,
  preCalcTargetTrackDist = TRUE,
  preCalcTargetOwnShipDist = TRUE,
  preCalcTrackOwnShipDist = TRUE
)

Arguments

scenarioName

name of scenario

targetTruth

data frame containing all of the truth data for each target (likely from GPS or land-based radar systems). MUST have the following columns:

  • time: (double) time of measurement. We currently recommend POSIX

  • lon: (double) longitude of target at time of measurement

  • lat: (double) latitude of target at time of measurement

  • alt: (double) altitude of target at time of measurement

  • truthID: (factor) name or identifier for target. We recommend letters or names

  • heading: (double) target heading in degrees azimuth

ownShipTruth

data frame containing all of the truth position of the sensor system (likely from GPS or land-based radar systems). This may be ownship if testing something on a ship or the lat/lon position of a stationary ststem. MUST have the following columns:

  • time: (double) time of measurement. We currently recommend POSIX

  • lon: (double) longitude of target at time of measurement

  • lat: (double) latitude of target at time of measurement

  • alt: (double) altitude of target at time of measurement

  • truthID: (factor) name or identifier for target. We recommend letters or names

  • heading: (double) sensor system heading in degrees azimuth

sensorData

data frame containing each sensor point for all of the tracks. MUST have the following columns:

  • time: (double) time of measurement. We currently recommend POSIX

  • lon: (double) longitude of target at time of measurement

  • lat: (double) latitude of target at time of measurement

  • alt: (double) altitude of target at time of measurement

  • trackNum: (factor) identifier for the track. We recommend numbers for each unique track returned by the sensor system

engagementData

Requires the following columns:

  • time: (double) time of the engagement

  • source: (string) name of the platform doing the shooting

  • target: (string) name of the target

  • weapon: (string) name of the weapon

  • kill: (double) 0 = no kill, 1 = kill

  • color: (string) color of the line to be drawn (must be a valid SIMDIS choice)

platformInfo

display info for all platforms. Requires the following columns:

  • truthID: (factor) name or identifier for target

  • platformIcon: (string) name of platform icon (must choose from valid SIMDIS options)

  • platformType: (string) type of platform (e.g., ship) (must choose from valid SIMDIS options)

  • trackColor: (string) color of the track (must be a valid SIMDIS choice)

verbose

(default=TRUE)

preCalcTargetTrackDist

(default=TRUE) if false, will not pre-calculate targetTrackDistance (which can be big and slow)

preCalcTargetOwnShipDist

(default=TRUE) if false, will not pre-calculate targetOwnShipDistance (which can be big and slow)

preCalcTrackOwnShipDist

(default=TRUE) if false, will not pre-calculate trackOwnShipDistance (which can be big and slow)

Value

Scenario file, which will include:

  • scenarioName

  • sensorData

  • targetTruth

  • ownShipTruth

  • engagementData: used for sandTable

  • platformInfo: used for SIMDIS export

  • targetTrackDistance

  • targetOwnShipDistance

  • trackOwnShipDistance

Examples

 myScenario = create_scenario(
  scenarioName="myScenario",
  targetTruth=example1_truthData,
  ownShipTruth=example1_ownShipData,
  sensorData=example1_sensorData,
  engagementData=example1_engagementData,
  platformInfo=example1_platformInfo,
  verbose=TRUE,
  preCalcTargetTrackDist=TRUE)


battleVerse/scenarioMaker documentation built on July 16, 2024, 4:21 a.m.