View source: R/target_assignment.R
target_assignment | R Documentation |
This is the function that determines which target each sensor point is assigned to and whether the point can be determined to be a false track. The call to target_assignment() is largely a switch that calls the target assignment subfunctions described below. After calling the subfunction it rearranges the target IDs into alphabetical order for plotting purposes and then returns a data frame with the same number of observations as the original sensor data input.
As an example, if there were four targets (A through D) that were originally input into target_track_distance
, the output of that function included the distance of every sensor point (with unique number pointIndex) to all four targets. Therefore, if sensorData had N observations, the output of target_track_distance() has 4N observations, and the output of target_assignment() has N observations.
target_assignment(scenario, method, ...)
scenario |
a scenario containing either the output of target_track_distance(), or its component pieces (targetTruth, ownShipTruth, sensorData) |
method |
string specifying which subfunction to call. Options include:
|
... |
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. |
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
@import scenarioMaker
cutoff= 2000
windowSize = 35
myScenario=target_assignment(scenario=scenarioMaker::example2_scenario,
method='windowGauss',
cutoff=cutoff,
windowSize=windowSize)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.