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

limit max engine speed in validation to maximum of max gear speed and max engine speed

(cherry picked from commit 74df1e83)
(cherry picked from commit 2de9d234)
parent bfa6dee2
Branches
Tags
No related merge requests found
...@@ -184,9 +184,10 @@ namespace TUGraz.VectoCore.Models.Simulation.Data ...@@ -184,9 +184,10 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
} }
foreach (var gear in gearboxData.Gears) { foreach (var gear in gearboxData.Gears) {
var maxEngineSpeed = VectoMath.Min(engineData.FullLoadCurves[gear.Key].RatedSpeed, gear.Value.MaxSpeed);
for (var angularVelocity = engineData.IdleSpeed; for (var angularVelocity = engineData.IdleSpeed;
angularVelocity < engineData.FullLoadCurves[gear.Key].RatedSpeed; angularVelocity < maxEngineSpeed;
angularVelocity += 2.0 / 3.0 * (engineData.FullLoadCurves[gear.Key].RatedSpeed - engineData.IdleSpeed) / 10.0) { angularVelocity += 2.0 / 3.0 * (maxEngineSpeed - engineData.IdleSpeed) / 10.0) {
if (!gear.Value.HasLockedGear) { if (!gear.Value.HasLockedGear) {
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment