public class SoundSpeed extends Object
This is a two-step process. First of all, you need to specify a latitude and longitude for the SSP, then make a request of the server to get the ocean depth at that location. Once this is done you can make an SSP request by passing in an array of doubles; these specify the depth at which you want sound speed readings. What is returned by this request is a List of SoundSpeedData objects, each element of which contain the depth of the reading, the speed of sound at that depth, and a boolean flag that tells us whether the readding is valid.
Typcial use looks something like this. Note that we should make a query of another object before this to determine the ocean depth, so we can make intelligent choices for the reading depths.
double readingDepths[] = {10.0, 30.0, 40.0, 50.0, 100.0, 125.0); SoundSpeed soundSpeed = new SoundSpeed(36.6, 122.5, readingDepths); // Lat and long, and depths at which we want readings List ssp = SoundSpeed.getSoundProfile(measurementIntervals); SoundSpeedData ssd = ssp.get(0); System.out.println(ssp.getDepth + " " + ssp.getSoundSpeedProfile() + " " + ssd.isValid());You can also request the SSP with "standard" depth intervals. These are 0,2.5,7.5,12.5,25,32.5,40,50,62.5,75,100,125,150,200,300,400,500,600,700,800,900, 1000,1100,1200,1300,1400,1500,1750,2000,2500,3000,4000,5000 meters.
Constructor and Description |
---|
SoundSpeed(double pLatitude,
double pLongitude)
Constructor; given a latitude and longitude, construct a sound speed profile using
the "standard" depths.
|
SoundSpeed(double pLatitude,
double pLongitude,
double[] pReadingDepths)
Constructor; given a latitude and longitude, creates an object capable of sending
a JMBL request to a server and getting a response back.
|
Modifier and Type | Method and Description |
---|---|
String |
getRequestXML() |
String |
getResponseXML() |
List<SoundSpeedData> |
getSoundSpeedProfile()
returns the sound speed profile for this latitude and longitude.
|
static void |
main(String[] args) |
public SoundSpeed(double pLatitude, double pLongitude, double[] pReadingDepths)
pLatitude
- latitude Latitude of locationpLongitude
- longitude Longitude of location in oceanpReadingDepths
- Depths at which we want sound speed readings, in meterspublic SoundSpeed(double pLatitude, double pLongitude)
pLatitude
- pLongitude
- public List<SoundSpeedData> getSoundSpeedProfile()
public String getRequestXML()
public String getResponseXML()
public static void main(String[] args) throws org.exolab.castor.xml.ValidationException, FileNotFoundException, org.exolab.castor.xml.MarshalException, RemoteException, javax.xml.rpc.ServiceException
args
- org.exolab.castor.xml.ValidationException
FileNotFoundException
org.exolab.castor.xml.MarshalException
RemoteException
javax.xml.rpc.ServiceException