diff --git a/README.html b/README.html index a8b1ad86..601738b5 100644 --- a/README.html +++ b/README.html @@ -463,25 +463,41 @@ name="_Latest_Version_2.02.08">Latest Version 2.02.08 May which mostly occurred when processing large datasets of many offline files, has been fixed.
+Data Map: “Scroll To Data” pop-up menu, +which didn’t always scroll to the correct place, is now fixed.
+ +Bearing Localiser offline: If reprocessing +bearings, the localizer was not correctly loading required raw or FFT data to +input to the cross correlation algorithm. This is now fixed so that you can +reprocess bearings in viewer mode.
+ +Map files: Added additional exception handlers +to handle corrupt map files.
+Restart Options: When you restart processing of offline files, if output data already exist (binary data of -within database tables) you will be asked if you want to overwrite the data, cancel, -or try to continue from where to left off.
+within database tables) you will be asked if you want to overwrite the data, +cancel, or try to continue from where to left off.Updated SoundTrap sud file interface so that PAMGuard now extracts and stores the Click Detector settings from the sud files and stores them within the PAMGuard configuration. This does not affect processing, but is important for record keeping.
+GPS options to use any valid RMC or GGA +string. Not all GPS receivers output their RMC data as GPRMC – e.g. some may +output as GNRMC. A new option allows the GPS module to use any string, whatever +the first two characters of the string name may be.
+Use of localization sensor and orientation -data for static hydrophones had a bug whereby it would continually ‘forget’ -angle offsets applied to static hydrophones in viewer mode. This is now fixed.
+data for static hydrophones had a bug whereby it would continually ‘forget’ angle +offsets applied to static hydrophones in viewer mode. This is now fixed.Click tool bar: Correctly shows event selection options even if no species classification options are in place.
@@ -491,8 +507,8 @@ selection options even if no species classification options are in place.ROCCA: Fixed (another) memory leak which -caused PAMGuard to crash when processing large data sets with the ROCCA classifier. -
+caused PAMGuard to crash when processing large data sets with the ROCCA +classifier.Ishmael Modules: Fixed bug which occasionally caused crashes when processing many files offline.
@@ -509,10 +525,10 @@ generates random chirps between around 200 and 800Hz, roughly the frequency you’d expect sound from higher frequency baleen whales, such as humpbacks, to vocalise at. -Hiding tool tips. A menu item to -permanently turn off all tool tips, or tap the ‘Esc’ key to turn them off for 6 -seconds if they are getting in the way, particularly when trying to interact -with displays using the mouse.
+Hiding tool tips. A menu item to permanently +turn off all tool tips, or tap the ‘Esc’ key to turn them off for 6 seconds if +they are getting in the way, particularly when trying to interact with displays +using the mouse.
This version of PAMGuard has been bundled with Java 16 -(OpenJDK release), so you will not need to install a java runtime engine -separately. PSFX files generated in previous beta releases (2.xx.xx) should be -compatible with this version, and vice-versa. PSF files generated in core -releases (1.15.xx) can be loaded in this version, but will be converted to PSFX -files when PAMGuard exits.
+This version of PAMGuard has been bundled with Java 16 (OpenJDK +release), so you will not need to install a java runtime engine separately. +PSFX files generated in previous beta releases (2.xx.xx) should be compatible +with this version, and vice-versa. PSF files generated in core releases +(1.15.xx) can be loaded in this version, but will be converted to PSFX files +when PAMGuard exits.
@@ -723,8 +739,8 @@ params
3. Bug - 492. Data Model does not update button//tooltip text when underlying -data changes
+ 492. Data Model does not update button//tooltip text when underlying data +changes4. Bug @@ -800,9 +816,9 @@ Update whistle and moan detector to better handle small stubs or spurs coming off the side of whistles
13. -Extend the Hyperbolic Localiser to handle 2D planar arrays (previously limited -to 3D volumetric arrays)
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Extend the Hyperbolic Localiser to handle 2D planar arrays +(previously limited to 3D volumetric arrays)14. @@ -816,20 +832,20 @@ decimating/upsampling by a non-integer amount
16. Noise Level Outputs - as an aid to performance diagnosis, some detectors -(currently the GPL, Click Detector and Whistle and Moan Detector) are outputting -additional noise metrics to their binary output files. These can be read with -the PAMGuard +(currently the GPL, Click Detector and Whistle and Moan Detector) are +outputting additional noise metrics to their binary output files. These can be +read with the PAMGuard Matlab library and used to diagnose system performance in varying noise conditions. Improved displays within PAMGuard for these noise metrics will be included in a future release.
17. -An implementation of the Generalized Power Law Detector, developed by Tyler -Helble ([Helble et al., ‘A generalized power-law detection algorithm for humpback -whale vocalizations’, The Journal of the Acoustical Society of America, vol. -131, no. 4, pp. 2682–2699, 2012) is now available. For details, see the -online help
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> An implementation of the Generalized Power Law Detector, +developed by Tyler Helble ([Helble et al., ‘A generalized power-law +detection algorithm for humpback whale vocalizations’, The Journal of the +Acoustical Society of America, vol. 131, no. 4, pp. 2682–2699, 2012) is now +available. For details, see the online help18. @@ -850,11 +866,11 @@ understand the notes listed for Beta Version 2.00.10 before proceeding with installation and use of this version.
-This version of PAMGuard has been bundled with Java 13 -(release 13.0.1). PSFX files generated in previous beta releases (2.xx.xx) -should be compatible with this version, and vice-versa. PSF files generated in -core releases (1.15.xx) can be loaded in this version, but will be converted to -PSFX files when PAMGuard exits.
+This version of PAMGuard has been bundled with Java 13 (release +13.0.1). PSFX files generated in previous beta releases (2.xx.xx) should be +compatible with this version, and vice-versa. PSF files generated in core +releases (1.15.xx) can be loaded in this version, but will be converted to PSFX +files when PAMGuard exits.
Bug Fixes
@@ -941,9 +957,9 @@ lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> &nb lang=EN-US> Better auto-scaling in Ishmael Detector graphics window.7. -Change to Windows temporary folder location, to get around Windows Security -settings that were preventing some modules from working properly.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Change to Windows temporary folder location, to get around Windows +Security settings that were preventing some modules from working properly. @@ -999,8 +1015,8 @@ lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> &nb8. Bug - 460. Click Detector BT Display vertical axis shows all zeroes when -zooming out
+ 460. Click Detector BT Display vertical axis shows all zeroes when zooming +out9. Bug @@ -1171,8 +1187,8 @@ lang=EN-US> Bug 436. Bug in Serial Port interface was occassionally causing PAMGuard to crash without error message.
5. -Bug 437. Right whale detector crashing if no input was set.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Bug 437. Right whale detector crashing if no input was set.6. @@ -1283,8 +1299,8 @@ Added a few new options to the Click Detector Sweep Classifier.
10. Add option to the Map module's Plot Overlay Options dialog, -to show events occuring in the future (look +lang=EN-US> Add option to the Map module's Plot Overlay Options dialog, to +show events occuring in the future (look ahead) instead of the default display of events which have already occurred. Can make it easier to match up the map with clicks seen in the Click Detector display.
@@ -1605,9 +1621,9 @@ from many channels.3. -Bugs 398 and 399. Click Detector, FFT Engine and Filter modules were -losing source during startup, if the source selected was not the first raw data -source in the list.
+Bugs 398 and 399. Click Detector, FFT Engine and Filter modules were losing +source during startup, if the source selected was not the first raw data source +in the list.4. @@ -1721,10 +1737,10 @@ lang=EN-US> Better way of coupling scrollers in User Display panels - see new options in main menu.
2. -Added Matched Template Click Classifier. Classifies clicks based on an ideal -template to match and a template to reject. An example of this is to classify -beaked whale clicks in an environment with dolphin clicks.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Added Matched Template Click Classifier. Classifies clicks based +on an ideal template to match and a template to reject. An example of this is +to classify beaked whale clicks in an environment with dolphin clicks.3. @@ -1988,8 +2004,8 @@ invalid parameters. Have added diagnostics to prevent this.
Upgrades
1. -User is now able to specify Soundtrap date/time format
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> User is now able to specify Soundtrap date/time format @@ -2081,9 +2097,9 @@ Added circular movement option to source simulationPAMGuard Version 2 contains major updates.
-You should read and understand these notes before proceeding with installation
-and use of this version. These changes have been funded under contract to NOAA
+ PAMGuard Version 2 contains major updates. You
+should read and understand these notes before proceeding with installation and
+use of this version. These changes have been funded under contract to NOAA
Fisheries, contract no. WE-133F-16-SE-1126.Binary File Structural Changes
@@ -2161,10 +2177,10 @@ so they will no longer work with older PAMGuard versions.
2. -Display colour options will be lost and most data displayed -on the map may default to black. This is due to the above changes to how -colours are managed. Changing back to the colours of your choice is relatively -simple through the PAMGuard GUI.
+Display colour options will be lost and most data +displayed on the map may default to black. This is due to the above changes to +how colours are managed. Changing back to the colours of your choice is +relatively simple through the PAMGuard GUI.@@ -2220,14 +2236,14 @@ switches/parameters to be included in *.ini files.
1. -Bug 308. Map Overlay Control. Storage of data -saying what get's plotted on each map and for how long became corrupted and the -list grew to a ridiculous size. Code has been put in place to a) stop it -happening again and b) to repair any configuration files which are corrupted. -Corrupted files will be slow to load, slow to save and will be > several -megabytes in size. It may be necessary to delete the PamguardSettings table in -any databases since these too may have become oversized which will slow down -viewer mode PAMGuard start-up.
+Bug 308. Map Overlay Control. Storage of data saying +what get's plotted on each map and for how long became corrupted and the list +grew to a ridiculous size. Code has been put in place to a) stop it happening +again and b) to repair any configuration files which are corrupted. Corrupted +files will be slow to load, slow to save and will be > several megabytes in +size. It may be necessary to delete the PamguardSettings table in any databases +since these too may have become oversized which will slow down viewer mode +PAMGuard start-up.2. @@ -2488,8 +2504,8 @@ detector has been tidied up so that there are a) All Click, b) Tracked Clicks lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> When tracking online, all the click marking information is written to the same database tables as are used for offline target motion -analysis. This means than when reviewing data offline, the tracks created in real -time are now available for review and further analysis.
+analysis. This means than when reviewing data offline, the tracks created in +real time are now available for review and further analysis.4. @@ -2517,9 +2533,9 @@ the future.
Logger Form Design
-A GUI driven system for designing Logger forms has been -released. Currently, this feature has no online help, but is reasonably -intuitive compared to the old method of typing directly into the database.
+A GUI driven system for designing Logger forms has been released. +Currently, this feature has no online help, but is reasonably intuitive +compared to the old method of typing directly into the database.
Improved Number handling
@@ -2719,8 +2735,8 @@ same click multiple times1. -Bug 253. Database import fails when Access database -contains queries. Fixed.
+Bug 253. Database import fails when Access database contains +queries. Fixed.2. @@ -2825,10 +2841,10 @@ displaying in the viewer. This is now fixed.
3. -Bug 248. Crash in hydrophone array manager. Bug in -array manager would crash PAMGuard when the click detector was configured with -more channels than the sound acquisition system (almost impossible to achieve, -but someone managed it).
+Bug 248. Crash in hydrophone array manager. Bug in array +manager would crash PAMGuard when the click detector was configured with more +channels than the sound acquisition system (almost impossible to achieve, but +someone managed it).4. @@ -2897,8 +2913,8 @@ writing results files. Fixed.
7. -Bug 237. Logger forms not saving data to database after sound -acquisition starts. Fixed.
+Bug 237. Logger forms not saving data to database after sound acquisition +starts. Fixed.8. @@ -2941,15 +2957,15 @@ which is useful when using PAMGuard for demonstration purposes.
lang=EN-US>4. The sound File and Folder audio input systems now have an optional time zone setting. Note that PAMGuard analysis should still all be taking place in -UTC and that this option is intended to allow the conversion of file times -which were not recorded as UTC into UTC and not the other way around. Use the -option with caution ! +UTC and that this option is intended to allow the conversion of file times which +were not recorded as UTC into UTC and not the other way around. Use the option +with caution !5. -The Open Office Database system has been removed from the list of -available options since it is not reliable. If you require a free database -solution we recommend you use the MySql Community Server The Open Office Database system has been removed from the list of available +options since it is not reliable. If you require a free database solution we +recommend you use the MySql Community Server http://dev.mysql.com/downloads/mysql/
Wild ArcGIS Interface (Maps and Mapping group) This module, developed by Michael Oswald / SWFSC, allows
-PAMGuard to output data in a format suitable for display in the WILD ArcGIS marine
-mammal survey package. See online help for details.
Alarms (Utilities Group)
@@ -3380,9 +3396,9 @@ other data sources for the PAMGuard viewer.Database
-Can now copy data from binary -storage to the database offline for any module having both binary and database -storage.
+Can now copy data from binary storage +to the database offline for any module having both binary and database storage. +
Can create a blank MS Access database (2007 and later *.accdb formats only).
@@ -3475,9 +3491,9 @@ have implemented database storage for output of these modules.' -Radar Display: A bug which stopped the radar display from correctly displaying -bearings to whistles from arrays containing more than two hydrophone elements -has been fixed.
+Radar Display: A bug which stopped the radar display from correctly +displaying bearings to whistles from arrays containing more than two hydrophone +elements has been fixed.' @@ -3533,8 +3549,8 @@ start-up.
' Bug in Noise Monitor. Version 1.11.01 would crash if only a subset of -channels were selected, e.g. if you only measured noise on channel 0 of a two -channel configuration. This bug is now fixed
+channels were selected, e.g. if you only measured noise on channel 0 of a two channel +configuration. This bug is now fixed' -Wigner time-frequency plot for the click detector. Clicks are NOT automatically -displayed in the Winger window as they are for the waveform and spectrum -windows since the Wigner transformation is very time consuming. Clicks will be -displayed if you select them with the mouse.
+Wigner time-frequency plot for the click detector. Clicks are NOT +automatically displayed in the Winger window as they are for the waveform and +spectrum windows since the Wigner transformation is very time consuming. Clicks +will be displayed if you select them with the mouse.' @@ -4091,9 +4106,8 @@ methods used in PAMGUARD
New Modules
-Two new modules are packaged. These are still in the final -stages of development. Feedback is most welcome. See online help for further -details.
+Two new modules are packaged. These are still in the final stages +of development. Feedback is most welcome. See online help for further details.
Whistle and Moan Detector
@@ -4120,9 +4134,9 @@ Symbol'>'' -Channel lists in output data streams of Decimator and other modules fixed, -so that when channel numbers change, downstream modules configurations get the -correct list of available channels. +Channel lists in output data streams of Decimator and other modules +fixed, so that when channel numbers change, downstream modules configurations +get the correct list of available channels.' @@ -4334,8 +4348,8 @@ acquisition.
Bug fixes
-Speed up of graphics, particularly regarding large -quantities of gps track data
+Speed up of graphics, particularly regarding large quantities +of gps track data
National Instruments cards with names > 20 characters long are now correctly recognised.
@@ -4763,8 +4777,8 @@ Symbol'>'' -Multi animal click tracking with least squares fit calculation of position -on map +Multi animal click tracking with least squares fit calculation of +position on map'
diff --git a/src/Acquisition/FolderInputSystem.java b/src/Acquisition/FolderInputSystem.java
index 3eed96ec..f3a33ed4 100644
--- a/src/Acquisition/FolderInputSystem.java
+++ b/src/Acquisition/FolderInputSystem.java
@@ -104,9 +104,13 @@ public class FolderInputSystem extends FileInputSystem implements PamSettings, D
boolean ans = super.prepareInputFile();
if (ans == false && ++currentFile < allFiles.size()) {
System.out.println("Failed to open sound file. Try again with file " + allFiles.get(currentFile).getName());
-
+ /*
+ * jumping striaght to the next file messes it up if it thinks the files
+ * are continuous, so we HAVE to stop and restart.
+ */
+// return prepareInputFile();
PamController.getInstance().pamStop();
- PamController.getInstance().startLater();
+ PamController.getInstance().startLater(false);
}
return ans;
}
@@ -614,16 +618,16 @@ public class FolderInputSystem extends FileInputSystem implements PamSettings, D
long currFileEnd = 0;
if (currentFile >= 0) {
try {
- WavFileType currentWav = allFiles.get(currentFile);
- currFileStart = getFileStartTime(currentWav.getAbsoluteFile());
- if (audioStream != null) {
- fileSamples = audioStream.getFrameLength();
- currFileLength = (long) (fileSamples * 1000 / audioStream.getFormat().getFrameRate());
- currFileEnd = currFileStart + currFileLength;
- }
+ WavFileType currentWav = allFiles.get(currentFile);
+ currFileStart = getFileStartTime(currentWav.getAbsoluteFile());
+ if (audioStream != null) {
+ fileSamples = audioStream.getFrameLength();
+ currFileLength = (long) (fileSamples * 1000 / audioStream.getFormat().getFrameRate());
+ currFileEnd = currFileStart + currFileLength;
+ }
}
catch (Exception e) {
-
+
}
}
if (currFileEnd == 0) {
@@ -648,7 +652,17 @@ public class FolderInputSystem extends FileInputSystem implements PamSettings, D
}
setFolderProgress();
// sayEta();
- ans = prepareInputFile();
+ /*
+ * I think that here, we just need a check of the file. the prepareInputFile in
+ * this class will (on failure) move straight to the next file and also issue a
+ * stop/start, which is not good if it's trying a continuous file, where this is
+ * being called, if false is returned it should manage moving onto the next file by
+ * itself if we use the super.prep ....
+ */
+ ans = super.prepareInputFile();
+ if (ans == false) {
+ return false;
+ }
currentFileStart = System.currentTimeMillis();
// if (ans && audioFormat.getSampleRate() != currentSampleRate && currentFile > 0) {
// acquisitionControl.getDaqProcess().setSampleRate(currentSampleRate = audioFormat.getSampleRate(), true);
diff --git a/src/Acquisition/filetypes/SUDFileType.java b/src/Acquisition/filetypes/SUDFileType.java
index 80fd0a36..ef1d8a7a 100644
--- a/src/Acquisition/filetypes/SUDFileType.java
+++ b/src/Acquisition/filetypes/SUDFileType.java
@@ -22,7 +22,7 @@ public class SUDFileType extends SoundFileType {
if (isShown) {
return;
}
- WarnOnce.showWarning("SoundTrap SUD Files", sudInfoText, WarnOnce.OK_OPTION);
+// WarnOnce.showWarning("SoundTrap SUD Files", sudInfoText, WarnOnce.OK_OPTION);
isShown = true;
}
diff --git a/src/Acquisition/pamAudio/SudAudioFile.java b/src/Acquisition/pamAudio/SudAudioFile.java
index b496301d..70c3eb46 100644
--- a/src/Acquisition/pamAudio/SudAudioFile.java
+++ b/src/Acquisition/pamAudio/SudAudioFile.java
@@ -48,9 +48,9 @@ public class SudAudioFile extends WavAudioFile {
}
// don't do anything and it will try the built in Audiosystem
catch (UnsupportedAudioFileException e) {
- System.err.println("Could not open sud file: not a supported file " + soundFile.getName());
-
- e.printStackTrace();
+ System.err.println("UnsupportedAudioFileException: Could not open sud file: not a supported file " + soundFile.getName());
+ System.err.println(e.getMessage());
+// e.printStackTrace();
} catch (IOException e) {
System.err.println("Could not open sud file: IO Exception: " + soundFile.getName());
diff --git a/src/Acquisition/pamAudio/SudAudioFileReader.java b/src/Acquisition/pamAudio/SudAudioFileReader.java
index ba407e54..07de8053 100644
--- a/src/Acquisition/pamAudio/SudAudioFileReader.java
+++ b/src/Acquisition/pamAudio/SudAudioFileReader.java
@@ -46,7 +46,8 @@ public class SudAudioFileReader {
try {
sudAudioInputStream = SudAudioInputStream.openInputStream(file, sudParams, false);
} catch (Exception e) {
- e.printStackTrace();
+ String msg = String.format("Corrupt sud file %s: %s", file.getName(), e.getMessage());
+ throw new UnsupportedAudioFileException(msg);
}
return sudAudioInputStream;
}
diff --git a/src/GPS/GPSControl.java b/src/GPS/GPSControl.java
index d4434f5a..4bbca604 100644
--- a/src/GPS/GPSControl.java
+++ b/src/GPS/GPSControl.java
@@ -245,6 +245,31 @@ public class GPSControl extends PamControlledUnit implements PamSettings, Positi
public GpsDataUnit getShipPosition(long timeMilliseconds) {
return getGpsDataBlock().getClosestUnitMillis(timeMilliseconds);
}
+ /**
+ * Do we want this string ? It will be either RMC or GGA and may want wildcarding
+ * @param stringId
+ * @return
+ */
+ public boolean wantString(String stringId) {
+ if (stringId == null || stringId.length() < 6) {
+ return false;
+ }
+ if (gpsControl.gpsParameters.allowWildcard) {
+ String lastBit = stringId.substring(3, 6);
+ switch (gpsControl.gpsParameters.mainString) {
+ case GPSParameters.READ_RMC:
+ return lastBit.equals("RMC");
+ case GPSParameters.READ_GGA:
+ return lastBit.equals("GGA");
+ default:
+ return false;
+ }
+ }
+ else {
+ String wantedString = gpsControl.getWantedString();
+ return stringId.equals(wantedString);
+ }
+ }
/**
* Get the name of the string we're wanting.
diff --git a/src/GPS/GPSParameters.java b/src/GPS/GPSParameters.java
index 1046907f..719a59ca 100644
--- a/src/GPS/GPSParameters.java
+++ b/src/GPS/GPSParameters.java
@@ -59,6 +59,8 @@ public class GPSParameters implements Serializable, Cloneable, ManagedParameters
public String rmcInitials = "GP";
public String ggaInitials = "GP";
+ public boolean allowWildcard = true;
+
/**
* Attempt to read true heading information
*/
diff --git a/src/GPS/GPSParametersDialog.java b/src/GPS/GPSParametersDialog.java
index 73180239..6c54f139 100644
--- a/src/GPS/GPSParametersDialog.java
+++ b/src/GPS/GPSParametersDialog.java
@@ -149,9 +149,9 @@ public class GPSParametersDialog extends PamDialog {
}
}
public static GPSParameters showDialog(Frame parentFrame, GPSParameters gpsParameters) {
- if (parentFrame != lastFrame || gpsParametersDialog == null) {
+// if (parentFrame != lastFrame || gpsParametersDialog == null) {
gpsParametersDialog = new GPSParametersDialog(parentFrame);
- }
+// }
gpsParametersDialog.gpsParameters = gpsParameters.clone();
gpsParametersDialog.setParams();
gpsParametersDialog.setVisible(true);
@@ -335,6 +335,7 @@ public class GPSParametersDialog extends PamDialog {
JRadioButton ggaString;
JTextField rmcInitials;
JTextField ggaInitials;
+ JCheckBox allowWildcard;
public MainStringPanel() {
super();
setBorder(new TitledBorder("Main Nav' data string"));
@@ -344,9 +345,17 @@ public class GPSParametersDialog extends PamDialog {
c.fill = GridBagConstraints.HORIZONTAL;
ButtonGroup buttonGroup = new ButtonGroup();
-
+
+ c.gridx = 0;
+ c.gridy++;
+ c.gridwidth = 5;
+ this.add(allowWildcard = new JCheckBox("Allow any string initials"), c);
+ allowWildcard.setToolTipText("Use RMC or GGA data from any source independent of the string initials (e.g. GP, GN, etc.)");
+ c.gridy ++;
+ c.gridwidth = 1;
+ c.gridx=0;
addComponent(this, new JLabel("RMC String"), c);
- c.gridx++;
+ c.gridx ++;
addComponent(this, rmcString = new JRadioButton(""), c);
c.gridx++;
addComponent(this, rmcInitials = new JTextField(2), c);
@@ -355,6 +364,7 @@ public class GPSParametersDialog extends PamDialog {
c.gridx = 0;
c.gridy ++;
+ c.gridwidth = 1;
addComponent(this, new JLabel("GGA String"), c);
c.gridx++;
addComponent(this, ggaString = new JRadioButton(""), c);
@@ -363,6 +373,7 @@ public class GPSParametersDialog extends PamDialog {
c.gridx++;
addComponent(this, new JLabel(" GGA"), c);
+ allowWildcard.addActionListener(this);
rmcString.addActionListener(this);
ggaString.addActionListener(this);
buttonGroup.add(rmcString);
@@ -374,10 +385,12 @@ public class GPSParametersDialog extends PamDialog {
ggaString.setSelected(gpsParameters.mainString == GPSParameters.READ_GGA);
rmcInitials.setText(gpsParameters.rmcInitials);
ggaInitials.setText(gpsParameters.ggaInitials);
+ allowWildcard.setSelected(gpsParameters.allowWildcard);
enableControls();
}
public boolean getParams() {
+ gpsParameters.allowWildcard = allowWildcard.isSelected();
if (ggaString.isSelected()) {
gpsParameters.mainString = GPSParameters.READ_GGA;
}
@@ -385,12 +398,12 @@ public class GPSParametersDialog extends PamDialog {
gpsParameters.mainString = GPSParameters.READ_RMC;
}
gpsParameters.rmcInitials = rmcInitials.getText();
- if (gpsParameters.rmcInitials.length() != 2) {
- return false;
+ if (gpsParameters.rmcInitials.length() != 2 && !gpsParameters.allowWildcard) {
+ return showWarning("Expecting a two character identifier for RMC strings");
}
gpsParameters.ggaInitials = ggaInitials.getText();
- if (gpsParameters.ggaInitials.length() != 2) {
- return false;
+ if (gpsParameters.ggaInitials.length() != 2 && !gpsParameters.allowWildcard) {
+ return showWarning("Expecting a two character identifier for GGA strings");
}
return true;
}
@@ -400,8 +413,9 @@ public class GPSParametersDialog extends PamDialog {
}
private void enableControls() {
- rmcInitials.setEnabled(rmcString.isSelected());
- ggaInitials.setEnabled(ggaString.isSelected());
+ boolean wild = allowWildcard.isSelected();
+ rmcInitials.setEnabled(rmcString.isSelected() & !wild);
+ ggaInitials.setEnabled(ggaString.isSelected() & !wild);
}
diff --git a/src/GPS/ProcessNmeaData.java b/src/GPS/ProcessNmeaData.java
index ca1d4cd3..b293a0c6 100644
--- a/src/GPS/ProcessNmeaData.java
+++ b/src/GPS/ProcessNmeaData.java
@@ -57,7 +57,7 @@ public class ProcessNmeaData extends PamProcess {
private GpsLogger gpsLogger;
- private String wantedString = "$GPRMC";
+// private String wantedString = "$GPRMC";
private GpsDataUnit previousUnit = null;
@@ -161,7 +161,7 @@ public class ProcessNmeaData extends PamProcess {
@Override
public void noteNewSettings() {
findNMEADataBlock();
- setWantedString();
+// setWantedString();
double minRate = Math.max(.2, 1./gpsController.gpsParameters.readInterval);
processCheck.getOutputCounter().setMinRate(minRate);
}
@@ -179,7 +179,8 @@ public class ProcessNmeaData extends PamProcess {
StringBuffer nmeaString = nmeaData.getCharData();
String stringId = NMEADataBlock.getSubString(nmeaString, 0);
- if (stringId.equalsIgnoreCase(wantedString)) {
+// if (stringId.equalsIgnoreCase(wantedString)) {
+ if (gpsController.wantString(stringId)) {
gpsData = new GpsData(nmeaString, gpsController.gpsParameters.mainString); // GpsData constructor which
// unpacks the string.
if (gpsData.isDataOk()) {
@@ -316,13 +317,13 @@ public class ProcessNmeaData extends PamProcess {
super.clearOldData();
}
- public String getWantedString() {
- return wantedString;
- }
-
- public void setWantedString() {
- wantedString = gpsController.getWantedString();
- }
+// public String getWantedString() {
+// return wantedString;
+// }
+//
+// public void setWantedString() {
+// wantedString = gpsController.getWantedString();
+// }
public GPSControl getGpsController() {
return gpsController;
diff --git a/src/GPS/UpdateClockDialog.java b/src/GPS/UpdateClockDialog.java
index 9c266b64..03a33bf1 100644
--- a/src/GPS/UpdateClockDialog.java
+++ b/src/GPS/UpdateClockDialog.java
@@ -221,9 +221,8 @@ public class UpdateClockDialog extends JDialog implements ActionListener, PamObs
// NMEADataBlock nmeaDataBlock = (NMEADataBlock) o;
NMEADataUnit nmeaDataUnit = (NMEADataUnit) arg;
StringBuffer nmeaData = nmeaDataUnit.getCharData();
- String wantedString = gpsControl.getWantedString();
String stringId = NMEADataBlock.getSubString(nmeaData, 0);
- if (wantedString.equals(stringId) == false) {
+ if (gpsControl.wantString(stringId) == false) {
return;
}
if (gpsControl.gpsParameters.mainString == GPSParameters.READ_GGA) {
@@ -232,6 +231,8 @@ public class UpdateClockDialog extends JDialog implements ActionListener, PamObs
newRMCData(nmeaData);
}
}
+
+
@Override
public void updateData(PamObservable observable, PamDataUnit pamDataUnit) {
// TODO Auto-generated method stub
diff --git a/src/Localiser/detectionGroupLocaliser/TMGroupLocInfo.java b/src/Localiser/detectionGroupLocaliser/TMGroupLocInfo.java
index ace2b8aa..5ceef849 100644
--- a/src/Localiser/detectionGroupLocaliser/TMGroupLocInfo.java
+++ b/src/Localiser/detectionGroupLocaliser/TMGroupLocInfo.java
@@ -810,6 +810,9 @@ public class TMGroupLocInfo implements GroupLocInfo {
for (int i = 0; i < nSubDetections; i++) {
localisation = getParentDetection().getSubDetection(i).getLocalisation();
+ if (localisation == null) {
+ continue;
+ }
angles = localisation.getAngles();
angleErrors = localisation.getAngleErrors();
@@ -879,6 +882,10 @@ public class TMGroupLocInfo implements GroupLocInfo {
totalVectors += nVectors;
}
+ if (totalVectors == 0) {
+ return;
+ }
+
//now create the separate arrays for different ambiguities.
/**
*
diff --git a/src/PamController/PamguardVersionInfo.java b/src/PamController/PamguardVersionInfo.java
index b83f6404..cc7a70bd 100644
--- a/src/PamController/PamguardVersionInfo.java
+++ b/src/PamController/PamguardVersionInfo.java
@@ -31,12 +31,12 @@ public class PamguardVersionInfo {
* Version number, major version.minorversion.sub-release.
* Note: can't go higher than sub-release 'f'
*/
- static public final String version = "2.02.08";
+ static public final String version = "2.02.08a";
/**
* Release date
*/
- static public final String date = "9 May 2023";
+ static public final String date = "30 May 2023";
// /**
// * Release type - Beta or Core
diff --git a/src/PamController/settings/SettingsImport.java b/src/PamController/settings/SettingsImport.java
index ac4736a9..2269b3f7 100644
--- a/src/PamController/settings/SettingsImport.java
+++ b/src/PamController/settings/SettingsImport.java
@@ -1,5 +1,6 @@
package PamController.settings;
+import java.io.ByteArrayInputStream;
import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
@@ -14,6 +15,7 @@ import PamController.PamController;
import PamController.PamSettingManager;
import PamController.PamSettings;
import PamController.PamSettingsGroup;
+import PamModel.PamModel;
import PamModel.PamModuleInfo;
import PamModel.SMRUEnable;
import PamView.dialog.PamFileBrowser;
@@ -226,7 +228,13 @@ public class SettingsImport {
ownerClass = Class.forName(aSet.getOwnerClassName());
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
+// e.printStackTrace();
+ // this is happening since the ownerclassname is not set correctly in psfx files
+ // so we have to deserialise the data to find the class.
+// ownerClass = getClassFromData(aSet.getSerialisedByteArray());
+// ownerClass = PamModuleInfo.findModuleClass(aSet.getUnitType());
+ }
+ if (ownerClass == null) {
continue;
}
if (PamControlledUnit.class.isAssignableFrom(ownerClass)) {
@@ -263,6 +271,17 @@ public class SettingsImport {
return groupedSettings;
}
+
+ private Class getClassFromData(byte[] data) {
+ try {
+ ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(data));
+ Object obj = ois.readObject();
+ return obj.getClass();
+ } catch (Exception e) {
+ return null;
+ }
+
+ }
private SettingsImportGroup findGroup(ArrayList " +
"This plug-in will not be available for loading";
String help = null;
- int ans = WarnOnce.showWarning(PamController.getMainFrame(), title, msg, WarnOnce.WARNING_MESSAGE, help, e1);
+ int ans = WarnOnce.showWarning(PamController.getInstance().getGuiFrameManager().getFrame(0), title, msg, WarnOnce.WARNING_MESSAGE, help, e1);
System.err.println("Exception while loading " + className);
- System.err.println(e1.getMessage());
continue;
}
}
@@ -1269,7 +1243,7 @@ final public class PamModel implements PamModelInterface, PamSettings {
"for help. " +
"This plug-in will not be available for loading";
String help = null;
- int ans = WarnOnce.showWarning(PamController.getMainFrame(), title, msg, WarnOnce.WARNING_MESSAGE, help, ex);
+ int ans = WarnOnce.showWarning(PamController.getInstance().getGuiFrameManager().getFrame(0), title, msg, WarnOnce.WARNING_MESSAGE, help, ex);
System.err.println("Exception while loading " + jarList.get(i).getName());
continue;
}
@@ -1294,7 +1268,7 @@ final public class PamModel implements PamModelInterface, PamSettings {
// instantiate the plugin control class using the custom class loader
try {
- File classFile = new File(pf.getJarFile());
+// File classFile = new File(pf.getJarFile());
//URLClassLoader cl = new URLClassLoader(new URL[]{classFile.toURI().toURL()});
// mi = PamModuleInfo.registerControlledUnit(pf.getClassName(), pf.getDescription(),cl);
mi = PamModuleInfo.registerControlledUnit(pf.getClassName(), pf.getDescription(),classLoader);
@@ -1360,7 +1334,7 @@ final public class PamModel implements PamModelInterface, PamSettings {
"for help. " +
"This plug-in will not be available for loading";
String help = null;
- int ans = WarnOnce.showWarning(PamController.getMainFrame(), title, msg, WarnOnce.WARNING_MESSAGE, help, e1);
+ int ans = WarnOnce.showWarning(PamController.getInstance().getGuiFrameManager().getFrame(0), title, msg, WarnOnce.WARNING_MESSAGE, help, e1);
System.err.println("Exception while loading " + pf.getDefaultName());
pluginList.remove(pf);
continue;
diff --git a/src/PamModel/PamModuleInfo.java b/src/PamModel/PamModuleInfo.java
index 1f4edc3a..8284e145 100644
--- a/src/PamModel/PamModuleInfo.java
+++ b/src/PamModel/PamModuleInfo.java
@@ -282,6 +282,7 @@ public class PamModuleInfo implements PamDependent{
return moduleClass;
}
+
public static JMenu getModulesMenu(Frame parentFrame) {
diff --git a/src/group3dlocaliser/dialog/GroupLocSettingPaneFX.java b/src/group3dlocaliser/dialog/GroupLocSettingPaneFX.java
index 3efc949b..da7f91c7 100644
--- a/src/group3dlocaliser/dialog/GroupLocSettingPaneFX.java
+++ b/src/group3dlocaliser/dialog/GroupLocSettingPaneFX.java
@@ -173,6 +173,9 @@ public class GroupLocSettingPaneFX extends SettingsPane
On very rare occasions, if the GPS data have been multiplexed through some other instruments, the first
two characters of the string identifier are changed. If this is the case, it may also be necessary to set these
-so that the GPS module can identify the appropriate data.
+so that the GPS module can identify the appropriate data. As an alternative, select the "Allow and string initials" option
+which will use any valid RMC or GGA string. Note however, that with a complex NMEA system there may be more than one GPS and
+it is better to select only strings from the most accurate Three options for reading and storing GPS data are available.Read Options