target_assignment_secondpass: Second-pass method of target assignment

View source: R/target_assignment_secondpass.R

target_assignment_secondpassR Documentation

Second-pass method of target assignment

Description

There are several reasons why one may want to run target_assignment() twice. For example, for large data sets with a large number of false tracks (clutter), running window methods may be very slow. It may be possible to speed up computation by first running a fast method of target_assignment() ()point or whole track) with a large cutoff value, then returning to run the slower window method on the reduced data set. As another example, a user may want to ensure that they keep all points within a track (as the method = 'wholeTrack' would do), however they also want a track to be able to switch targets (as the other methods can). In this case, the user might want to run the whole track method first with a medium-sized cutoff to remove all of the false tracks, and then return and use one of the other methods with a large cutoff to ensure that none of the remaining points are thrown out while still allowing them to switch targets.

This function can be used to easily run target_assignment for a second pass after it has already been run once. The first pass should be designed to remove as much of the false tracks as possible without interfering with data that the user would want to keep. It will then run only those points NOT determined to be false tracks through the second pass. The points eliminated in the first pass will be included in the final data frame so that no data points are lost during this process (unless the user specifies otherwise, perhaps to reduce the overall size of the data for plotting).

The first pass should properly be a faster method to properly take advantage of the two-pass technique, therefore we recommend using method='point' or method='wholeTrack' for the first pass before using this function.

Usage

target_assignment_secondpass(scenario, method, excludeFirstPass = FALSE, ...)

Arguments

scenario

scenario must contain the output of target_track_assignment() (the result of the first pass)

method

string specifying which subfunction to call. Options include:

  • "point": point method of target assignment. Calls target_assignment.point(). Requires additional parameters "cutoff". See target_assignment.point for additional details

  • "wholeTrack": whole track method of target assignment. Calls target_assignment.track(). Requires additional parameters "cutoff". See target_assignment.track for additional details

  • "windowSquare": square window method of target assignment. Calls target_assignment.window(), requires additional parameters "cutoff" and "windowSize". optional parameter "parallel" will parallelize computation across multiple cores. default for this is FALSE. See target_assignment.window for additional details

  • "windowGauss": Gaussian window method of target assignment. Calls target_assignment.gauss(). Requires additional parameters "cutoff" and "windowSize". optional parameter "parallel" will parallelize computation across multiple cores. default for this is FALSE. See target_assignment.gauss for additional details

  • "user": user-specified method of target assignment. Calls target_assignment.user(). Requires additional parameters "userAssignedVector". See target_assignment.user for additional details

excludeFirstPass

(Default = FALSE) determines whether to include the false tracks from the first pass in the final data frame.

...

additional commands to be passed to each subfunction ( target.assignment.XXXXX() ). For example, all of the subfunctions require a cutoff parameter and the tho window methods (method = "windowSquare" or "windowGauss") each require the window size (windowSize) to be specified. See target_assignment for addiitonal details.

Value

A data frame with the same number of observations as the sensor data that was originally passed to target_track_distance(). Each sensor point in the original data set has been assigned to a target using the method specified by the user, and the output data provides the following summary statistics:

  • lonError: difference in longitude between the sensor point and assigned target at the time of the sensor point

  • latError: difference in latitude between the sensor point and assigned target at the time of the sensor point

  • altError: difference in altitude between the sensor point and assigned target at the time of the sensor point

  • bearingToTarget: bearing (azimuth) to target from ownship at the time of the sensor point

  • trackNum: the track number associated with this sensor data point

  • tgtAssigned: the ID of the target assigned to this sensor point

  • locationError: distance between sensor point and target at the given time

  • pointIndex: index referring to which of the original sensor data points this target-track pair refers. Necessary for comparisons in target_assignment()

  • time: the time that this sensor point was recorded

  • bearingError: difference in bearing between the sensor point and target at the time of the sensor point

  • downrangeError: difference in range to ownship between the sensor point and target

  • lon: longitude of the sensor point

  • lat: latitude of the sensor point

  • alt: altitude of the sensor point

  • rangeToShip: range from target to ownship at the time of the sensor data point

  • targetAspect: target aspect (as seen from ownship) at the time of the sensor data point

  • meanLocationError: (only in square and gauss window methods) mean distance between sensor point and target for all of the points included in the window

  • isFalseTrack: boolean indicating whether a point is outside the cutoff and therefore considered a false track

  • tgtXtrack: factor expressing the truthID.trackNum interaction

  • segmentNumber: an integer counting the number of times during which a single track is assigned to a particular target

Examples



# Example 1: speeding up the gaussian window method by
# eliminating some false tracks in the first pass

    target_assignment(scenario=scenarioMaker::example2_scenario,
     method = 'point', cutoff = 300) %>%
    target_assignment_secondpass(method = 'windowGauss',
     cutoff = 100, windowSize = 30)


# Example 2: Removing all whole tracks that are false tracks
# and keeping all of the data points for tracks that are not
# false tracks.  In the second pass, a large cutoff prevents
# any further points from being removed while allowing for
# tracks to switch targets

    target_assignment(scenario=scenarioMaker::example2_scenario,
     method = 'wholeTrack', cutoff = 200) %>%
    target_assignment_secondpass(method = 'windowGauss',
     cutoff = 5000, windowSize = 30)

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