Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit bde24738 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

take into account cycle step time

parent 53b1ebed
No related branches found
No related tags found
No related merge requests found
......@@ -230,14 +230,12 @@ Public Class AdvancedAuxiliaries
Public Function CycleStep(seconds As Double, ByRef message As String) As Boolean _
Implements VectoAuxiliaries.IAdvancedAuxiliaries.CycleStep
Try
M9.CycleStep(seconds)
M10.CycleStep(seconds)
M11.CycleStep(seconds)
Signals.CurrentCycleTimeInSeconds += 1
Signals.CurrentCycleTimeInSeconds += seconds
Catch ex As Exception
MessageBox.Show("Exception: " + ex.Message + " Stack Trace: " + ex.StackTrace)
Return False
......
......@@ -19,7 +19,7 @@ Namespace DownstreamModules
Implements IM10
'Aggregators
Private _AverageAirConsumedPerSecondLitre As Double
Private _AverageAirConsumedLitre As Double
'Diagnostics
Private x1, y1, x2, y2, x3, y3, xTA, interp1, interp2 As Single
......@@ -108,7 +108,7 @@ Namespace DownstreamModules
y3 = m9.TotalCycleFuelConsumptionCompressorOffContinuously
xTA = _AverageAirConsumedPerSecondLitre 'm3.AverageAirConsumedPerSecondLitre
xTA = _AverageAirConsumedLitre 'm3.AverageAirConsumedPerSecondLitre
Select Case interpType
......@@ -120,7 +120,7 @@ Namespace DownstreamModules
'Smart Pneumatics ( OUT 2 )
Case InterpolationType.SmartPneumtaics
ReturnValue = y3 + (((y1 - y3) / (x1 - x3)) * (xTA - x3))
returnValue = y3 + (((y1 - y3) / (x1 - x3)) * (xTA - x3))
interp2 = returnValue
......@@ -171,8 +171,8 @@ Namespace DownstreamModules
Public Sub CycleStep(Optional stepTimeInSeconds As Double = 0.0) Implements IM10.CycleStep
_AverageAirConsumedPerSecondLitre +=
If(Single.IsNaN(m3.AverageAirConsumedPerSecondLitre), 0, m3.AverageAirConsumedPerSecondLitre)
_AverageAirConsumedLitre +=
If(Single.IsNaN(m3.AverageAirConsumedPerSecondLitre), 0, m3.AverageAirConsumedPerSecondLitre * stepTimeInSeconds)
End Sub
End Class
End Namespace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment