distance_between: Get distance info between specified targets at specified...

View source: R/distance_between.R

distance_betweenR Documentation

Get distance info between specified targets at specified times

Description

Get distance info between specified targets at specified times. Users input a scenario with truth data (target and/or sensor system truth positions), a list of which targets to calculate distance between, and a list of times at which the user wants these distances.

This function may be useful if, for example, a user wanted to know how far apart all the targets were when a shot was fired at time t. It can also be useful in the case where a user wants to know how far all targets were from Target A in the time leading up to an event around Target A.

Usage

distance_between(scenario, timeList, ownShipList, targetList, windowScale = 20)

Arguments

scenario

names list as created by create_scenario. Must contain either or both: targetTruth, ownShipTruth. Between these two data frames there must be a minimum of two targets to have enough targets to calculate a distance between them.

timeList

either a single number or list of numbers - these are the times for which you want data

ownShipList

either a single name or a list of names - these are the reference platforms to measure from

targetList

either a single name or a list of names - these are the targets to measure

windowScale

(default=20) size of window that scenarioMaker will use for interpolation - two points must exist within windowScale/2*median truth gap of your specified time for interpolation. The larger this value, the greater the risk of interpolating through very large truth data gaps

Value

A dataframe containing the ranges and bearings from the sensor system to every target at each time the position of the sensor system was measured. The output columns are a limited version of target_track_distance() and includes:

  • time: time of the measurement of ownship position

  • ownShipTruthID: unique identifier for the reference platform

  • ownShipLon: longitude of ownship at this time

  • ownShipLat: latitude of ownship at this time

  • ownShipAlt: altitude of ownship at this time

  • slantRange: range from ownship to the target (straight-line distance)

  • groundRange: range from ownship to the target (everyone's altitude is zeroed out)

  • targetAspect: the target aspect (as seen from ownship) at this time

  • trueBearingToTarget: true bearing (azimuth) to the target at this time

  • relBearingToTarget: relative bearing (azimuth) to the target at this time

  • targetTruthID: unique identifier for the target

  • targetLon: target longitude at this time

  • targetLat: target latitude at this time

  • targetAlt: target altitude at this time

  • targetHeading: target heading at this time

Examples

distance_between(
 scenario=example1_scenario,
 timeList=c(34,75),
 ownShipList = c("A","B","C"),
 targetList = c("A","B","C","D","E"))

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