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

read pto cycle, const bool for allowAux (resharper hint)

parent 93812ada
Branches
Tags
No related merge requests found
...@@ -315,6 +315,7 @@ namespace TUGraz.VectoCore.InputData.Reader ...@@ -315,6 +315,7 @@ namespace TUGraz.VectoCore.InputData.Reader
public const string WindYawAngle = "vair_beta"; public const string WindYawAngle = "vair_beta";
public const string EnginePower = "Pe"; public const string EnginePower = "Pe";
public const string EngineTorque = "Me"; public const string EngineTorque = "Me";
public const string PTOActive = "PTO";
} }
#region DataParser #region DataParser
...@@ -398,7 +399,8 @@ namespace TUGraz.VectoCore.InputData.Reader ...@@ -398,7 +399,8 @@ namespace TUGraz.VectoCore.InputData.Reader
AirSpeedRelativeToVehicle = AirSpeedRelativeToVehicle =
crossWindRequired ? row.ParseDouble(Fields.AirSpeedRelativeToVehicle).KMPHtoMeterPerSecond() : null, crossWindRequired ? row.ParseDouble(Fields.AirSpeedRelativeToVehicle).KMPHtoMeterPerSecond() : null,
WindYawAngle = crossWindRequired ? row.ParseDoubleOrGetDefault(Fields.WindYawAngle) : 0, WindYawAngle = crossWindRequired ? row.ParseDoubleOrGetDefault(Fields.WindYawAngle) : 0,
AuxiliarySupplyPower = row.GetAuxiliaries() AuxiliarySupplyPower = row.GetAuxiliaries(),
PTOActive = table.Columns.Contains(Fields.PTOActive) && row.Field<char>(Fields.PTOActive) == '1'
}); });
} }
...@@ -417,10 +419,11 @@ namespace TUGraz.VectoCore.InputData.Reader ...@@ -417,10 +419,11 @@ namespace TUGraz.VectoCore.InputData.Reader
Fields.AdditionalAuxPowerDemand, Fields.AdditionalAuxPowerDemand,
Fields.RoadGradient, Fields.RoadGradient,
Fields.AirSpeedRelativeToVehicle, Fields.AirSpeedRelativeToVehicle,
Fields.WindYawAngle Fields.WindYawAngle,
Fields.PTOActive
}; };
var allowAux = true; const bool allowAux = true;
return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux) && return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux) &&
CheckComboColumns(header, new[] { Fields.AirSpeedRelativeToVehicle, Fields.WindYawAngle }, throwExceptions); CheckComboColumns(header, new[] { Fields.AirSpeedRelativeToVehicle, Fields.WindYawAngle }, throwExceptions);
...@@ -481,7 +484,7 @@ namespace TUGraz.VectoCore.InputData.Reader ...@@ -481,7 +484,7 @@ namespace TUGraz.VectoCore.InputData.Reader
Fields.AdditionalAuxPowerDemand Fields.AdditionalAuxPowerDemand
}; };
var allowAux = false; const bool allowAux = false;
if (!CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux)) { if (!CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux)) {
return false; return false;
...@@ -543,9 +546,7 @@ namespace TUGraz.VectoCore.InputData.Reader ...@@ -543,9 +546,7 @@ namespace TUGraz.VectoCore.InputData.Reader
Fields.AdditionalAuxPowerDemand Fields.AdditionalAuxPowerDemand
}; };
var allowAux = false; return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux: false);
return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux);
} }
} }
...@@ -589,7 +590,7 @@ namespace TUGraz.VectoCore.InputData.Reader ...@@ -589,7 +590,7 @@ namespace TUGraz.VectoCore.InputData.Reader
Fields.WindYawAngle Fields.WindYawAngle
}; };
var allowAux = true; const bool allowAux = true;
return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux) && return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux) &&
CheckComboColumns(header, new[] { Fields.AirSpeedRelativeToVehicle, Fields.WindYawAngle }, throwExceptions); CheckComboColumns(header, new[] { Fields.AirSpeedRelativeToVehicle, Fields.WindYawAngle }, throwExceptions);
...@@ -641,7 +642,7 @@ namespace TUGraz.VectoCore.InputData.Reader ...@@ -641,7 +642,7 @@ namespace TUGraz.VectoCore.InputData.Reader
Fields.WindYawAngle Fields.WindYawAngle
}; };
var allowAux = true; const bool allowAux = true;
return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux) && return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux) &&
CheckComboColumns(header, new[] { Fields.AirSpeedRelativeToVehicle, Fields.WindYawAngle }, throwExceptions); CheckComboColumns(header, new[] { Fields.AirSpeedRelativeToVehicle, Fields.WindYawAngle }, throwExceptions);
...@@ -680,7 +681,7 @@ namespace TUGraz.VectoCore.InputData.Reader ...@@ -680,7 +681,7 @@ namespace TUGraz.VectoCore.InputData.Reader
Fields.PTOTorque Fields.PTOTorque
}; };
var allowAux = false; const bool allowAux = false;
return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux); return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment