get_track_segments: Get track segments

View source: R/get_track_segments.R

get_track_segmentsR Documentation

Get track segments

Description

The purpose of this function is to separate each track into segments by which target it was following. This comes up frequently later in the analysis, particularly when trying to computer total track coverage and number of tracks per target.

get_track_segments() first creates the column tgtXtrack which is a factor created from the interaction between assigned target and sensor track number. Next, the segment number is created from the number of instances when a track follows a target. When the track changes targets the segment number increases by 1. For example, if track 1 was assigned to target A, then B, then back to A, segmentNumber would increment by 1 each time

Usage

get_track_segments(assignmentData)

Arguments

assignmentData

the data frame output by target_assignment()

Value

The same data set with two additional columns: tgtXtrack and segmentNumber. tgtXtrack is a factor showing which target the point was assigned to and to which track number the point belongs. segmentNumber counts the number of instances of each tgtXtrack factor.


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