Class GroupLocResult

java.lang.Object
Localiser.detectionGroupLocaliser.GroupLocResult
All Implemented Interfaces:
Comparable<GroupLocResult>, LocalisationChi2

public class GroupLocResult extends Object implements Comparable<GroupLocResult>, LocalisationChi2
Result class for the a group localiser. Usually this will be a target motion localisation, however could also be a group of DIFAR buoys or other systems which uses a set of detections to localise animals.
Author:
Doug Gillespie
  • Constructor Details

    • GroupLocResult

      public GroupLocResult(LocaliserModel targetMotionModel, LatLong latLong, int side, double chi2)
      Parameters:
      latLong -
      side -
      chi2 -
    • GroupLocResult

      public GroupLocResult(LatLong latLong, int side, double chi2)
      Constructor for a group detection result.
      Parameters:
      latLong - - the location of the result
      side - - the ambiguity
      chi2 - - the chi2 value i.e. how well the localisation result fits the localisation model.
    • GroupLocResult

      public GroupLocResult(double[] result, double[] resultErrors, int side, double chi2)
  • Method Details

    • getLatLong

      public LatLong getLatLong()
      Returns:
      the latLong
    • setLatLong

      public void setLatLong(LatLong latLong)
      Parameters:
      latLong - the latLong to set
    • getSide

      public int getSide()
      Returns:
      the side
    • getZError

      public double getZError()
      Get the Cartesian z error in localisation. Error is 95% confidence interval. Note z is used to define the depth. Negative is below sea surface.
      Returns:
    • getXYZErrors

      public Double[] getXYZErrors()
      Convenience class to get errors in x y and z co-ordinate frame.
      Returns:
      the x, y and z error.
    • setSide

      public void setSide(int side)
      Parameters:
      side - the side to set
    • getChi2

      public Double getChi2()
      Specified by:
      getChi2 in interface LocalisationChi2
      Returns:
      the chi2
    • setChi2

      public void setChi2(double chi2)
      Parameters:
      chi2 - the chi2 to set
    • getPerpendicularDistance

      public Double getPerpendicularDistance()
      Returns:
      the perpendicularDistance
    • setPerpendicularDistance

      public void setPerpendicularDistance(Double perpendicularDistance)
      Parameters:
      perpendicularDistance - the perpendicularDistance to set
    • getPerpendicularDistanceError

      public Double getPerpendicularDistanceError()
      Get the error in the perpendicular direction. The perpindicular direction is defined by setErrorVector(PamVector perpVecor).
      Returns:
      the perpendicularDistanceError
    • getParallelError

      public double getParallelError()
      Get the error which is parallel to the perpendicular error. Note that the parallel error is 2D so it is rotated only in heading.
      Returns:
      the value of the parallel error
    • setError

      public void setError(LocaliserError error)
      Set the localisation error.
      Parameters:
      error - the error class for this loclisation
    • getLocError

      public LocaliserError getLocError()
      Get thelocalisation error.
      Returns:
      error the error class for this loclisation
    • getAic

      public Double getAic()
      Specified by:
      getAic in interface LocalisationChi2
      Returns:
      the aic
    • setAic

      public void setAic(Double aic)
      Parameters:
      aic - the aic to set
    • getRunTimeMillis

      public Double getRunTimeMillis()
      Returns:
      the runTimeMillis
    • setRunTimeMillis

      public void setRunTimeMillis(Double runTimeMillis)
      Parameters:
      runTimeMillis - the runTimeMillis to set
    • getnDegreesFreedom

      public Integer getnDegreesFreedom()
      Returns:
      the nDegreesFreedom
    • setnDegreesFreedom

      public void setnDegreesFreedom(Integer nDegreesFreedom)
      Parameters:
      nDegreesFreedom - the nDegreesFreedom to set
    • getProbability

      public Double getProbability()
      Returns:
      the probability
    • setProbability

      public void setProbability(Double probability)
      Parameters:
      probability - the probability to set
    • getReferenceHydrophones

      public int getReferenceHydrophones()
      Returns:
      the referenceHydrophones
    • setReferenceHydrophones

      public void setReferenceHydrophones(int referenceHydrophones)
      Parameters:
      referenceHydrophones - the referenceHydrophones to set
    • setComment

      public void setComment(String comment)
    • getComment

      public String getComment()
    • setBeamLatLong

      public void setBeamLatLong(LatLong beamLatLong)
      Parameters:
      beamLatLong - the beamLatLong to set
    • getBeamLatLong

      public LatLong getBeamLatLong()
      Returns:
      the beamLatLong
    • getBeamTime

      public Long getBeamTime()
      Returns:
      the beamTime
    • setBeamTime

      public void setBeamTime(Long beamTime)
      Parameters:
      beamTime - the beamTime to set
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFirstBearing

      public PamVector getFirstBearing()
      Returns:
      the firstBearing
    • setFirstBearing

      public void setFirstBearing(PamVector firstBearing)
      Parameters:
      firstBearing - the firstBearing to set in RADIANS
    • getFirstHeading

      public Double getFirstHeading()
      Returns:
      the firstHeading
    • setFirstHeading

      public void setFirstHeading(Double firstHeading)
      Parameters:
      firstHeading - the firstHeading to set
    • getModel

      public LocaliserModel getModel()
    • setModel

      public void setModel(LocaliserModel model)
    • setDim

      public void setDim(int dim)
      The number of dimensions of the resutl, usually 2 or 3.
      Parameters:
      dim - the number of dimensions
    • getErrorDirection

      public double getErrorDirection()
      Get the error in radians.
      Returns:
      the error direction.
    • getErrorVector

      public PamVector getErrorVector()
      Get the vector which points in perpendicular direction to the localisation in the xy plane. This is used to work out perpendicular and parallel errors.
      Returns:
      the vector which points in the perpindicualr direction to the localisation
    • setPerpErrorVector

      public void setPerpErrorVector(PamVector perpVecor)
      Set the vector which points in perpendicular direction to the localisation in the xy plane. This is used to work out perpendicular and parallel errors.
      Parameters:
      a - vector representing the perpindicular direction of the error.
    • compareTo

      public int compareTo(GroupLocResult o)
      Compare two results based on AIC and if there isn't AIC then use Chi2. If no chi2, give up and say they are the same.
      Specified by:
      compareTo in interface Comparable<GroupLocResult>
    • getNDF

      public Integer getNDF()
      Specified by:
      getNDF in interface LocalisationChi2
      Returns:
      The number of degrees of freedom in the model used