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

Skip to content
Snippets Groups Projects
Commit 0ea97199 authored by Stefanos Doumpoulakis's avatar Stefanos Doumpoulakis
Browse files

added fan diameter to report

parent 43b9d38c
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
protected RetarderData RetarderData;
protected PTOData PTOTransmissionData;
protected List<VectoRunData.AuxData> AuxVTP;
protected AuxFanData AuxFanData;
protected Segment Segment;
protected bool allowVocational;
protected DeclarationDataAdapter Dao;
......@@ -106,6 +107,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
Segment.Missions.First().MissionType,
Segment.VehicleClass,
JobInputData.Vehicle.Components.AxleWheels.NumSteeredAxles),
FanData = AuxFanData
};
powertrainConfig.VehicleData.VehicleClass = Segment.VehicleClass;
Report.InputDataHash = JobInputData.VectoJobHash;
......@@ -161,6 +163,11 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
GearboxData, AxlegearData.AxleGear.Ratio * (AngledriveData?.Angledrive.Ratio ?? 1.0), EngineData.IdleSpeed);
AuxVTP = CreateVTPAuxData(vehicle);
AuxFanData = new AuxFanData() {
FanDiameter = JobInputData.FanDiameter,
FanCoefficients = JobInputData.FanPowerCoefficents.ToArray()
};
}
#region Implementation of IVectoRunDataFactory
......
......@@ -480,7 +480,7 @@ namespace TUGraz.VectoCore.OutputData.XML
GetAxlegearDescription(modelData.AxleGearData),
GetAirDragDescription(modelData.AirdragData),
GetAxleWheelsDescription(modelData.VehicleData),
GetAuxiliariesDescription(modelData.Aux)
GetAuxiliariesDescription(modelData.Aux, modelData.FanData)
)
);
......@@ -751,7 +751,7 @@ namespace TUGraz.VectoCore.OutputData.XML
new XElement(tns + XMLNames.AxleWheels_Axles_Axle_TwinTyres, axle.TwinTyres));
}
private XElement GetAuxiliariesDescription(IEnumerable<VectoRunData.AuxData> aux)
private XElement GetAuxiliariesDescription(IEnumerable<VectoRunData.AuxData> aux, AuxFanData fanData)
{
var auxData = aux.ToDictionary(a => a.ID);
var auxList = new[] {
......@@ -765,6 +765,12 @@ namespace TUGraz.VectoCore.OutputData.XML
}
}
retVal.Add(new XElement(
tns + "FanDiameter",
new XAttribute(XMLNames.Report_Results_Unit_Attr, fanData.FanDiameter.ConvertToMilliMeter().Units),
fanData.FanDiameter.ConvertToMilliMeter().Value)
);
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