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

do not use gearbox in speed for shifting decision but engine speed

parent 321fd53d
No related branches found
No related tags found
No related merge requests found
...@@ -98,9 +98,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -98,9 +98,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var inTorque = response.ClutchPowerRequest / inAngularSpeed; var inTorque = response.ClutchPowerRequest / inAngularSpeed;
// if in shift curve and above idle speed and torque reserve is provided. // if in shift curve and above idle speed and torque reserve is provided.
if (!IsBelowDownShiftCurve(gear, inTorque, inAngularSpeed) && inAngularSpeed > DataBus.EngineIdleSpeed && if (/*!IsBelowDownShiftCurve(gear, inTorque, response.EngineSpeed) &&*/ response.EngineSpeed > DataBus.EngineIdleSpeed &&
reserve >= ModelData.StartTorqueReserve) { reserve >= ModelData.StartTorqueReserve) {
_nextGear = gear; _nextGear = gear;
_gearbox.LastUpshift = absTime;
_gearbox.LastDownshift = absTime;
return gear; return gear;
} }
} }
...@@ -148,10 +150,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -148,10 +150,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// emergency shift to not stall the engine ------------------------ // emergency shift to not stall the engine ------------------------
_nextGear = gear; _nextGear = gear;
while (_nextGear > 1 && SpeedTooLowForEngine(_nextGear, outAngularVelocity)) { while (_nextGear > 1 && SpeedTooLowForEngine(_nextGear, inAngularVelocity / ModelData.Gears[gear].Ratio)) {
_nextGear--; _nextGear--;
} }
while (_nextGear < ModelData.Gears.Count && SpeedTooHighForEngine(_nextGear, outAngularVelocity)) { while (_nextGear < ModelData.Gears.Count &&
SpeedTooHighForEngine(_nextGear, inAngularVelocity / ModelData.Gears[gear].Ratio)) {
_nextGear++; _nextGear++;
} }
if (_nextGear != gear) { if (_nextGear != gear) {
......
...@@ -60,9 +60,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -60,9 +60,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
/// </summary> /// </summary>
protected internal bool Disengaged = true; protected internal bool Disengaged = true;
public Second LastUpshift { get; private set; } public Second LastUpshift { get; protected internal set; }
public Second LastDownshift { get; private set; } public Second LastDownshift { get; protected internal set; }
public override GearInfo NextGear public override GearInfo NextGear
{ {
...@@ -349,7 +349,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -349,7 +349,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var shiftAllowed = !inAngularVelocity.IsEqual(0) && !DataBus.VehicleSpeed.IsEqual(0); var shiftAllowed = !inAngularVelocity.IsEqual(0) && !DataBus.VehicleSpeed.IsEqual(0);
if (response is ResponseSuccess && shiftAllowed) { if (response is ResponseSuccess && shiftAllowed) {
var shiftRequired = _strategy.ShiftRequired(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, var shiftRequired = _strategy.ShiftRequired(absTime, dt, outTorque, outAngularVelocity, inTorque, response.EngineSpeed,
Gear, _engageTime); Gear, _engageTime);
if (shiftRequired) { if (shiftRequired) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment