International Federation of Digital Seismograph Networks

Thread: java implementation of strawman

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

I have put together a java implementation of the strawman 2016-3-30 here:

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

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:

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.

# grab some miniseed
curl -o JSC.mseed
# 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
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.