Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit a6273318 authored by Stefanos DOUMPOULAKIS's avatar Stefanos DOUMPOULAKIS
Browse files

Merge branch 'issue-610' into 'amdm2/develop'

fix #610: broken VTP mode due to Clutch

See merge request vecto/vecto!205
parents da5220c9 b2801f45
Branches
Tags
No related merge requests found
......@@ -228,14 +228,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var engTorque = 0.SI<NewtonMeter>();
/* gear used for clutch slipping: saturation to avoid case where Gear==0 (where GetGearData crash) and Gear>2 (allowslipping does not allow slipping at speed higher than 2) */
if ((DataBus.DrivingCycleInfo.RoadGradient != null) && (DataBus.WheelsInfo != null))
{
var slipGear = Math.Min(Math.Max(DataBus.GearboxInfo?.Gear?.Gear ?? 1, 1), 2);
var ratioGB = DataBus.GearboxInfo?.GetGearData(slipGear)?.Ratio ?? 1.0;
var ratioAxl = DataBus.AxlegearInfo?.Ratio ?? 1.0;
var axlegearlossP = DataBus.AxlegearInfo?.AxlegearLoss() ?? 0.0.SI<Watt>();
var gearboxlossP = DataBus.GearboxInfo?.GearboxLoss() ?? 0.0.SI<Watt>();
if (DataBus.DrivingCycleInfo.RoadGradient != null)
{
var fWheel = DataBus.VehicleInfo.RollingResistance(DataBus.DrivingCycleInfo.RoadGradient)
+ DataBus.VehicleInfo.SlopeResistance(DataBus.DrivingCycleInfo.RoadGradient)
+ DataBus.VehicleInfo.TotalMass*acc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment