/* JRG, the Resource Geology Seismic Processing System for Java, and Viewmat for Java are Copyright 1998-2000 by John N. Louie The software and methods here are the subject of academic research, not commercial products. I would like to know what use you make of my methods, and have your feedback on their success or failure. Also, by letting me know who you are, I can inform you if bugs or errors are discovered. Please send me an email message with: your name and email address; whether you are a student or faculty member, consultant or employee; the name of your university or company, and department; and a sentence or two describing what use you intend to make of these methods. Send your message to louie@seismo.unr.edu */ import java.io.*; public class OldRGTraceHead { public float offset; /* source-receiver offset, m */ public float gx; /* receiver x-coordinate, m */ public float gy; /* receiver y-coordinate, m */ public float gz; /* receiver z-coordinate, m */ public int sp; /* source number */ static final int OLDRGTRACEHEADBYTES = 20; public void copyRgHead(RgHead hd) { this.offset = (float)(hd.off); /* source-receiver offset, m */ this.gx = (float)(hd.gx); /* receiver x-coordinate, m */ this.gy = (float)(hd.gy); /* receiver y-coordinate, m */ this.gz = (float)(hd.gz); /* receiver z-coordinate, m */ this.sp = hd.svp; /* source number */ } public void read(DataInputStream dis) throws IOException { offset = dis.readFloat(); gx = dis.readFloat(); gy = dis.readFloat(); gz = dis.readFloat(); sp = dis.readInt(); } public void write(DataOutputStream dos) throws IOException { dos.writeFloat(offset); dos.writeFloat(gx); dos.writeFloat(gy); dos.writeFloat(gz); dos.writeInt(sp); } public String toString() { return "offset=" + Viewmat.getSignif("" + offset) + " gx=" + Viewmat.getSignif("" + gx) + " gy=" + Viewmat.getSignif("" + gy) + " gz=" + Viewmat.getSignif("" + gz) + " sp=" + sp; } }