-
Notifications
You must be signed in to change notification settings - Fork 10
Collision candidate detection
The behaviour-detector project includes the CollisionDetector class that finds collision candidates in a stream of VesselPosition.
Given a stream of VesselPositions ordered by ascending time, a sliding window of positions of duration D (say D=20 minutes) is maintained in memory (using an R-tree spatial index) and for each position P that arrives the window is searched for all positions (for vessels other than the vessel of P) within a certain maximum absolute time difference T (say T=5 minutes) and within a certain maximum distance (specified in lat, long separation which is a function of T and the maximum possible speed of vessels).
The list of positions is then tested for an extrapolated collision based on course and speed and a collision candidate is reported if circles drawn around extrapolated positions (of diameter equal to a factor F times the max dimension in metres of the vessel) intersect. The quadratic equation solved for this intersection is described in VesselPosition.intersectionTimes.
The algorithm as described is a rough first cut. Many refinements are possible (for instance the AIS set is not placed at the centre of the vessel) and collision candidate detection based also on interpolation might be desirable too.
This is a broad brush description of the algorithm and there are subtleties not mentioned that will need to be described here when time permits.