forked from pedrolpena/amverseasbinfileutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DecoderTestGetDepths.java
32 lines (21 loc) · 998 Bytes
/
DecoderTestGetDepths.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* This is an example of how to use the library to get profile Depth and
* temperature points
*/
import binfileutils.DepthCalculator;
import binfileutils.BinDecoder; // decodes the profile
import binfileutils.XBTProfile;
public class DecoderTestGetDepths {
public DecoderTestGetDepths() {
}//end constructor
public static void main(String args[]) {
double[][] depthsAndTemps; //array of doubles that holds depths & temperature measurement
BinDecoder decodedXBTProfile = new BinDecoder(args[0]); //pass profile as inline argument
XBTProfile xBTProfile = decodedXBTProfile.getXBTProfile();
DepthCalculator dc = new DepthCalculator(xBTProfile);
depthsAndTemps=dc.getDepthsAndTemperaturePoints();
for (double[] depthsAndTemp : depthsAndTemps) {
System.out.println(String.format(" %7.2f %5.2f", depthsAndTemp[0], depthsAndTemp[1]));
} //end for
}//end main
}//end class