' Konvertieren von Sosewin-ASCII-Daten FullW # 1 PrintScroll = 1 AutoRedraw = 1 Auto btmax As Double, btmin As Double, i As Int '##E# Auto nweg As Double, p As Double Local Int k, hr, mn, n, nshift Local Double x(60000, 3), tanf(3), sc, bt(3), dt Local String fnam, z, z1, z2, z3, z4, z5, nam(3), ok Dir "sg2data\*" Input "Filename? ";fnam nam(1) = "sg2data\" + fnam + ".sg2" nam(2) = "sg2data\" + fnam + "_1.sg2" nam(3) = "sg2data\" + fnam + "_2.sg2" dt = 0.01 For k = 1 To 3 Print "opening "; nam(k) Open nam(k) for Input As # 7 Input # 7, z p = InStr(z, "hour=") z = Mid\$(z, p + 5) hr = Val(z) Print "hr="; hr '##B# p = InStr(z, "min=") z = Mid\$(z, p + 4) mn = Val(z) Print "mn="; mn p = InStr(z, "sec=") z = Mid\$(z, p + 4) sc = Val(z) Print "sc="; sc p = InStr(z, "begTime=") z = Mid\$(z, p + 8) bt(k) = Round(100 * Val(z)) / 100 Print "bt="; bt(k) p = InStr(z, "nPoints=") z = Mid\$(z, p + 8) n = Val(z) Print "n="; n p = InStr(z, "sampleInt=") z = Mid\$(z, p + 10) dt = Val(z) Print "dt="; dt Print "reading data" For i = 1 To n Input # 7, z p = InStr(z, " ") z = Mid\$(z, p + 1) x(i, k) = Val(z) Next i Input # 7, z Print z Close # 7 Next k btmin = Min(bt(1), bt(2), bt(3)) btmax = Max(bt(1), bt(2), bt(3)) nweg = Round((btmax - btmin) / dt) Print "btmin="; btmin, " btmax="; btmax; " nweg="; nweg For k = 1 To 3 nshift = Round((btmax - bt(k)) / dt) nam(k) = "sfedata\" + fnam + "_" + Chr\$(47 + k) + ".sfe" Open nam(k) for Output As # 8 Print # 8, "SOSEWIN data ch."; k - 1 Print # 8, Str\$(n - nweg, 10) + "(f12.03) "; dt For i = 1 + nshift To n + nshift - nweg Print # 8, Str\$(x(i, k), 12, 3) Next i Close # 8 Next k Open "winplot.par" for Output As # 8 Print # 8, "0, 3, 24, 15, 1," + Str\$(n - nweg) + ", 0.8" For k = 1 To 3 Print # 8, nam(k) Next k Close # 8 Input "OK? ";ok CloseW # 1 End \$DatFile \$ExeName = C:\Dokumente und Einstellungen\Erhard\Desktop\SEISMOMETRIE\SOSEWIN\data\soseconvert.Exe \$FileDescription = Beschreibung \$Comments = Autor: Nicht registriert \$CompanyName = Nicht registriert \$LegalCopyright = © 2011 Nicht registriert \$LanguageId = 0407 \$FileVersion = %d.%d.%d.%d \$ProductVersion = %d.%d.%d.%d \$DatFile