Class LocalizationBuilder

java.lang.Object
tethys.localization.LocalizationBuilder

public class LocalizationBuilder extends Object
Class to build a single localisation document during export. Works hand in had with the global LocalisationHandler and also with other functions it's going to find in the datablock and whatever localisation algorithm was used.
Author:
dg50
  • Constructor Details

  • Method Details

    • startLocalisationDocument

      public nilus.Localize startLocalisationDocument(PDeployment deployment, nilus.Detections detectionsDocument, PamDataBlock dataBlock, StreamExportParams exportParams)
    • getDefaultReferenceFrame

      public nilus.Localize.Effort.CoordinateReferenceSystem.ReferenceFrame getDefaultReferenceFrame(CoordinateName coordinateName, LocalizationSubTypes subType)
      Get a default reference frame for the header of a localization document. This is very dependent on the localization subtype. Also on whether the array is fixed or moving. It it's fixed, then we also need to add the instrument lat long.
      Parameters:
      coordinateName -
      subType -
      Returns:
    • sortStandardCoordinates

      public boolean sortStandardCoordinates(PamDataBlock dataBlock)
    • addLocalization

      public nilus.LocalizationType addLocalization(PamDataUnit dataUnit)
    • createStandardLocalization

      public nilus.LocalizationType createStandardLocalization(PamDataUnit dataUnit)
    • makeBaseLoc

      public nilus.LocalizationType makeBaseLoc(PamDataUnit dataUnit)
    • constrainRadianAngle

      public double constrainRadianAngle(double radians)
      Get angle in degrees constrained to 0-360
      Parameters:
      radians -
      Returns:
    • toSlantAngle

      public double toSlantAngle(double radians)
      Convert a vertical angle from radians to degrees and round.
      Parameters:
      radians -
      Returns:
    • createWGS84Loc

      public nilus.LocalizationType createWGS84Loc(PamDataUnit dataUnit)
    • getParameters

      public nilus.LocalizationType.Parameters getParameters(nilus.LocalizationType localization)
      Convenience method to get the Parameters object for a localisation and to automatically create it if it doesn't exist.
      Parameters:
      localization -
      Returns:
    • addUserDefined

      public Element addUserDefined(nilus.LocalizationType.Parameters parameters, String parameterName, String parameterValue)
    • createSphericalLoc

      public nilus.LocalizationType createSphericalLoc(PamDataUnit dataUnit)
    • createRangeLoc

      public nilus.LocalizationType createRangeLoc(PamDataUnit dataUnit)
    • createBearingLoc

      public nilus.LocalizationType createBearingLoc(PamDataUnit dataUnit)
    • createPolarLoc

      public nilus.LocalizationType createPolarLoc(PamDataUnit dataUnit)
    • createPerpRange

      public nilus.LocalizationType createPerpRange(PamDataUnit dataUnit)
    • createCylindricalLoc

      public nilus.LocalizationType createCylindricalLoc(PamDataUnit dataUnit)
    • createCartesianLoc

      public nilus.LocalizationType createCartesianLoc(PamDataUnit dataUnit)
    • getDeployment

      public PDeployment getDeployment()
      Returns:
      the deployment
    • getDetectionsDocument

      public nilus.Detections getDetectionsDocument()
      Returns:
      the detectionsDocument
    • getDataBlock

      public PamDataBlock getDataBlock()
      Returns:
      the dataBlock
    • getExportParams

      public StreamExportParams getExportParams()
      Returns:
      the exportParams
    • getTethysControl

      public TethysControl getTethysControl()
      Returns:
      the tethysControl
    • getLocalisationHandler

      public LocalizationHandler getLocalisationHandler()
      Returns:
      the localisationHandler
    • getLocalisationAlgorithm

      public LocalisationAlgorithm getLocalisationAlgorithm()
      Returns:
      the localisationAlgorithm
    • getCurrentDocument

      public nilus.Localize getCurrentDocument()
      Returns:
      the currentDocument
    • closeDocument

      public void closeDocument(long endTime)
    • checkDocument

      public boolean checkDocument()