The ELF data file format description


  • Every file contains 5 minutes of ELF data
  • The name of a file is a time of data sample beginning
  • Every sample has 16 bit length (the older byte + the younger byte)
  • Every 5 minutes file begins with a 64 byte ASCII header

An example of 5 minutes file header (the first 64 bytes in ASCII):


Stacja ELF ELA7b02.07.2008 11:401 3 T: 30.3000000000000000000000


  • Stacja ELF ELA7b - the name of a measuring station
  • 02.07.2008 11:40 - time (UT) of the data sample beginning
  • 1 3 - names and numbers of sampled canals (canal1=NS and canal3=EW)
  • T: 30.3 - temperature of a station in Celsius degree

Immediately after the end of the 64 byte ASCII header start sampled data:



After 300 seconds of sampling the file is closed and the remaining part of the last sector of a file must be filled with zeros (0x00), because the next 5 minutes file will start at the next 512 bytes sector on data storage disc.

This is an example of a termination of the 5 minutes ELF file (last 512 bytes sector):


The last two bytes 0xCE33 = 52787 this is a counter of samples during 300 seconds. It means, a frequency of sampling is 52787 / 300 = 175.95 sample/sec simultaneously in both canals (ELA7 receiver only).



ELA10 receiver data format (WERA system)

The description of the data format applies to the previous type of receiver, (ELA7, 175.95 samples/sec), but the format has not changed, only the files are correspondingly larger. At the very end of the binary files there is a 4 byte number 00 04 10 5F (hex) which means the number of samples in a 5-minute file.

00 04 10 5F (hex) = 266335 (dec),    266335 / 300sec = 887.7833333... samples/sec (ELA10 receivers in WERA system)



Sample code (Pascal) of ELF binary file decoding


     var  Tapp : Array [0..1200000] of Byte;
     
BlockRead(InFile,Tapp,1200000,Count); // loading the file into the matrix
Canal1 := TLineSeries.Create(Chart1); Canal3 := TLineSeries.Create(Chart1);
i := 64; // skip the header k := 0; // time Samples := 266335; Step := 300/Samples; // time step
for j := 1 to Samples do begin Canal1.AddXY(k, Tapp[i]*256 + Tapp[i+1]); //One 16-bit sample of NS antenna Canal3.AddXY(k, Tapp[i+2]*256 + Tapp[i+3]); //One 16-bit sample of EW antenna k := k + Step; i := i + 4; end;