diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index f7a8e0d3f..2602195de 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.27.1871.0")] -[assembly: AssemblyFileVersion("2.27.1871.0")] +[assembly: AssemblyVersion("2.27.1873.0")] +[assembly: AssemblyFileVersion("2.27.1873.0")] diff --git a/TBF/Rig/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs b/TBF/Rig/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs index 7c27b0bc2..6c315db1a 100644 --- a/TBF/Rig/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs +++ b/TBF/Rig/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs @@ -2647,30 +2647,17 @@ namespace TBF.Rig.TestMethods.iPerlCommunication double q2Correction = 0; double q2Correction2 = 0; /// L-R direction in case of Q2CorrType.Update and Q2CorrType.ConditionalUpdate - int metroR = 800; - if (string.IsNullOrEmpty(wm.MetrologicalClass()) || - (wm.MetrologicalClass()[0] != 'R' && wm.MetrologicalClass()[0] != 'r') || - !int.TryParse(wm.MetrologicalClass().Substring(1), out metroR) || - metroR <= 0) - { - metroR = 800; /// R800 is the default metrological class - } - if (q2CorrType == Q2CorrType.Update || q2CorrType == Q2CorrType.ConditionalUpdate) { /// Calculate two Q2 correction factors from two tests done in both directions - q2Correction = ihead.CalculateQ2CorrectionFactor(q2adjResult, ihead.CalibTargetQ2, q2adjTestData.Qfrom, - metroR, q2adjResult.Q2CorrRL); - q2Correction2 = ihead.CalculateQ2CorrectionFactor(q2adjResult2, ihead.CalibTargetQ2, q2adjTestData2.Qfrom, - metroR, q2adjResult2.Q2CorrLR); + q2Correction = ihead.CalculateQ2CorrectionFactor(q2adjResult, ihead.CalibTargetQ2, q2adjTestData.Qfrom, q2adjResult.Q2CorrRL); + q2Correction2 = ihead.CalculateQ2CorrectionFactor(q2adjResult2, ihead.CalibTargetQ2, q2adjTestData2.Qfrom, q2adjResult2.Q2CorrLR); } else { /// Calculate Q2 correction factors from a single test - q2Correction = ihead.CalculateQ2CorrectionFactor(q2adjResult, ihead.CalibTargetQ2, q2adjTestData.Qfrom, - metroR, q2adjResult.Q2CorrRL); - q2Correction2 = ihead.CalculateQ2CorrectionFactor(q2adjResult, ihead.CalibTargetQ2, q2adjTestData.Qfrom, - metroR, q2adjResult.Q2CorrLR); + q2Correction = ihead.CalculateQ2CorrectionFactor(q2adjResult, ihead.CalibTargetQ2, q2adjTestData.Qfrom, q2adjResult.Q2CorrRL); + q2Correction2 = ihead.CalculateQ2CorrectionFactor(q2adjResult, ihead.CalibTargetQ2, q2adjTestData.Qfrom, q2adjResult.Q2CorrLR); } diff --git a/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs b/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs index 736ca2e0a..1ad1bc6e0 100644 --- a/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs +++ b/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs @@ -211,7 +211,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead /// Nominal flow in m3/h /// 0 or the current Q2 correction factor when updating the factor /// Calculated Q2 correction factor - public double CalculateQ2CorrectionFactor(Results.Entities.MeterTestRslt q2adjResult, double calibTarget, double nominalFlow, int metroR, int currentFactor = 0) + public double CalculateQ2CorrectionFactor(Results.Entities.MeterTestRslt q2adjResult, double calibTarget, double nominalFlow, int currentFactor = 0) { double nominalTestFlowLph = Common.Units.ConvertTo(Common.Unit.lph, nominalFlow); double volumeRefShiftedToTarget = q2adjResult.VolumeRef * (1.0 + calibTarget / 100.0); @@ -224,8 +224,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead double F = D / (nominalTestFlowLph * 10.0); /// Error corrected with 8 Raw Units per minute [%] double G = F / B; /// Error corrected with 1 Raw Unit per minute [%] - double q2CorrectionFactor = (double)currentFactor - - (800.0 / metroR) * (q2adjErrorShiftedToTarget / G) * (volumeRefShiftedToTarget / q2adjResult.VolumeMeter); + double q2CorrectionFactor = Convert.ToDouble(currentFactor) + - (q2adjErrorShiftedToTarget / G) * (volumeRefShiftedToTarget / q2adjResult.VolumeMeter); log.WarnFormat("CalculateQ2CorrectionFactor() : Pos={0}, PCB#={1}, Error={2}%, CalTarget={3}%, Q2CorrFactor={4}", Name,