International Federation of Digital Seismograph Networks

Thread: java implementation of strawman

None
Started: 2016-05-14 00:24:34
Last activity: 2016-05-14 00:24:34
Philip Crotwell
2016-05-14 00:24:34
Hi

I have put together a java implementation of the strawman 2016-3-30 here:
https://github.com/crotwell/seisFile/tree/miniseed3/src/main/java/edu/sc/seis/seisFile/mseed3

There is nothing like actually trying to implement something in code
to help see how a spec really works. For what it is worth, I feel like
the strawman is much, much improved over the old miniseed2. It is so
much simpler and easier to code. I feel that the reduced complexity
will make it much less likely that weird and subtle bugs will creep
in.

That said, dealing with leap seconds is complicated. I am not sure
that there is an easy way around it, they are just complicated beasts.

If you want to run it a tarBall is here:
http://www.seis.sc.edu/~crotwell/mseed3/

It does not do much yet, but it is capable of a basic translation from
mseed2 to mseed3 and can do a basic print out of mseed3 records. The
translation is not complete, but I think it captures most of what
needs to be translated.

Example:
------------
# grab some miniseed
curl -o JSC.mseed
'http://service.iris.edu/fdsnws/dataselect/1/query?net=CO&sta=JSC&loc=00&cha=HHZ&starttime=2016-05-13T12:20:53&endtime=2016-05-13T12:25:59&nodata=404'
# convert mseed2 file JSC.mseed to JSC.mseed.m
bin/mseed3 -2 JSC.mseed
# see the translated file
ls JSC.mseed*
JSC.mseed JSC.mseed.ms3
# print out the first record
bin/mseed3 --print3 JSC.mseed.ms3 | head -23
--------- read record 0
CO.JSC.HHZ
start = 20160513T122053.008094
numPTS = 40

RecordIndicator ('MS')= MS
miniSEEDversion (3)= 3
Networkcode = CO
Stationcode = JSC
Locationcodes = 00
Channelcodes = HHZ
QualityIndicator = M
DataVersionindicator = 0
Recordlength = 494
Recordstarttime = 1463142053008094
Numberofsamples = 40
Samplerate = 100.0
CRC­32ofdata = 0
Offsettodata = 46
Flags = 1
sampleEncodingFormat = 11
Numberofopaqueheadersthatfollow = 0
--------- read record 1


I will likely push changes into this as the strawman progresses and as
I find bugs and then update the tarball. Any comments are welcome.

Phliip