org.mbari.siam.devices.workhorse
Class WorkhorseADCP.PD0DataStructure
java.lang.Object
org.mbari.siam.devices.workhorse.WorkhorseADCP.PD0DataStructure
- All Implemented Interfaces:
- java.io.Serializable, WorkhorseADCP.DataStructure
- Enclosing class:
- WorkhorseADCP
public static class WorkhorseADCP.PD0DataStructure
- extends java.lang.Object
- implements WorkhorseADCP.DataStructure, java.io.Serializable
This class encapsulates access to the workhorses binary data format
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ID_HEADER
public static final byte ID_HEADER
- See Also:
- Constant Field Values
ID_DATA_SOURCE
public static final byte ID_DATA_SOURCE
- See Also:
- Constant Field Values
ID_FIXED_LEADER
public static final int ID_FIXED_LEADER
- See Also:
- Constant Field Values
ID_VELOCITY
public static final int ID_VELOCITY
- See Also:
- Constant Field Values
ID_CORRELATION_MAGNITUDE
public static final int ID_CORRELATION_MAGNITUDE
- See Also:
- Constant Field Values
ID_ECHO_INTENSITY
public static final int ID_ECHO_INTENSITY
- See Also:
- Constant Field Values
ID_PERCENT_GOOD
public static final int ID_PERCENT_GOOD
- See Also:
- Constant Field Values
ID_VARIABLE_LEADER
public static final int ID_VARIABLE_LEADER
- See Also:
- Constant Field Values
DATATYPE_FIXED_LEADER
public static final int DATATYPE_FIXED_LEADER
- See Also:
- Constant Field Values
DATATYPE_VARIABLE_LEADER
public static final int DATATYPE_VARIABLE_LEADER
- See Also:
- Constant Field Values
WorkhorseADCP.PD0DataStructure
public WorkhorseADCP.PD0DataStructure()
getShort
public int getShort(int index)
- Convert two contiguous bytes to a short, starting at specified
index of dataBytes; assumes little-endian.
- Parameters:
index -
- Returns:
- short int
getBytes
public byte[] getBytes(int index,
int length)
setData
public void setData(byte[] data)
- Parameters:
data -
getData
public byte[] getData()
- Returns:
- data byte array member variable
getNumberOfBytesInEnsemble
public int getNumberOfBytesInEnsemble()
- Returns:
- The number of bytes in the ensemble, as reported by the fixed header.
getNumberOfDataTypes
public int getNumberOfDataTypes()
- Returns:
- The number of data types that the ADCP is configured for. By default,
the ADCP returns fixed/variable leader, velocity, correlation magnitude, echo intensity,
and percent good.
getHeaderLength
public int getHeaderLength()
- Returns:
- The length in bytes of the fixed header
getOffsetForDataType
public int getOffsetForDataType(int i)
- Parameters:
i - The data type number this can range form 1-6. The exact upper
limit is returned
- Returns:
- The offset for data type #i. Adding '1' to this offset number
gives the absolute byte number in the ensemble where data type #i
begins.
getOffsetForFixedLeader
public int getOffsetForFixedLeader()
- Returns:
- The starting index of the start of the fixed header
getNumberOfBeams
public int getNumberOfBeams()
- Returns:
- number of beams
getNumberOfCells
public int getNumberOfCells()
- Returns:
- number of cells
getPingsPerEnsemble
public int getPingsPerEnsemble()
- Returns:
- pings per ensemble
getDepthCellLength
public int getDepthCellLength()
- Returns:
- length of depth cell
getErrorVelocityMaximum
public int getErrorVelocityMaximum()
- Returns:
- max error velocity
getBinOneDistance
public int getBinOneDistance()
- Returns:
- Bin One Distance
getOffsetForVariableLeader
public int getOffsetForVariableLeader()
- Returns:
- The index into the data that's the start of the Variable Leader
getSpeedOfSound
public int getSpeedOfSound()
- Returns:
- speed of sound (m/s)
getDepthOfTransducer
public float getDepthOfTransducer()
- Returns:
- depth in meters
getHeading
public float getHeading()
- Returns:
- heading in degrees (0 -360)
getPitch
public float getPitch()
- Returns:
- pitch in degrees (-20 - 20)
getRoll
public float getRoll()
- Returns:
- roll in degrees(-20 - 20)
getSalinity
public int getSalinity()
- Returns:
- salinity in ppt
getTemperature
public float getTemperature()
- Returns:
- temperature in celsius (-5 - 40 degrees)
getVelocity
public int[] getVelocity(int beam)
- Parameters:
beam - The beam number to return (values are 1-4)
- Returns:
- An array of velocities for the beam. (mm/s along beam axis).
null is returned if no velocity data was found
getCorrelationMagnitude
public int[] getCorrelationMagnitude(int beam)
- Parameters:
beam - The beam number to return (values are 1-4)
- Returns:
- Magnitude of normalized echo autocorrelation at the lag used for estimating Doppler phase change.
0 = bad; 255 = perfect (linear scale)
getEchoIntensity
public float[] getEchoIntensity(int beam)
- Parameters:
beam - The beam number to return (values are 1-4)
- Returns:
- echo intensity in dB
getPercentGood
public int[] getPercentGood(int beam)
- Parameters:
beam - The beam number to return (values are 1-4)
- Returns:
- Data-quality indicator that reports percentage (0 - 100) of good data collected for each depth
cell of the velocity profile. The settings of the EX command determines how the Workhorse references percent-
good data. Refer to Workhorse manual for moe details.
Copyright © 2003 MBARI.
The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.