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

Skip to content
Snippets Groups Projects
Commit 2de9d234 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)
parent 57369f73
No related branches found
No related tags found
No related merge requests found
......@@ -183,9 +183,10 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
}
foreach (var gear in gearboxData.Gears) {
var maxEngineSpeed = VectoMath.Min(engineData.FullLoadCurves[gear.Key].RatedSpeed, gear.Value.MaxSpeed);
for (var angularVelocity = engineData.IdleSpeed;
angularVelocity < engineData.FullLoadCurves[gear.Key].RatedSpeed;
angularVelocity += 2.0 / 3.0 * (engineData.FullLoadCurves[gear.Key].RatedSpeed - engineData.IdleSpeed) / 10.0) {
angularVelocity < maxEngineSpeed;
angularVelocity += 2.0 / 3.0 * (maxEngineSpeed - engineData.IdleSpeed) / 10.0) {
if (!gear.Value.HasLockedGear) {
continue;
}
......
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