xtf_doc.h
Description
xtf_doc.h is the official Triton Elics International eXtended Triton Format (.XTF, Revision 3, September 18, 1998, by Markespflug) C header specification included in code/sidescan/xtf/. It documents the binary structure of .XTF files and defines all packet type IDs, sonar family enumerations, and C data structures used by xtf2glo.
Packet Header Type IDs (HeaderType)
Every packet in an .XTF data stream begins with magic number 0xFACE (64206) followed by a HeaderType byte:
XTF_HEADER_SONAR(0) â Sidescan and subbottom ping data (XTFPINGHEADER+XTFPINGCHANHEADERs).XTF_HEADER_NOTES(1) â Annotation text (XTFNOTESHEADER).XTF_HEADER_BATHY(2) â Multibeam bathymetry (Seabat,Odom).XTF_HEADER_ATTITUDE(3) â TSS or MRU high-rate pitch/roll/heave/yaw (XTFATTITUDEDATA).XTF_HEADER_FORWARD(4) â Forward-look sonar packet.XTF_HEADER_ELAC(5) â Elac multibeam packet.XTF_HEADER_RAW_SERIAL(6) â Raw ASCII serial string (XTFRAWSERIALHEADER).XTF_HEADER_EMBED_HEAD(7) â Embedded 1024-byte file header inside a mid-stream file split.
Core Data Structures Defined
XTFFILEHEADER(1024 bytes): File-level metadata (FileFormat = 123,SystemType = 1,RecordingProgramName,NumberOfSonarChannels,NumberOfBathymetryChannels, projection parameters, and up to six 128-byteCHANINFOdescriptors).CHANINFO(128 bytes): Per-channel configuration (TypeOfChannel:0=SUBBOTTOM,1=PORT,2=STBD,3=BATHYMETRY;BytesPerSample:1or2;SamplesPerChannel;VoltScale; beamwidth and tilt angles).XTFPINGHEADER(256 bytes): Per-ping navigation, timestamp (Year..HSeconds),EventNumber,PingNumber,SoundVelocity, towfish (SensorXcoordinate,SensorYcoordinate,SensorDepth,SensorPrimaryAltitude,SensorPitch,SensorRoll,SensorHeading) and ship (ShipXcoordinate,ShipYcoordinate,ShipGyro,ShipSpeed,Layback,CableOut) telemetry.XTFPINGCHANHEADER(64 bytes): Per-channel ping header (ChannelNumber,DownsampleMethod,SlantRange,TimeDelay,TimeDuration,SecondsPerPing,NumSamples,Weight), immediately followed by the rawNumSamples à BytesPerSampleacoustic trace.