diff --git a/src/Map/MapRectProjector.java b/src/Map/MapRectProjector.java index 0b7e45a3..2c45a517 100644 --- a/src/Map/MapRectProjector.java +++ b/src/Map/MapRectProjector.java @@ -404,7 +404,7 @@ public class MapRectProjector extends MapProjector { private String findGpsTrackText(Point mousePoint, int ploNumberMatch) { GPSControl gpsControl = GPSControl.getGpsControl(); - if (gpsControl == null) { + if (gpsControl == null || mousePoint == null) { return null; } LatLong currentPos = getDataPosition(new Coordinate3d(mousePoint.x, mousePoint.y)); diff --git a/src/PamController/PamController.java b/src/PamController/PamController.java index 82b514ad..15b19eac 100644 --- a/src/PamController/PamController.java +++ b/src/PamController/PamController.java @@ -1382,7 +1382,7 @@ public class PamController implements PamControllerInterface, PamSettings { * @param sayEmpties dump info even if a buffer is empty (otherwise, only ones that have stuff still) */ public void dumpBufferStatus(String message, boolean sayEmpties) { - if (2 >1) return; + //if (2 >1) return; System.out.println("**** Dumping process buffer status: " + message); ArrayList pamControlledUnits = pamConfiguration.getPamControlledUnits(); for (PamControlledUnit aUnit : pamControlledUnits) { diff --git a/src/PamController/PamguardVersionInfo.java b/src/PamController/PamguardVersionInfo.java index 89102093..ddb47056 100644 --- a/src/PamController/PamguardVersionInfo.java +++ b/src/PamController/PamguardVersionInfo.java @@ -16,7 +16,7 @@ public class PamguardVersionInfo { * @return release type */ static public ReleaseType getReleaseType() { - return ReleaseType.CORE; + return ReleaseType.OTHER; } /** diff --git a/src/clickTrainDetector/clickTrainAlgorithms/mht/MHTClickTrainAlgorithm.java b/src/clickTrainDetector/clickTrainAlgorithms/mht/MHTClickTrainAlgorithm.java index 66fdabe3..bf312d7e 100644 --- a/src/clickTrainDetector/clickTrainAlgorithms/mht/MHTClickTrainAlgorithm.java +++ b/src/clickTrainDetector/clickTrainAlgorithms/mht/MHTClickTrainAlgorithm.java @@ -45,6 +45,7 @@ public class MHTClickTrainAlgorithm implements ClickTrainAlgorithm, PamSettings public static final String MHT_NAME = "MHT detector"; + /** * Reference to the click train control. */ @@ -354,6 +355,7 @@ public class MHTClickTrainAlgorithm implements ClickTrainAlgorithm, PamSettings TrackBitSet trackBitSet; TrackDataUnits trackUnits; if (nTracks>0) Debug.out.println("-------------------Grab Done Trains---------------"); + try { for (int i =0; i0) Debug.out.println("-------------------------------------------------"); diff --git a/src/clickTrainDetector/clickTrainAlgorithms/mht/MHTKernel.java b/src/clickTrainDetector/clickTrainAlgorithms/mht/MHTKernel.java index 3a4fb0ee..585d5d39 100644 --- a/src/clickTrainDetector/clickTrainAlgorithms/mht/MHTKernel.java +++ b/src/clickTrainDetector/clickTrainAlgorithms/mht/MHTKernel.java @@ -3,6 +3,7 @@ package clickTrainDetector.clickTrainAlgorithms.mht; import java.util.ArrayList; import java.util.BitSet; import java.util.Collections; +import java.util.Comparator; import PamUtils.PamArrayUtils; import PamguardMVC.debug.Debug; @@ -286,6 +287,7 @@ public class MHTKernel { MHTChi2 mhtChi2; int index; synchronized(trackSynchronisation) { + try { for (int i=0; i { //added the cloned bitset to not mess up references newPossibilities.add(new TrackBitSet(currentBitSet, mhtChi2)); } + } + catch (Exception e) { + System.out.printf("******* MHTKernel Exception %s in growProbMatrix: %s\n", e.getClass().getSimpleName(), e.getMessage()); + } } } @@ -348,10 +354,21 @@ public class MHTKernel { //first sort the tracks by increasing chi2 values. //sort the possible tracks by chi2 values //now sort the chi2 values so they correspond to the track list. - Collections.sort(newPossibleTracks, (left, right)->{ - //Note- this is definitely in the correct order - return Double.compare(left.chi2Track.getChi2(), right.chi2Track.getChi2()); - }); +// Collections.sort(newPossibleTracks, (left, right)->{ +// //Note- this is definitely in the correct order +// return Double.compare(left.chi2Track.getChi2(), right.chi2Track.getChi2()); +// }); + try { + Collections.sort(newPossibleTracks, new Comparator() { + @Override + public int compare(TrackBitSet left, TrackBitSet right) { + return Double.compare(left.chi2Track.getChi2(), right.chi2Track.getChi2()); + } + }); + } + catch (Exception e) { + System.out.printf("Handled MHTKernel Exception %s in pruneProbMatrix: %s\n", e.getClass().getSimpleName(), e.getMessage()); + } // for (int i=0; i