From d3946d1bc558854811213817f718a603fe62b088 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 3 Aug 2018 16:00:12 +0200 Subject: subzykel-Verschiebung sollte nicht in absShift landen --- ROM.lps | 87 +++++++++++++++++++++++++++++++------------------------------ romunit.pas | 29 +++++++-------------- 2 files changed, 53 insertions(+), 63 deletions(-) diff --git a/ROM.lps b/ROM.lps index fae3e1e..d1a363d 100644 --- a/ROM.lps +++ b/ROM.lps @@ -7,9 +7,9 @@ - - - + + + @@ -17,10 +17,10 @@ - - + + - + @@ -28,7 +28,7 @@ - + @@ -59,121 +59,122 @@ - + - + - + - + - - + + - + + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + - - + + - + - + - + - + - + - + - + + - + diff --git a/romunit.pas b/romunit.pas index 7782814..a3289c5 100644 --- a/romunit.pas +++ b/romunit.pas @@ -594,29 +594,18 @@ end; procedure gesamtverschiebung(var inPuls,outPuls: tExtPointArray; var absShift: extended); var - iMax,oMax,i: longint; + oMin,i: longint; begin - iMax:=0; - for i:=1 to length(inPuls)-1 do - if inPuls[i]['y']>inPuls[iMax]['y'] then - iMax:=i; - oMax:=0; - for i:=1 to length(outPuls)-1 do - if outPuls[i]['y']>outPuls[oMax]['y'] then - oMax:=i; - if absShift<-0.9e9 then - absShift:=outPuls[oMax]['x']-inPuls[iMax]['x'] - else - absShift:=(outPuls[oMax]['x']-inPuls[iMax]['x'])-round((outPuls[oMax]['x']-inPuls[iMax]['x'])-absShift); - for i:=0 to length(outPuls)-1 do outPuls[i]['x']:=outPuls[i]['x']-absShift; - oMax:=0; - while (oMax0 then + dec(oMin); + for i:=oMin to length(outPuls)-1 do + outPuls[i-oMin]:=outPuls[i]; + setlength(outPuls,length(outPuls)-oMin); cut(inPuls,outPuls[length(outPuls)-1]['x']); writeln(stderr,'Die konstante Verschiebung wurde auf '+floattostr(absShift)+' T optimiert.'); end; -- cgit v1.2.3-54-g00ecf