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 59d52428 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

renamed property names (full named, no appreviations)

parent 80670227
No related branches found
No related tags found
No related merge requests found
......@@ -19,9 +19,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
{
private class FullLoadCurveEntry
{
public double n { get; set; }
public double Mfull { get; set; }
public double Mdrag { get; set; }
public double EngineSpeed { get; set; }
public double TorqueFullLoad { get; set; }
public double TorqueDrag { get; set; }
public double PT1 { get; set; }
}
......@@ -37,9 +37,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
foreach (DataRow row in data.Rows)
{
var entry = new FullLoadCurveEntry();
entry.n = row.GetDouble("n");
entry.Mfull = row.GetDouble("Mfull");
entry.Mdrag = row.GetDouble("Mdrag");
entry.EngineSpeed = row.GetDouble("n");
entry.TorqueFullLoad = row.GetDouble("Mfull");
entry.TorqueDrag = row.GetDouble("Mdrag");
entry.PT1 = row.GetDouble("PT1");
fullLoadCurve.entries.Add(entry);
}
......
......@@ -24,21 +24,21 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
/// <summary>
/// Engine Speed
/// </summary>
public double n { get; set; }
public double EngineSpeed { get; set; }
/// <summary>
/// Torque
/// </summary>
/// <remarks>Column "Me" in data file.</remarks>
public double T { get; set; }
public double Torque { get; set; }
/// <summary>
/// Engine power
/// </summary>
public double Pe
public double PowerEngine
{
get { return 2.0 * Math.PI / 60.0 * T * n; }
set { T = 60.0 / (2.0 * Math.PI) * value / n; }
get { return 2.0 * Math.PI / 60.0 * Torque * EngineSpeed; }
set { Torque = 60.0 / (2.0 * Math.PI) * value / EngineSpeed; }
}
/// <summary>
......@@ -56,12 +56,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
foreach (DataRow row in data.Rows)
{
var cycle = new EngineOnlyDrivingCycle();
cycle.n = row.GetDouble("n");
cycle.EngineSpeed = row.GetDouble("n");
if (data.Columns.Contains("Pe"))
cycle.Pe = row.GetDouble("Pe");
cycle.PowerEngine = row.GetDouble("Pe");
else
cycle.T = row.GetDouble("Me");
cycle.Torque = row.GetDouble("Me");
if (data.Columns.Contains("Padd"))
cycle.Padd = row.GetDouble("Padd");
......
......@@ -94,7 +94,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
foreach (var cycle in data)
{
port.Request(absTime, dt, cycle.T, cycle.n);
port.Request(absTime, dt, cycle.Torque, cycle.EngineSpeed);
engine.CommitSimulationStep(dataWriter);
absTime += dt;
......
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