diff options
Diffstat (limited to 'ROM.lpr')
-rw-r--r-- | ROM.lpr | 47 |
1 files changed, 39 insertions, 8 deletions
@@ -10,14 +10,17 @@ uses {$ENDIF}{$ENDIF} Classes { you can add units after this }, - SysUtils,ROMunit, matheunit, Math; + SysUtils,ROMunit, matheunit, Math, systemunit; -var inPulsO,inPuls,refPulsO,refPuls,surTraj,cRefPuls: tExtPointArray; - smooth,betaSmooth: longint; - tmax,wmax,absShift,betaBound: extended; - force,fourier,mitAmplMod: boolean; - f: textfile; - s,t,u,lpicIn,rohIn,rohRef,outIn,outRef,outRefC,outSur: string; +var + inPulsO,inPuls,refPulsO,refPuls, + surTraj,cRefPuls,surVel: tExtPointArray; + smooth,betaSmooth,veloSmooth: longint; + tmax,wmax,absShift,betaBound,veloBound: extended; + force,fourier,mitAmplMod: boolean; + f: textfile; + s,t,u,lpicIn,rohIn,rohRef,outIn, + outRef,outRefC,outSur,outVel: string; //const Verwendung='Verwendung: ROM ($Einfallspuls_Datei $Ausfallspuls_Datei)/(- $trace-Datei-Prefix) $output_inPuls $output_refPuls $output_Trajektorie $output_cRefPuls '+ // '[-s/--smooth $n] [-f/--force] [-t/--tmax $t] [-w/--wmax $w] [-F/--FFT] [-d/--dt $dt]'; @@ -35,6 +38,8 @@ begin betaBound:=0.95; fourier:=false; mitAmplMod:=true; + veloSmooth:=1; + veloBound:=1; lpicIn:=''; rohIn:=''; @@ -43,6 +48,7 @@ begin outRef:=''; outRefC:=''; outSur:=''; + outVel:=''; assignfile(f,paramstr(1)); reset(f); @@ -87,13 +93,25 @@ begin smooth:=strtoint(s); continue; end; + if pos('Trajektoriengeschwindigkeitsglätte:',s)=1 then begin + delete(s,1,pos(':',s)); + s:=trim(s); + veloSmooth:=strtoint(s); + continue; + end; + if pos('Trajektorien-Maximalgeschwindigkeit:',s)=1 then begin + delete(s,1,pos(':',s)); + s:=trim(s); + veloBound:=strtofloat(s); + continue; + end; if pos('Betaglätte:',s)=1 then begin delete(s,1,pos(':',s)); s:=trim(s); betaSmooth:=strtoint(s); continue; end; - if pos('Maximalgeschwindigkeit:',s)=1 then begin + if pos('AM-Maximalgeschwindigkeit:',s)=1 then begin delete(s,1,pos(':',s)); s:=trim(s); betaBound:=strtofloat(s); @@ -168,6 +186,11 @@ begin outSur:=trim(s); continue; end; + if pos('geschwindigkeit-Ziel:',s)=1 then begin + delete(s,1,pos(':',s)); + outVel:=trim(s); + continue; + end; Fehler('Unbekannter Parameter '''+s+''' in Inputdatei '''+paramstr(1)+'''!'); end; closefile(f); @@ -238,16 +261,22 @@ begin sort(surTraj); writeln(stderr,' fertig'); uniq(surTraj,false); + write(stderr,'Geschwindigkeit berechnen ...'); + ableiten(surTraj,surVel,veloSmooth,veloBound); + writeln(stderr,' fertig'); write(stderr,'Reflektierten Puls berechnen ...'); berechneRefPuls(inPulsO,surTraj,betaSmooth,betaBound,cRefPuls); writeln(stderr,' fertig'); if fourier then begin write(stderr,'Ergebnis interpolieren ...'); interpoliere(surTraj); + if outVel<>'' then + interpoliere(surVel); writeln(stderr,' fertig'); fft(inPuls); fft(refPuls); fft(surTraj); + fft(surVel); inPuls[0].y:=0; refPuls[0].y:=0; surTraj[0].y:=0; @@ -255,6 +284,7 @@ begin cut(surTraj,min(refPuls[length(refPuls)-1].x,inPuls[length(inPuls)-1].x)/2); cut(inPuls,surTraj[length(surTraj)-1].x); cut(refPuls,surTraj[length(surTraj)-1].x); + cut(surVel,surTraj[length(surTraj)-1].x); end else begin cut(surTraj,wmax); @@ -276,6 +306,7 @@ begin writeOutput(outRef,refPuls); end; if outSur<>'' then writeOutput(outSur,surTraj); + if outVel<>'' then writeOutput(outVel,surVel); if outRefC<>'' then writeOutput(outRefC,cRefPuls); end. |