Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 224d6338 authored by Glenn Zarb's avatar Glenn Zarb Committed by Kostis ANAGNOSTOPOULOS
Browse files

Fixing internal engine power in M6

parent b6808254
No related branches found
No related tags found
No related merge requests found
...@@ -151,4 +151,12 @@ Public Interface ISignals ...@@ -151,4 +151,12 @@ Public Interface ISignals
''' <returns></returns> ''' <returns></returns>
''' <remarks></remarks> ''' <remarks></remarks>
Property RunningCalc As Boolean Property RunningCalc As Boolean
''' <summary>
''' Running Calc
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Property Internal_Engine_Power As Single
End Interface End Interface
...@@ -52,7 +52,9 @@ Implements ISignals ...@@ -52,7 +52,9 @@ Implements ISignals
Public Property PneumaticOverrunUtilisation As Single Implements ISignals.PneumaticOverrunUtilisation Public Property PneumaticOverrunUtilisation As Single Implements ISignals.PneumaticOverrunUtilisation
Public Property StoredEnergyEfficiency As Single Implements ISignals.StoredEnergyEfficiency Public Property StoredEnergyEfficiency As Single Implements ISignals.StoredEnergyEfficiency
Public Property RunningCalc As Boolean Implements ISignals.RunningCalc Public Property RunningCalc As Boolean Implements ISignals.RunningCalc
Public Property Internal_Engine_Power As Single Implements ISignals.Internal_Engine_Power
End Class End Class
...@@ -1047,7 +1047,7 @@ lb_nOK: ...@@ -1047,7 +1047,7 @@ lb_nOK:
'Motoring power (< 0 !!!) 'Motoring power (< 0 !!!)
'[kW] '[kW]
'** NOTE THIS IS MULTIPLIED BY - to get a positive value. '** NOTE THIS IS MULTIPLIED BY - to get a positive value.
mAAUX_Global.EngineMotoringPower = - FLD(Gear).Pdrag(EngineSpeed) mAAUX_Global.EngineMotoringPower = -FLD(Gear).Pdrag(EngineSpeed)
'Additional aux power from driving cycle (optional user input) 'Additional aux power from driving cycle (optional user input)
'[kW] '[kW]
...@@ -1189,7 +1189,12 @@ lb_nOK: ...@@ -1189,7 +1189,12 @@ lb_nOK:
If P < Pmin Then P = Pmin If P < Pmin Then P = Pmin
mAAUX_Global.Internal_Engine_Power = P
Else Else
mAAUX_Global.Internal_Engine_Power = P
If EngState0 = tEngState.Load Then If EngState0 = tEngState.Load Then
Pbrake = 0 Pbrake = 0
If GBX.TCon And GBX.IsTCgear(Gear) Then Pbrake = GBX.TC_PeBrake If GBX.TCon And GBX.IsTCgear(Gear) Then Pbrake = GBX.TC_PeBrake
...@@ -2572,6 +2577,7 @@ lb10: ...@@ -2572,6 +2577,7 @@ lb10:
mAAUX_Global.advancedAuxModel.Signals.Idle = mAAUX_Global.Idle mAAUX_Global.advancedAuxModel.Signals.Idle = mAAUX_Global.Idle
mAAUX_Global.advancedAuxModel.Signals.InNeutral = mAAUX_Global.InNeutral mAAUX_Global.advancedAuxModel.Signals.InNeutral = mAAUX_Global.InNeutral
mAAUX_Global.advancedAuxModel.Signals.RunningCalc = mAAUX_Global.RunningCalc mAAUX_Global.advancedAuxModel.Signals.RunningCalc = mAAUX_Global.RunningCalc
mAAUX_Global.advancedAuxModel.Signals.Internal_Engine_Power = mAAUX_Global.Internal_Engine_Power
'Power coming out of Advanced Model is in Watts. 'Power coming out of Advanced Model is in Watts.
power = (advancedAuxModel.AuxiliaryPowerAtCrankWatts / 1000) power = (advancedAuxModel.AuxiliaryPowerAtCrankWatts / 1000)
...@@ -2579,13 +2585,13 @@ lb10: ...@@ -2579,13 +2585,13 @@ lb10:
'Glenn: Comment the previous line and uncomment the next line to include the classic auxilaries power togeher with the advanced auxiliary power. 'Glenn: Comment the previous line and uncomment the next line to include the classic auxilaries power togeher with the advanced auxiliary power.
'power = VEC.PauxSum(t, nU) + (advancedAuxModel.AuxiliaryPowerAtCrankWatts / 1000) 'power = VEC.PauxSum(t, nU) + (advancedAuxModel.AuxiliaryPowerAtCrankWatts / 1000)
Catch ex As Exception Catch ex As Exception
'EXIT THIS IS A FAILURE 'EXIT THIS IS A FAILURE
WorkerMsg(tMsgID.Err,"Error in Advanced Power Calc :" & ex.Message,"paux") WorkerMsg(tMsgID.Err, "Error in Advanced Power Calc :" & ex.Message, "paux")
Return false Return False
end try End Try
Return power Return power
......
...@@ -16,7 +16,7 @@ Module mAAUX_Global ...@@ -16,7 +16,7 @@ Module mAAUX_Global
Public WithEvents advancedAuxModel As IAdvancedAuxiliaries Public WithEvents advancedAuxModel As IAdvancedAuxiliaries
Public RunningCalc As Boolean = False Public RunningCalc As Boolean = False
Public Internal_Engine_Power As Single
'This must be set in the main loop and will be used to determin 'This must be set in the main loop and will be used to determin
'the name of the file which would be offered to the model which is used 'the name of the file which would be offered to the model which is used
'by it internally. In Bus Auxiliaries, it is used for Actuations of the 'by it internally. In Bus Auxiliaries, it is used for Actuations of the
......
...@@ -147,7 +147,7 @@ Namespace DownstreamModules ...@@ -147,7 +147,7 @@ Namespace DownstreamModules
Public ReadOnly Property Sum2 As Single Public ReadOnly Property Sum2 As Single
Get Get
Dim returnValue As Single = (_signals.PreExistingAuxPower * 1000) + _m1.AveragePowerDemandAtCrankFromHVACMechanicalsWatts + SW1 + _m3.GetAveragePowerDemandAtCrankFromPneumatics Dim returnValue As Single = _m1.AveragePowerDemandAtCrankFromHVACMechanicalsWatts + SW1 + _m3.GetAveragePowerDemandAtCrankFromPneumatics
Return returnValue Return returnValue
...@@ -157,7 +157,7 @@ Namespace DownstreamModules ...@@ -157,7 +157,7 @@ Namespace DownstreamModules
Get Get
Return (_signals.EngineMotoringPower * 1000) + _ Return (_signals.EngineMotoringPower * 1000) + _
(_signals.EngineDrivelinePower * 1000) + _ (_signals.Internal_Engine_Power * 1000) + _
Sum2 Sum2
End Get End Get
......
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