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

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

write shift polygons to file

parent 6db43fda
No related branches found
No related tags found
No related merge requests found
......@@ -412,9 +412,23 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
}
ShiftPolygonDrawer.DrawShiftPolygons(Path.GetDirectoryName(gearboxFile), fullLoadCurves, shiftPolygons,
"daimler_fullload_shiftpolygon-test_3.png",
"Generic_Class5-shiftlines.png",
DeclarationData.Gearbox.TruckMaxAllowedSpeed / rdyn * axlegearRatio * gearboxData.Gears.Last().Ratio, upshiftOrig,
downshiftTransformed, downshiftOrig);
var shiftLines = "";
var gear = 1;
foreach (var shiftPolygon in shiftPolygons) {
shiftLines += "Gear " + gear + "\n";
shiftLines += "Upshift\n";
foreach (var shiftPolygonEntry in shiftPolygon.Upshift) {
shiftLines += string.Format("{0} {1}\n", shiftPolygonEntry.AngularSpeed.AsRPM, shiftPolygonEntry.Torque.Value());
}
shiftLines += "Downshift\n";
foreach (var shiftPolygonEntry in shiftPolygon.Downshift) {
shiftLines += string.Format("{0} {1}\n", shiftPolygonEntry.AngularSpeed.AsRPM, shiftPolygonEntry.Torque.Value());
}
}
}
}
......
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