From 2f0f2fbfe537ee082837f1492327850843343d81 Mon Sep 17 00:00:00 2001 From: Nikhar Abbas Date: Wed, 6 Nov 2019 11:17:53 -0700 Subject: [PATCH] Read avrswap pitch signal for numerical stability --- src/ReadSetParameters.f90 | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/ReadSetParameters.f90 b/src/ReadSetParameters.f90 index 493c5509..579225e1 100644 --- a/src/ReadSetParameters.f90 +++ b/src/ReadSetParameters.f90 @@ -262,17 +262,13 @@ SUBROUTINE ReadAvrSWAP(avrSWAP, LocalVar) LocalVar%FA_Acc = avrSWAP(53) LocalVar%Azimuth = avrSWAP(60) LocalVar%NumBl = NINT(avrSWAP(61)) - - ! NJA: I think we need to feed back the previous pitch command, rather than use avrSWAP for numerical stability - IF (LocalVar%iStatus == 0) THEN - LocalVar%BlPitch(1) = avrSWAP(4) - LocalVar%BlPitch(2) = avrSWAP(33) - LocalVar%BlPitch(3) = avrSWAP(34) - ELSE - LocalVar%BlPitch(1) = LocalVar%PitCom(1) - LocalVar%BlPitch(2) = LocalVar%PitCom(2) - LocalVar%BlPitch(3) = LocalVar%PitCom(3) - ENDIF + LocalVar%BlPitch(1) = avrSWAP(4) + LocalVar%BlPitch(2) = avrSWAP(33) + LocalVar%BlPitch(3) = avrSWAP(34) + ! --- NJA: sometimes feedback bath the previous pitch command helps for numerical stability, sometimes it does not... + ! LocalVar%BlPitch(1) = LocalVar%PitCom(1) + ! LocalVar%BlPitch(2) = LocalVar%PitCom(2) + ! LocalVar%BlPitch(3) = LocalVar%PitCom(3) END SUBROUTINE ReadAvrSWAP ! -----------------------------------------------------------------------------------