View source: R/track_ownship_distance.R
track_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() (and the closely-related target_ownship_distance()) that calculates only the ranges and bearings of each sensor track during the test. This function may be important when inspecting where the sensor system believed that the targets were and when initially inspecting data. For example, some data that you receive may show the sensor system's reference frame during operation, and this function will return the results of where the sensor system believed that there were targets.
This functions works similarly to target_track_distance() and target_ownship_distance(). The lon, lat, and alt of ownShip is interpolated to the time of the sensor system measurements using a spheroidal Earth (WGS84 projection). 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 slant 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. The ground ranges are claculated using the WGS84 projection.
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.
track_ownship_distance(sensorData, ownShipData)
sensorData |
data frame containing each sensor point for all of the tracks. 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 track (straight-line distance)
groundRange: range from ownship to the track (along surface of spheroidal Earth)
trueBearingToTarget: true bearing (azimuth) to the target at this time
relBearingToTarget: relative bearing (azimuth) to the target at this time
trackNum: unique identifier for the track
trackLon: target longitude at this time
trackLat: target latitude at this time
trackAlt: target altitude at this time
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.