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

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

Merge pull request #288 in VECTO/vecto-sim from...

Merge pull request #288 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:hotfix/VECTO-364-measured-speed-mode-with-gear-at to master

* commit '23db7659':
  cyclegearbox: report cycle-closed correctly.
parents 991df8cf 23db7659
No related branches found
No related tags found
No related merge requests found
......@@ -352,11 +352,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
var filtered = operatingPointList.Where(x =>
(x.InTorque * x.InAngularVelocity).IsSmallerOrEqual(DataBus.EngineStationaryFullPower(x.InAngularVelocity),
Constants.SimulationSettings.LineSearchTolerance.SI<Watt>()) &&
(x.InTorque * x.InAngularVelocity).IsGreaterOrEqual(DataBus.EngineDragPower(x.InAngularVelocity),
Constants.SimulationSettings.LineSearchTolerance.SI<Watt>())
).ToArray();
(x.InTorque * x.InAngularVelocity).IsSmallerOrEqual(DataBus.EngineStationaryFullPower(x.InAngularVelocity),
Constants.SimulationSettings.LineSearchTolerance.SI<Watt>()) &&
(x.InTorque * x.InAngularVelocity).IsGreaterOrEqual(DataBus.EngineDragPower(x.InAngularVelocity),
Constants.SimulationSettings.LineSearchTolerance.SI<Watt>())
).ToArray();
if (filtered.Length == 1) {
return filtered.First();
}
......@@ -446,12 +446,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
container[ModalResultField.TC_angularSpeedOut] = CurrentState.TorqueConverterOperatingPoint.OutAngularVelocity;
var avgOutVelocity = ((PreviousState.TorqueConverterOperatingPoint != null
? PreviousState.TorqueConverterOperatingPoint.OutAngularVelocity
: PreviousState.InAngularVelocity) +
? PreviousState.TorqueConverterOperatingPoint.OutAngularVelocity
: PreviousState.InAngularVelocity) +
CurrentState.TorqueConverterOperatingPoint.OutAngularVelocity) / 2.0;
var avgInVelocity = ((PreviousState.TorqueConverterOperatingPoint != null
? PreviousState.TorqueConverterOperatingPoint.InAngularVelocity
: PreviousState.InAngularVelocity) +
? PreviousState.TorqueConverterOperatingPoint.InAngularVelocity
: PreviousState.InAngularVelocity) +
CurrentState.TorqueConverterOperatingPoint.InAngularVelocity) / 2.0;
container[ModalResultField.P_TC_out] = CurrentState.OutTorque * avgOutVelocity;
container[ModalResultField.P_TC_loss] = CurrentState.InTorque * avgInVelocity -
......@@ -480,7 +480,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public override bool ClutchClosed(Second absTime)
{
return DataBus.CycleData.LeftSample.Gear != 0;
return (DataBus.DriverBehavior == DrivingBehavior.Braking
? DataBus.CycleData.LeftSample.Gear
: DataBus.CycleData.RightSample.Gear) != 0;
}
#endregion
......
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