get_relative_distance: Get distance info between specified targets at the times...

View source: R/get_relative_distance.R

get_relative_distanceR Documentation

Get distance info between specified targets at the times provided

Description

Get distance info between specified targets at the times provided. Designed to work with exactly one truthID in each input dataframe. Both input dataframes MUST be on the same time base. Be careful if you decide to use this; it is mostly intended as an internal function for distance_between() and target_ownship_distance(). If you're looking at this function, it's likely that you actually want one of those.

Usage

get_relative_distance(refPlatTruth, targetTruth)

Arguments

refPlatTruth

data frame containing all of the truth position of the reference platform (ownShip). 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. This must contain ONE AND ONLY ONE VALUE FOR THIS FUNCTION

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

targetTruth

truthData: data frame containing all of the truth data for each target. 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. This must contain ONE AND ONLY ONE VALUE FOR THIS FUNCTION

  • heading: (double) target heading in degrees azimuth

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


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