View source: R/ECSAS.find.suspicious.posn.R
ECSAS.find.suspicious.posn | R Documentation |
Find watches where the difference in distance traveled as calculated by lat/long vs dead reckoning seems suspicious, or where unreasonable speeds would be necessary.
ECSAS.find.suspicious.posn(
dat = NULL,
diff.thresh.pct = 50,
speed.thresh = 20,
leave = NULL,
debug = FALSE
)
dat |
a dataframe, such as returned by |
diff.thresh.pct |
(numeric, as percentage, default 50) maximum percentage of the smaller of the two distances that the difference is allowed to be before being flagged as problematic. |
speed.thresh |
(numeric, in knots, default 20) the function will return watches where the speed required to achieve the
distance traveled (given by start and end coordinates) would be greater than
|
leave |
(numeric, debualt NULL) vector of WatchID's to ignore problems with. Typically these will have been vetted by hand. |
This function uses two heuristics to find watches with suspicious position and/or speed and time information.
Firstly, it looks for watches whose length in km as calculated by dead-reckoning (speed * time)
is significantly different than that calculated by geosphere::distGeo()
using start and end
positions. A watch is flagged as significantly different if the difference between the two distance
measures is >= diff.thresh.pct
percent of the smaller of the two distances.
Secondly, for watches with both start and end positions, it looks for watches that would require an
unreasonable speed (greater than speed.thresh
) to achieve that distance during the watch (given by
dat$CalcDurMin
).
Returns dat
with the following additional columns added:
dist_geo_km | distance as calculated by geosphere::distGeo() |
dist_dr_km | distance as calculated by dead reckoning: PlatformSpeed * (CalcDurMin / 60) * 1.852 .
Note the conversion from nautical miles to km. |
dist_diff_km | difference in the two distances |
dist_pct_diff | percentage difference (of the smaller distance) |
reqd_speed | the speed (in knots) that would be required to move from the start location to the
end location during CalcDurMin
|
Dave Fifield
Only returns one row per watch even if there are multiple observations per watch.
ECSAS.extract()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.