Class EventRotator

java.lang.Object
targetMotionOld.EventRotator

public class EventRotator extends Object
Reinstated class to rotate and transform an event so that it's track lies as close as possible to the x axis.
Step 1 is to convert all units to metres, relative to the origin coordinate of the first sub detection
Step 2 is to fit a straight line through all the origin points
Step 3 is to rotate all position and angle vectors so that they correspond to a track as close as possible to the x axis.
Author:
Doug Gillespie
  • Constructor Details

    • EventRotator

      public EventRotator(SuperDetection pamDetection)
      Parameters:
      pamDetection -
  • Method Details

    • latLongToMetres

      public PamVector latLongToMetres(LatLong ll, boolean rotate)
    • metresToLatLong

      public LatLong metresToLatLong(PamVector pt, boolean isRotated)
    • metresToTime

      public long metresToTime(PamVector pt, boolean isRotated)
      From a position, work out what time that position was passed.
      Parameters:
      pt -
      isRotated -
      Returns:
      time in milliseconds.
    • getPamDetection

      public PamDataUnit getPamDetection()
      Returns:
      the pamDetection
    • getLastUpdateTime

      public long getLastUpdateTime()
      Returns:
      the lastUpdateTime
    • getSubDetectionOrigins

      public PamVector[] getSubDetectionOrigins()
      Sub detection origins, in m E and N of the first one.
      These values have NOT been rotated.
      Returns:
      the subDetectionOrigins
    • getSubDetectionHeadings

      public PamVector[] getSubDetectionHeadings()
      Unit vectors giving the heading of the array at each sub detection in Cartesian coordinate frame.
      These are NOT rotated
      Returns:
      the subDetectionHeadings
    • getRotatedOrigins

      public PamVector[] getRotatedOrigins()
      Sub detection origins, rotated to lie close to the x axis.
      Returns:
      the rotatedOrigins
    • getnSubDetections

      public int getnSubDetections()
      Returns:
      the number of sub detections (i.e. the number of points to expect in each of the vector arrays)
    • getPlotOrigin

      public LatLong getPlotOrigin()
      The LatLong of the coordinate frame origin. This should be the LatLong of the first sub detection in the event.
      Returns:
      the plotOrigin
    • getLinFitA

      public double getLinFitA()
      The 'a' parameter of a straight line fit through the coordinates before they were rotated (y = a + bx);
      Returns:
      the linFitA
    • getLinFitB

      public double getLinFitB()
      The 'b' parameter of a straight line fit through the coordinates before they were rotated (y = a + bx);
      Returns:
      the linFitB
    • getReferenceAngle

      public double getReferenceAngle()
      the reference angle for the straight line track (i.e. the getLinfitB() turned into an angle). This angle is in the Cartesian coordinate frame (i.e. anti clockwise from x axis).
      Returns:
      the referenceAngle
    • getRotatedArrayAngles

      public double[] getRotatedArrayAngles()
      Get an array of rotated array angles at each point in the Cartesian coordinate frame (i.e. anti clockwise from x axis).
      Returns:
      the arrayAngles
    • getRotatedHeadings

      public PamVector[] getRotatedHeadings()
      Array headings at each point in Cartesian coordinate frame rotated to be close to x axis.
      Returns:
      the rotatedHeadings
    • getRotatedWorldVectors

      public PamVector[][] getRotatedWorldVectors()
      Get rotated world vectors - vectors rotated with other data to lie along the x axis.
      Returns:
    • getWorldVectors

      public PamVector[][] getWorldVectors()
      Get vectors transformed into real world Co-Ordinates, i.e. relative to N and E rather than the array axis.
      Returns:
    • getReferenceHydrophones

      public int getReferenceHydrophones()
      Returns:
      bitmap of hydrophones used in the event rotator