Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 6281b884 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge pull request #27 in VECTO/vecto-dev from...

Merge pull request #27 in VECTO/vecto-dev from VECTO/mq_vecto-dev:feature/VECTO-1317-adaptations-for-bus-evaluations to develop

* commit 'ef118926':
  bugfix generic torque converter data with decimal separator
parents 9cb79bb8 ef118926
No related branches found
No related tags found
No related merge requests found
......@@ -70,39 +70,39 @@ namespace TUGraz.VectoCore.Models.Declaration
// stall point
var stallPt = retVal.NewRow();
stallPt[colSpeedRatio] = Math.Round(speedRatioStallPt * ratio, 4, MidpointRounding.AwayFromZero);
stallPt[colSpeedRatio] = Math.Round(speedRatioStallPt * ratio, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
stallPt[colTqRatio] = Math.Round(torqueRatioStallPt / speedRAtioOverrunPt / ratio, 2,
MidpointRounding.AwayFromZero);
stallPt[colRefTq] = Math.Round(refTorqueStallPt, 2, MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
stallPt[colRefTq] = Math.Round(refTorqueStallPt, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(stallPt);
// intermediate point
var intermediatePt = retVal.NewRow();
intermediatePt[colSpeedRatio] =
Math.Round(speedRatioIntermediatePt * ratio, 4, MidpointRounding.AwayFromZero);
Math.Round(speedRatioIntermediatePt * ratio, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
intermediatePt[colTqRatio] =
Math.Round(torqueRatioIntermediatePt / ratio, 2, MidpointRounding.AwayFromZero);
Math.Round(torqueRatioIntermediatePt / ratio, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
intermediatePt[colRefTq] = Math.Round(refTorqueStallPt * refTorqueIntermediatePtFactor, 2,
MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(intermediatePt);
//coupling point
var couplingPt = retVal.NewRow();
couplingPt[colSpeedRatio] = Math.Round(speedRatioCouplingPt * speedRAtioOverrunPt * ratio, 4,
MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
couplingPt[colTqRatio] = Math.Round(torqueRatioCouplingPt / speedRAtioOverrunPt / ratio, 2,
MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
couplingPt[colRefTq] = Math.Round(refTorqueStallPt * refTorqueCouplingPtFactor, 2,
MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(couplingPt);
// overrun point
var overrunPt = retVal.NewRow();
overrunPt[colSpeedRatio] = Math.Round(speedRAtioOverrunPt * ratio, 4, MidpointRounding.AwayFromZero);
overrunPt[colSpeedRatio] = Math.Round(speedRAtioOverrunPt * ratio, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
overrunPt[colTqRatio] = Math.Round(torqueRatioOverrunPt / speedRAtioOverrunPt / ratio, 2,
MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
overrunPt[colRefTq] =
Math.Round(refTorqueStallPt * refTorqueOverrunPtFactor, 2, MidpointRounding.AwayFromZero);
Math.Round(refTorqueStallPt * refTorqueOverrunPtFactor, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(overrunPt);
return retVal;
......@@ -157,33 +157,33 @@ namespace TUGraz.VectoCore.Models.Declaration
// stall point
var stallPt = retVal.NewRow();
stallPt[colSpeedRatio] = Math.Round(speedRatioStallPt, 4, MidpointRounding.AwayFromZero);
stallPt[colSpeedRatio] = Math.Round(speedRatioStallPt, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
stallPt[colTqRatio] = Math.Round(torqueRatioStallPt - c * Math.Pow(speedRatioStallPt, 0.5), 2,
MidpointRounding.AwayFromZero);
stallPt[colRefTq] = Math.Round(refTorqueStallPt, 2, MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
stallPt[colRefTq] = Math.Round(refTorqueStallPt, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(stallPt);
for (var i = speedRatioStallPt + nue_step; i.IsSmaller(speedRatioIntermediatePtFactor, nue_step / 10); i += nue_step) {
var pt = retVal.NewRow();
var nue = i * speedRatioOverrunPt;
var mue = torqueRatioStallPt - c * Math.Pow(nue, 0.5);
pt[colSpeedRatio] = Math.Round(nue, 4, MidpointRounding.AwayFromZero);
pt[colTqRatio] = Math.Round(mue, 2, MidpointRounding.AwayFromZero);
pt[colSpeedRatio] = Math.Round(nue, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
pt[colTqRatio] = Math.Round(mue, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
pt[colRefTq] = Math.Round(
refTorqueStallPt + (refTorqueIntermediatePt - refTorqueStallPt) / speedRatioIntermediatePt *
nue, 2,
MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(pt);
}
// intermediate point
var intermediatePt = retVal.NewRow();
intermediatePt[colSpeedRatio] = Math.Round(speedRatioIntermediatePt, 4, MidpointRounding.AwayFromZero);
intermediatePt[colSpeedRatio] = Math.Round(speedRatioIntermediatePt, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
intermediatePt[colTqRatio] = Math.Round(torqueRatioStallPt - c * Math.Pow(speedRatioIntermediatePt, 0.5), 2,
MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
intermediatePt[colRefTq] = Math.Round(refTorqueIntermediatePt, 2,
MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(intermediatePt);
for (var i = speedRatioIntermediatePtFactor + nue_step; i.IsSmaller(speedRatioCouplingPtFactor, nue_step/10); i += nue_step)
......@@ -191,30 +191,30 @@ namespace TUGraz.VectoCore.Models.Declaration
var pt = retVal.NewRow();
var nue = i * speedRatioOverrunPt;
var mue = torqueRatioStallPt - c * Math.Pow(nue, 0.5);
pt[colSpeedRatio] = Math.Round(nue, 4, MidpointRounding.AwayFromZero);
pt[colTqRatio] = Math.Round(mue, 2, MidpointRounding.AwayFromZero);
pt[colSpeedRatio] = Math.Round(nue, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
pt[colTqRatio] = Math.Round(mue, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
pt[colRefTq] = Math.Round(
refTorqueIntermediatePt + (refTorqueCouplingPt - refTorqueIntermediatePt) / (speedRatioCouplingPt - speedRatioIntermediatePt ) *
(nue - speedRatioIntermediatePt), 2,
MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(pt);
}
//coupling point
var couplingPt = retVal.NewRow();
couplingPt[colSpeedRatio] = Math.Round(speedRatioCouplingPt, 4, MidpointRounding.AwayFromZero);
couplingPt[colSpeedRatio] = Math.Round(speedRatioCouplingPt, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
couplingPt[colTqRatio] = Math.Round(torqueRatioStallPt - c * Math.Pow(speedRatioCouplingPt, 0.5), 2,
MidpointRounding.AwayFromZero);
couplingPt[colRefTq] = Math.Round(refTorqueCouplingPt, 2, MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
couplingPt[colRefTq] = Math.Round(refTorqueCouplingPt, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(couplingPt);
// overrun point
var overrunPt = retVal.NewRow();
overrunPt[colSpeedRatio] = Math.Round(speedRatioOverrunPt, 4, MidpointRounding.AwayFromZero);
overrunPt[colSpeedRatio] = Math.Round(speedRatioOverrunPt, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
overrunPt[colTqRatio] = Math.Round(torqueRatioOverrunPt / speedRatioOverrunPt / ratio, 2,
MidpointRounding.AwayFromZero);
MidpointRounding.AwayFromZero).ToXMLFormat(6);
overrunPt[colRefTq] =
Math.Round(refTorqueStallPt * refTorqueOverrunPtFactor, 2, MidpointRounding.AwayFromZero);
Math.Round(refTorqueStallPt * refTorqueOverrunPtFactor, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(overrunPt);
return retVal;
......
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