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

loss-map extension: in case of negative slope for regression line exten...

loss-map extension: in case of negative slope for regression line exten loss-map with torque loss of last entry in loss-map
parent 1c76c247
Branches
Tags
No related merge requests found
......@@ -130,8 +130,14 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData
out r);
var inTq = DeclarationData.LossMapExtrapolationFactor * maxTorque;
if (k > 0) {
entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, inTq, k * inTq + d.SI<NewtonMeter>()));
entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, -inTq, k * inTq + d.SI<NewtonMeter>()));
} else {
var torqueLossLastEntry = speedBucket.Value.OrderBy(x => x.InputSpeed).Last().TorqueLoss;
entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, inTq, torqueLossLastEntry));
entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, -inTq, torqueLossLastEntry));
}
}
return entries;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment