Package Array

Class MasterLocator

All Implemented Interfaces:
Serializable, Cloneable, ManagedParameters

public class MasterLocator extends HydrophoneLocator implements Serializable, Cloneable, ManagedParameters
Master PAMGuard array localiser. There is now one of these and of no other type within each PamArray and this will call out to different Localisers dependent on which channel is being used.
Author:
Doug Gillespie
See Also:
  • Constructor Details Link icon

    • MasterLocator Link icon

      public MasterLocator(PamArray pamArray)
      Individual locators will not be serialised.
  • Method Details Link icon

    • setupLocators Link icon

      protected void setupLocators(PamArray currentArray)
    • locatorForHydrophone Link icon

      protected HydrophoneLocator locatorForHydrophone(int iPhone)
      Work out which locator to use for a specific hydrophone
      Parameters:
      iPhone - hydrophone index
      Returns:
    • locatorForStreamer Link icon

      protected HydrophoneLocator locatorForStreamer(int iStreamer)
    • getStreamerGpsPos Link icon

      protected GpsData getStreamerGpsPos(long timeMilliseconds)
      Description copied from class: HydrophoneLocator
      Get streamer GPS data. This is only used internally and most calls should be to getStreamerLatLong, which returns an object that also has the orientation data.
      Specified by:
      getStreamerGpsPos in class HydrophoneLocator
      Parameters:
      timeMilliseconds -
      Returns:
      Gps data (without orientation sensors)
    • getPhoneLatLong Link icon

      public GpsData getPhoneLatLong(long timeMilliseconds, int phoneNo)
      Description copied from class: HydrophoneLocator
      Get's the LatLong of a specific hydrophone at a given time.
      Overrides:
      getPhoneLatLong in class HydrophoneLocator
      Parameters:
      timeMilliseconds - time position needed for
      phoneNo - Hydrophone number
      Returns:
      Hydrophone LatLong
    • notifyModelChanged Link icon

      public void notifyModelChanged(int changeType, boolean initComplete)
      Specified by:
      notifyModelChanged in class HydrophoneLocator
    • isStatic Link icon

      public boolean isStatic()
      Specified by:
      isStatic in class HydrophoneLocator
      Returns:
      true if it's some sort of static array (not using GPS data in any way).
    • isChangeable Link icon

      public boolean isChangeable()
      Description copied from class: HydrophoneLocator
      Note- changeable refers to the array positions changing relative to each other. i.e. the array doesn't change with heading or gps position, it's only changeable if the distances between hydrophones can change with time.
      Specified by:
      isChangeable in class HydrophoneLocator
      Returns:
      true if the hydrophone positions within the array can change with time
    • getLocatorSettings Link icon

      public LocatorSettings getLocatorSettings()
      Specified by:
      getLocatorSettings in class HydrophoneLocator
    • setLocatorSettings Link icon

      public boolean setLocatorSettings(LocatorSettings unusedSettings)
      This is used a bit differently in the master locator since it's passed null, but will have an array list of settings from when it was deserialized which it must pass on to the other locators.
      Specified by:
      setLocatorSettings in class HydrophoneLocator
    • getName Link icon

      public String getName()
      Specified by:
      getName in class HydrophoneLocator
    • getDefaultSettings Link icon

      public LocatorSettings getDefaultSettings()
      Specified by:
      getDefaultSettings in class HydrophoneLocator
    • getParameterSet Link icon

      public PamParameterSet getParameterSet()
      Description copied from class: HydrophoneLocator
      Get the auto-generated parameter set, and then add in the fields that are not included because they are not public and do not have getters. Note: for each field, we search the current class and (if that fails) the superclass. It's done this way in case HydrophoneLocator is used directly (and thus the field would be found in the class), or else it might be used as a superclass to something else (e.g. MasterLocator) in which case the field would only be found in the superclass.
      Specified by:
      getParameterSet in interface ManagedParameters
      Overrides:
      getParameterSet in class HydrophoneLocator
      Returns:
      description of the parameters in a class.