Package crossedbearinglocaliser
Class CBDetectionMatcher
java.lang.Object
crossedbearinglocaliser.CBDetectionMatcher
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canMatch
(PamDataUnit unit1, PamDataUnit unit2) Can two data units match, based on the distance between their origins and the time difference between them.void
cleanOldData
(long timeMillis, int minToKeep) Clean up old data - anything having a time in it invalid input: '<' then the given time here since it will no longer be possible for anything to match.newData
(PamDataUnit dataUnit) Add new data into the matching system.
-
Constructor Details
-
CBDetectionMatcher
public CBDetectionMatcher(double speedOfSound)
-
-
Method Details
-
newData
Add new data into the matching system. First search existing groups, then see if we can match with existing unused data units, then give up and put it in the list of unused units.- Parameters:
dataUnit
- New data unit.- Returns:
- new group or group this unit was added to.
-
cleanOldData
public void cleanOldData(long timeMillis, int minToKeep) Clean up old data - anything having a time in it invalid input: '<' then the given time here since it will no longer be possible for anything to match.- Parameters:
timeMillis
- latest time for a group or data unit start.
-
canMatch
Can two data units match, based on the distance between their origins and the time difference between them.- Parameters:
unit1
- Data unit 1unit2
- Data unit 2- Returns:
- true if it's possible they are the same call on different hydrophone groups.
-