diff --git a/VectoCore/VectoCore/OutputData/XML/XMLFullReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLFullReport.cs index 2dc022a0de6aefedd23278404165c24ac7b09dd1..e1706b0b50ec110af1abc5b57d8538d22dfb80bf 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLFullReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLFullReport.cs @@ -90,8 +90,8 @@ namespace TUGraz.VectoCore.OutputData.XML GetAirDragDescription(modelData.AirdragData), GetAxleWheelsDescription(modelData.VehicleData), GetAuxiliariesDescription(modelData.Aux) - ) - ); + ) + ); InputDataIntegrity = new XElement(tns + "InputDataSignature", modelData.InputDataHash == null ? CreateDummySig() : new XElement(modelData.InputDataHash)); } @@ -102,7 +102,7 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(di + XMLNames.DI_Signature_Reference_DigestMethod, new XAttribute(XMLNames.DI_Signature_Algorithm_Attr, "null")), new XElement(di + XMLNames.DI_Signature_Reference_DigestValue, "NOT AVAILABLE") - ); + ); } private XElement GetTorqueLimits(CombustionEngineData modelData) @@ -133,7 +133,7 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + XMLNames.Engine_Displacement, engineData.Displacement.ConvertTo().Cubic.Centi.Meter.ToXMLFormat(0)), new XElement(tns + XMLNames.Engine_FuelType, engineData.FuelType.ToXMLFormat()) - ); + ); } private XElement GetGearboxDescription(GearboxData gearboxData) @@ -143,7 +143,7 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + XMLNames.Gearbox_TransmissionType, gearboxData.Type.ToXMLFormat()), new XElement(tns + "GearsCount", gearboxData.Gears.Count), new XElement(tns + "TransmissionRatioFinalGear", gearboxData.Gears.Last().Value.Ratio.ToXMLFormat(3)) - ); + ); } private XElement GetTorqueConverterDescription(TorqueConverterData torqueConverterData) @@ -186,7 +186,7 @@ namespace TUGraz.VectoCore.OutputData.XML return new XElement(tns + XMLNames.Component_AirDrag, new XElement(tns + "CertificationMethod", airdragData.CertificationMethod.ToXMLFormat()), new XElement(tns + "CdxA", airdragData.DeclaredAirdragArea.ToXMLFormat(2)) - ); + ); } return new XElement(tns + XMLNames.Component_AirDrag, new XElement(tns + XMLNames.Component_Model, airdragData.ModelName), @@ -194,7 +194,7 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + "CertificationNumber", airdragData.CertificationNumber), new XElement(tns + XMLNames.DI_Signature_Reference_DigestValue, airdragData.DigestValueInput), new XElement(tns + "CdxA", airdragData.DeclaredAirdragArea.ToXMLFormat(2)) - ); + ); } private XElement GetAxleWheelsDescription(VehicleData vehicleData) @@ -302,16 +302,16 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + "TotalVehicleMass", new XAttribute("unit", "kg"), result.TotalVehicleWeight.ToXMLFormat(0)), new XElement(tns + "Payload", new XAttribute("unit", "kg"), result.Payload.ToXMLFormat(0)), new XElement(tns + "FuelType", result.FuelType.ToXMLFormat()) - ), + ), new XElement(tns + "VehiclePerformance", new XElement(tns + "AverageSpeed", new XAttribute("unit", "km/h"), result.AverageSpeed.AsKmph.ToXMLFormat(1)), new XElement(tns + "MinSpeed", new XAttribute("unit", "km/h"), result.MinSpeed.AsKmph.ToXMLFormat(1)), new XElement(tns + "MaxSpeed", new XAttribute("unit", "km/h"), result.MaxSpeed.AsKmph.ToXMLFormat(1)), new XElement(tns + "MaxDeceleration", new XAttribute("unit", "m/s²"), result.MaxDeceleration.ToXMLFormat(2)), new XElement(tns + "MaxAcceleration", new XAttribute("unit", "m/s²"), result.MaxAcceleration.ToXMLFormat(2)), - new XElement(tns + "FullLoadDrivingtimePercentage", result.FullLoadPercentage.ToXMLFormat(0)), + new XElement(tns + "FullLoadDrivingtimePercentage", result.FullLoadPercentage.ToXMLFormat(2)), new XElement(tns + "GearshiftCount", result.GearshiftCount.ToXMLFormat(0)) - ), + ), //FC XMLDeclarationReport.GetResults(result, tns, true).Cast<object>().ToArray() }; @@ -334,18 +334,18 @@ namespace TUGraz.VectoCore.OutputData.XML var vehicle = new XElement(VehiclePart); vehicle.Add(InputDataIntegrity); retVal.Add(new XElement(tns + "VectoOutput", - new XAttribute("schemaVersion", "0.4"), - new XAttribute(XNamespace.Xmlns + "xsi", xsi.NamespaceName), - new XAttribute("xmlns", tns), - new XAttribute(XNamespace.Xmlns + "di", di), - new XAttribute(xsi + "schemaLocation", - string.Format("{0} {1}VectoOutput.xsd", tns, AbstractXMLWriter.SchemaLocationBaseUrl)), - new XElement(tns + "Data", - vehicle, - results, - GetApplicationInfo()) + new XAttribute("schemaVersion", "0.4"), + new XAttribute(XNamespace.Xmlns + "xsi", xsi.NamespaceName), + new XAttribute("xmlns", tns), + new XAttribute(XNamespace.Xmlns + "di", di), + new XAttribute(xsi + "schemaLocation", + string.Format("{0} {1}VectoOutput.xsd", tns, AbstractXMLWriter.SchemaLocationBaseUrl)), + new XElement(tns + "Data", + vehicle, + results, + GetApplicationInfo()) ) - ); + ); var stream = new MemoryStream(); var writer = new StreamWriter(stream); writer.Write(retVal);