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 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
Branches
Tags
No related merge requests found
...@@ -70,39 +70,39 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -70,39 +70,39 @@ namespace TUGraz.VectoCore.Models.Declaration
// stall point // stall point
var stallPt = retVal.NewRow(); 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, stallPt[colTqRatio] = Math.Round(torqueRatioStallPt / speedRAtioOverrunPt / ratio, 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
stallPt[colRefTq] = Math.Round(refTorqueStallPt, 2, MidpointRounding.AwayFromZero); stallPt[colRefTq] = Math.Round(refTorqueStallPt, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(stallPt); retVal.Rows.Add(stallPt);
// intermediate point // intermediate point
var intermediatePt = retVal.NewRow(); var intermediatePt = retVal.NewRow();
intermediatePt[colSpeedRatio] = intermediatePt[colSpeedRatio] =
Math.Round(speedRatioIntermediatePt * ratio, 4, MidpointRounding.AwayFromZero); Math.Round(speedRatioIntermediatePt * ratio, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
intermediatePt[colTqRatio] = 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, intermediatePt[colRefTq] = Math.Round(refTorqueStallPt * refTorqueIntermediatePtFactor, 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(intermediatePt); retVal.Rows.Add(intermediatePt);
//coupling point //coupling point
var couplingPt = retVal.NewRow(); var couplingPt = retVal.NewRow();
couplingPt[colSpeedRatio] = Math.Round(speedRatioCouplingPt * speedRAtioOverrunPt * ratio, 4, couplingPt[colSpeedRatio] = Math.Round(speedRatioCouplingPt * speedRAtioOverrunPt * ratio, 4,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
couplingPt[colTqRatio] = Math.Round(torqueRatioCouplingPt / speedRAtioOverrunPt / ratio, 2, couplingPt[colTqRatio] = Math.Round(torqueRatioCouplingPt / speedRAtioOverrunPt / ratio, 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
couplingPt[colRefTq] = Math.Round(refTorqueStallPt * refTorqueCouplingPtFactor, 2, couplingPt[colRefTq] = Math.Round(refTorqueStallPt * refTorqueCouplingPtFactor, 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(couplingPt); retVal.Rows.Add(couplingPt);
// overrun point // overrun point
var overrunPt = retVal.NewRow(); 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, overrunPt[colTqRatio] = Math.Round(torqueRatioOverrunPt / speedRAtioOverrunPt / ratio, 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
overrunPt[colRefTq] = overrunPt[colRefTq] =
Math.Round(refTorqueStallPt * refTorqueOverrunPtFactor, 2, MidpointRounding.AwayFromZero); Math.Round(refTorqueStallPt * refTorqueOverrunPtFactor, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(overrunPt); retVal.Rows.Add(overrunPt);
return retVal; return retVal;
...@@ -157,33 +157,33 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -157,33 +157,33 @@ namespace TUGraz.VectoCore.Models.Declaration
// stall point // stall point
var stallPt = retVal.NewRow(); 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, stallPt[colTqRatio] = Math.Round(torqueRatioStallPt - c * Math.Pow(speedRatioStallPt, 0.5), 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
stallPt[colRefTq] = Math.Round(refTorqueStallPt, 2, MidpointRounding.AwayFromZero); stallPt[colRefTq] = Math.Round(refTorqueStallPt, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(stallPt); retVal.Rows.Add(stallPt);
for (var i = speedRatioStallPt + nue_step; i.IsSmaller(speedRatioIntermediatePtFactor, nue_step / 10); i += nue_step) { for (var i = speedRatioStallPt + nue_step; i.IsSmaller(speedRatioIntermediatePtFactor, nue_step / 10); i += nue_step) {
var pt = retVal.NewRow(); var pt = retVal.NewRow();
var nue = i * speedRatioOverrunPt; var nue = i * speedRatioOverrunPt;
var mue = torqueRatioStallPt - c * Math.Pow(nue, 0.5); var mue = torqueRatioStallPt - c * Math.Pow(nue, 0.5);
pt[colSpeedRatio] = Math.Round(nue, 4, MidpointRounding.AwayFromZero); pt[colSpeedRatio] = Math.Round(nue, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
pt[colTqRatio] = Math.Round(mue, 2, MidpointRounding.AwayFromZero); pt[colTqRatio] = Math.Round(mue, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
pt[colRefTq] = Math.Round( pt[colRefTq] = Math.Round(
refTorqueStallPt + (refTorqueIntermediatePt - refTorqueStallPt) / speedRatioIntermediatePt * refTorqueStallPt + (refTorqueIntermediatePt - refTorqueStallPt) / speedRatioIntermediatePt *
nue, 2, nue, 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(pt); retVal.Rows.Add(pt);
} }
// intermediate point // intermediate point
var intermediatePt = retVal.NewRow(); 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, intermediatePt[colTqRatio] = Math.Round(torqueRatioStallPt - c * Math.Pow(speedRatioIntermediatePt, 0.5), 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
intermediatePt[colRefTq] = Math.Round(refTorqueIntermediatePt, 2, intermediatePt[colRefTq] = Math.Round(refTorqueIntermediatePt, 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(intermediatePt); retVal.Rows.Add(intermediatePt);
for (var i = speedRatioIntermediatePtFactor + nue_step; i.IsSmaller(speedRatioCouplingPtFactor, nue_step/10); i += nue_step) for (var i = speedRatioIntermediatePtFactor + nue_step; i.IsSmaller(speedRatioCouplingPtFactor, nue_step/10); i += nue_step)
...@@ -191,30 +191,30 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -191,30 +191,30 @@ namespace TUGraz.VectoCore.Models.Declaration
var pt = retVal.NewRow(); var pt = retVal.NewRow();
var nue = i * speedRatioOverrunPt; var nue = i * speedRatioOverrunPt;
var mue = torqueRatioStallPt - c * Math.Pow(nue, 0.5); var mue = torqueRatioStallPt - c * Math.Pow(nue, 0.5);
pt[colSpeedRatio] = Math.Round(nue, 4, MidpointRounding.AwayFromZero); pt[colSpeedRatio] = Math.Round(nue, 4, MidpointRounding.AwayFromZero).ToXMLFormat(6);
pt[colTqRatio] = Math.Round(mue, 2, MidpointRounding.AwayFromZero); pt[colTqRatio] = Math.Round(mue, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
pt[colRefTq] = Math.Round( pt[colRefTq] = Math.Round(
refTorqueIntermediatePt + (refTorqueCouplingPt - refTorqueIntermediatePt) / (speedRatioCouplingPt - speedRatioIntermediatePt ) * refTorqueIntermediatePt + (refTorqueCouplingPt - refTorqueIntermediatePt) / (speedRatioCouplingPt - speedRatioIntermediatePt ) *
(nue - speedRatioIntermediatePt), 2, (nue - speedRatioIntermediatePt), 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(pt); retVal.Rows.Add(pt);
} }
//coupling point //coupling point
var couplingPt = retVal.NewRow(); 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, couplingPt[colTqRatio] = Math.Round(torqueRatioStallPt - c * Math.Pow(speedRatioCouplingPt, 0.5), 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
couplingPt[colRefTq] = Math.Round(refTorqueCouplingPt, 2, MidpointRounding.AwayFromZero); couplingPt[colRefTq] = Math.Round(refTorqueCouplingPt, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(couplingPt); retVal.Rows.Add(couplingPt);
// overrun point // overrun point
var overrunPt = retVal.NewRow(); 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, overrunPt[colTqRatio] = Math.Round(torqueRatioOverrunPt / speedRatioOverrunPt / ratio, 2,
MidpointRounding.AwayFromZero); MidpointRounding.AwayFromZero).ToXMLFormat(6);
overrunPt[colRefTq] = overrunPt[colRefTq] =
Math.Round(refTorqueStallPt * refTorqueOverrunPtFactor, 2, MidpointRounding.AwayFromZero); Math.Round(refTorqueStallPt * refTorqueOverrunPtFactor, 2, MidpointRounding.AwayFromZero).ToXMLFormat(6);
retVal.Rows.Add(overrunPt); retVal.Rows.Add(overrunPt);
return retVal; return retVal;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment