+import java.util.concurrent.*;
+import java.io.*;
+
+public class AltosMag implements Cloneable, Serializable {
+ public int along;
+ public int across;
+ public int through;
+
+ public static double counts_per_gauss = 1090;
+
+ public static double convert_gauss(double counts) {
+ return counts / counts_per_gauss;
+ }
+
+ public boolean parse_string(String line) {
+// if (line.startsWith("Syntax error")) {
+// along = across = through = 0;
+// return true;
+// }
+
+ if (!line.startsWith("X:"))
+ return false;
+
+ String[] items = line.split("\\s+");
+
+ if (items.length >= 6) {
+ along = Integer.parseInt(items[1]);
+ across = Integer.parseInt(items[3]);
+ through = Integer.parseInt(items[5]);
+ }
+ return true;
+ }