View source: R/target_ownship_distance.R
target_ownship_distance | R Documentation |
NOTE: This function is called automatically by create_scenario(). If you're using this, you likely want create_scenario() as it runs not only this function but also creates a scenario that can be used in most other functions in this package. If you're thinking of using this, check out create_scenario() first and make sure that you really want this function.
This function is a simplified version of target_track_distance() that calculates only the truth ranges and bearings of each target during the test. It may be important when trying to compare the sensor results to the truth data. For example, if one target was never detected by the sensor system then the results of target_track_distance() and target_assignment() would give no information about how close it came to ownship during the test because those functions deal primarily with the output of the sensor system. target_ownship_distance() will calculate find this information which can be combined with other outputs to get a more complete picture of the test and how the sensor system compared to this.
This functions works similarly to target_track_distance. The lon, lat, and alt of each target is interpolated to the time of ownship position measurements using a spheroidal Earth (WGS84). Nautilus uses the function interp_ellipse() to interpolate these positions. To avoid discontinuities (i.e., the jump from 359 degrees to 0), target headings are interpolated by first converting to sin and cos.
The target ranges are calculated using the straight-line distance by converting lon/lat/alt of the target and ownship to cartesian coordinates and then taking the square root of the sum of the squares.
This function can be used as a stand alone function or in conjunction with analysis functions to get the truth ranges and bearings of each target during the test.
target_ownship_distance(truthData, ownShipData)
truthData |
truthData: data frame containing all of the truth data for each target (likely from GPS or land-based radar systems). MUST have the following columns:
|
ownShipData |
data frame containing all of the truth position of the sensor system (likely from GPS or land-based radar systems). This may be ownship if testing something on a ship or the lat/lon position of a stationary ststem. MUST have the following columns:
|
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.