Array
Class Hydrophone

java.lang.Object
  extended by Array.Hydrophone
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Hydrophone
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Author:
Doug Gillespie Contains information on a single hydrophone
See Also:
PamArray, Serialized Form

Field Summary
private  double[] bandwidth
           
private  double[] coordinate
           
private  double[] coordinateError
           
private  boolean dontInvertDepth
           
private  double heading
           
private  int iD
           
private  double preampGain
           
private  double sensitivity
           
static long serialVersionUID
           
private  int streamerId
           
private  PamSymbol symbol
           
private  double tilt
           
private  java.lang.String type
           
 
Constructor Summary
Hydrophone(int id)
           
Hydrophone(int id, double x, double y, double z, java.lang.String type, double sensitivity, double[] bandwidth, double preampGain)
           
 
Method Summary
private  void checkCoordinateError()
           
private  void checkDepthInversion()
          A funny one this - on 22 December, I realised I had to invert the depth coordinate to satisfy standard RH rotation geometry.
protected  Hydrophone clone()
           
 double[] getBandwidth()
           
 double getCoordinate(int c)
          Get's a coordinate of the array
 double getCoordinateError(int iCoordinate)
          Get the error on one of the three coordinates.
 double[] getCoordinateErrors()
           
 double[] getCoordinates()
           
(package private)  PamSymbol getDefaultSymbol()
           
 double getDepth()
           
 double getdX()
           
 double getdY()
           
 double getdZ()
           
 PamVector getErrorVector()
           
 double getHeading()
           
 int getID()
           
 double getPreampGain()
           
 double getSensitivity()
           
 int getStreamerId()
           
 PamSymbol getSymbol()
           
 double getTilt()
           
 java.lang.String getType()
           
 PamVector getVector()
           
 double getX()
           
 double getY()
           
 double getY(double depth)
          Get the hydrophone distance astern, corrected for hydrophone depth.
 double getZ()
           
 void setBandwidth(double[] bandwidth)
           
 void setCoordinate(double[] coordinate)
           
 void setCoordinateError(int iCoordinate, double error)
          Set the coordinate error on one of the three dimensions.
 void setCoordinateErrors(double[] errors)
          Set the coordinate error array.
 void setDepth(double d)
           
 void setdX(double error)
          Set the error on the hydrophone x coordinate
 void setdY(double error)
          Set the error on the hydrophone y coordinate
 void setdZ(double error)
          Set the error on the hydrophone z coordinate
 void setHeading(double heading)
           
 void setID(int id)
           
 void setPreampGain(double preampGain)
           
 void setSensitivity(double sensitivity)
           
 void setStreamerId(int streamerId)
           
 void setSymbol(PamSymbol symbol)
           
 void setTilt(double tilt)
           
 void setType(java.lang.String type)
           
 void setX(double x)
           
 void setY(double y)
           
 void setZ(double z)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

iD

private int iD

streamerId

private int streamerId

type

private java.lang.String type

coordinate

private double[] coordinate

coordinateError

private double[] coordinateError

tilt

private double tilt

heading

private double heading

sensitivity

private double sensitivity

preampGain

private double preampGain

bandwidth

private double[] bandwidth

symbol

private transient PamSymbol symbol

dontInvertDepth

private boolean dontInvertDepth
Constructor Detail

Hydrophone

public Hydrophone(int id)

Hydrophone

public Hydrophone(int id,
                  double x,
                  double y,
                  double z,
                  java.lang.String type,
                  double sensitivity,
                  double[] bandwidth,
                  double preampGain)
Method Detail

checkDepthInversion

private void checkDepthInversion()
A funny one this - on 22 December, I realised I had to invert the depth coordinate to satisfy standard RH rotation geometry.

so that old depths get automatically turned upside down in the main coordinate variable, I include this. It a new phone is created, then this will default to true and we'll know that all is OK. If an old hydrophone is deserialised from a settings file, then this will default to false - so we'll know to turn the depth coordinate over.


getDefaultSymbol

PamSymbol getDefaultSymbol()

getBandwidth

public double[] getBandwidth()

setBandwidth

public void setBandwidth(double[] bandwidth)

getSensitivity

public double getSensitivity()

setSensitivity

public void setSensitivity(double sensitivity)

checkCoordinateError

private void checkCoordinateError()

getCoordinateError

public double getCoordinateError(int iCoordinate)
Get the error on one of the three coordinates.

Parameters:
iCoordinate - coordinate (x = 0; y = 1; z = 2)
Returns:
error in metres.

setCoordinateErrors

public void setCoordinateErrors(double[] errors)
Set the coordinate error array.

Parameters:
errors - array of errors on x,y,z

setCoordinateError

public void setCoordinateError(int iCoordinate,
                               double error)
Set the coordinate error on one of the three dimensions.

Parameters:
iCoordinate - coordinate (x = 0; y = 1; z = 2)
error - error in metres.

getCoordinateErrors

public double[] getCoordinateErrors()

getdX

public double getdX()
Returns:
error on the hydrophone x coordinate.

setdX

public void setdX(double error)
Set the error on the hydrophone x coordinate

Parameters:
error - error in metres.

getdY

public double getdY()
Returns:
error on the hydrophone y coordinate.

setdY

public void setdY(double error)
Set the error on the hydrophone y coordinate

Parameters:
error - error in metres.

getdZ

public double getdZ()
Returns:
error on the hydrophone depth coordinate.

setdZ

public void setdZ(double error)
Set the error on the hydrophone z coordinate

Parameters:
error - error in metres.

getX

public double getX()

setX

public void setX(double x)

getY

public double getY()

getVector

public PamVector getVector()
Returns:
the coordinates in vector form. s

getErrorVector

public PamVector getErrorVector()
Returns:
the coordinate errors in vector form.

getY

public double getY(double depth)
Get the hydrophone distance astern, corrected for hydrophone depth.

Parameters:
depth -
Returns:
corrected y coordinate.

setY

public void setY(double y)

getZ

public double getZ()

setZ

public void setZ(double z)

getDepth

public double getDepth()

setDepth

public void setDepth(double d)

getCoordinate

public double getCoordinate(int c)
Get's a coordinate of the array

Parameters:
c - index of the coordinate (0 = x; 1 = y; 2 = z)
Returns:
coordinate value

clone

protected Hydrophone clone()
Overrides:
clone in class java.lang.Object

getType

public java.lang.String getType()

getCoordinates

public double[] getCoordinates()
Returns:
Returns the coordinate.

setCoordinate

public void setCoordinate(double[] coordinate)
Parameters:
coordinate - The coordinate to set.

getPreampGain

public double getPreampGain()
Returns:
Returns the preampGain.

setPreampGain

public void setPreampGain(double preampGain)
Parameters:
preampGain - The preampGain to set.

setType

public void setType(java.lang.String type)
Parameters:
type - The type to set.

getID

public int getID()
Returns:
Returns the iD.

setID

public void setID(int id)
Parameters:
id - The iD to set.

getHeading

public double getHeading()
Returns:
Returns the heading.

setHeading

public void setHeading(double heading)
Parameters:
heading - The heading to set.

getTilt

public double getTilt()
Returns:
Returns the tilt.

setTilt

public void setTilt(double tilt)
Parameters:
tilt - The tilt to set.

getSymbol

public PamSymbol getSymbol()

setSymbol

public void setSymbol(PamSymbol symbol)

getStreamerId

public int getStreamerId()

setStreamerId

public void setStreamerId(int streamerId)