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

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

engine form: read out gearbox type if available for computing engine inertia

parent e6cc45b4
No related branches found
No related tags found
No related merge requests found
......@@ -67,8 +67,21 @@ Public Class EngineForm
If Not Cfg.DeclMode Then Exit Sub
Dim gbxType as GearboxType = GearboxType.AMT
Dim jobFile As String = VectoJobForm.VectoFile
If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile),
IEngineeringInputDataProvider)
If (not inputData Is Nothing) Then
Dim gbx as IGearboxDeclarationInputData = inputData.JobInputData.Vehicle.GearboxInputData
gbxType = gbx.Type
End If
End If
TbInertia.Text = DeclarationData.Engine.EngineInertia((TbDispl.Text.ToDouble(0.0)/1000.0/1000.0).SI (Of CubicMeter),
GearboxType.AMT).ToGUIFormat()
gbxType).ToGUIFormat()
End Sub
......
......@@ -911,9 +911,9 @@ Public Class GearboxForm
If (vehicle.Axles.Count < 2) Then
Return Nothing
End If
rdyn = vehicle.Axles.Where(Function(axle) axle.AxleType = AxleType.VehicleDriven) _
.Select(Function(da) DeclarationData.Wheels.Lookup(da.Tyre.Dimension).DynamicTyreRadius) _
.Average()
rdyn = vehicle.Axles.Where(Function(axle) axle.AxleType = AxleType.VehicleDriven) _
.Select(Function(da) DeclarationData.Wheels.Lookup(da.Tyre.Dimension).DynamicTyreRadius) _
.Average()
End If
If (rDyn.IsEqual(0)) Then
Return Nothing
......
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