Class CBDetectionMatcher

java.lang.Object
crossedbearinglocaliser.CBDetectionMatcher

public class CBDetectionMatcher extends Object
  • Constructor Details

    • CBDetectionMatcher

      public CBDetectionMatcher(double speedOfSound)
  • Method Details

    • newData

      public CBDetectionMatcher.CBMatchGroup newData(PamDataUnit dataUnit)
      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

      public boolean canMatch(PamDataUnit unit1, PamDataUnit unit2)
      Can two data units match, based on the distance between their origins and the time difference between them.
      Parameters:
      unit1 - Data unit 1
      unit2 - Data unit 2
      Returns:
      true if it's possible they are the same call on different hydrophone groups.