Package targetMotionOld
Class EventRotator
java.lang.Object
targetMotionOld.EventRotator
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.
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
double
The 'a' parameter of a straight line fit through the coordinates before they were rotated (y = a + bx);double
The 'b' parameter of a straight line fit through the coordinates before they were rotated (y = a + bx);int
The LatLong of the coordinate frame origin.double
the reference angle for the straight line track (i.e.int
double[]
Get an array of rotated array angles at each point in the Cartesian coordinate frame (i.e.Array headings at each point in Cartesian coordinate frame rotated to be close to x axis.Sub detection origins, rotated to lie close to the x axis.PamVector[][]
Get rotated world vectors - vectors rotated with other data to lie along the x axis.Unit vectors giving the heading of the array at each sub detection in Cartesian coordinate frame.Sub detection origins, in m E and N of the first one.PamVector[][]
Get vectors transformed into real world Co-Ordinates, i.e.latLongToMetres
(LatLong ll, boolean rotate) metresToLatLong
(PamVector pt, boolean isRotated) long
metresToTime
(PamVector pt, boolean isRotated) From a position, work out what time that position was passed.
-
Constructor Details
-
EventRotator
- Parameters:
pamDetection
-
-
-
Method Details
-
latLongToMetres
-
metresToLatLong
-
metresToTime
From a position, work out what time that position was passed.- Parameters:
pt
-isRotated
-- Returns:
- time in milliseconds.
-
getPamDetection
- Returns:
- the pamDetection
-
getLastUpdateTime
public long getLastUpdateTime()- Returns:
- the lastUpdateTime
-
getSubDetectionOrigins
Sub detection origins, in m E and N of the first one.
These values have NOT been rotated.- Returns:
- the subDetectionOrigins
-
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
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
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
Array headings at each point in Cartesian coordinate frame rotated to be close to x axis.- Returns:
- the rotatedHeadings
-
getRotatedWorldVectors
Get rotated world vectors - vectors rotated with other data to lie along the x axis.- Returns:
-
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
-