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 fa913a2d authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

cycle gearbox: disengage only if torque demand is not positive

parent 57cba4dc
Branches
Tags
No related merge requests found
...@@ -144,11 +144,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -144,11 +144,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
} }
// mk 2016-11-30: added additional check for outAngularVelocity due to failing test: MeasuredSpeed_Gear_AT_PS_Run // mk 2016-11-30: added additional check for outAngularVelocity due to failing test: MeasuredSpeed_Gear_AT_PS_Run
var retVal = Gear == 0 || outAngularVelocity.IsEqual(0, 1) var retVal = Gear == 0 || (outAngularVelocity.IsSmallerOrEqual(0, 1) && outTorque.IsSmallerOrEqual(0, 1))
? RequestDisengaged(absTime, dt, outTorque, outAngularVelocity, dryRun) ? RequestDisengaged(absTime, dt, outTorque, outAngularVelocity, dryRun)
: RequestEngaged(absTime, dt, outTorque, outAngularVelocity, dryRun); : RequestEngaged(absTime, dt, outTorque, outAngularVelocity, dryRun);
retVal.GearboxPowerRequest = outTorque * outAngularVelocity; retVal.GearboxPowerRequest = outTorque * (PreviousState.OutAngularVelocity + outAngularVelocity) /2;
return retVal; return retVal;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment