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 760e2c69 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

adding co2 per person-km to mrf/cif output

parent 2ff35e59
No related branches found
No related tags found
No related merge requests found
......@@ -444,7 +444,7 @@ namespace TUGraz.VectoCore.OutputData.XML
(result.FuelConsumptionFinal[fuel.FuelType] * fuel.LowerHeatingValueVecto /
result.Distance.ConvertToKiloMeter() / result.CargoVolume / 1e6).Value().ToMinSignificantDigits(3, 1)));
}
if (result.PassengerCount.HasValue && result.PassengerCount.Value > 0) {
if (result.PassengerCount.HasValue) {
fcResult.Add(
new XElement(
tns + XMLNames.Report_Results_FuelConsumption,
......@@ -508,7 +508,14 @@ namespace TUGraz.VectoCore.OutputData.XML
new XAttribute(XMLNames.Report_Results_Unit_Attr, "g/m³-km"),
(result.CO2Total.ConvertToGramm() / result.Distance.ConvertToKiloMeter() / result.CargoVolume).Value()
.ToMinSignificantDigits(3, 1)));
if (result.PassengerCount.HasValue && result.PassengerCount.Value > 0) {
retVal.Add(
new XElement(
tns + XMLNames.Report_Results_CO2,
new XAttribute(XMLNames.Report_Results_Unit_Attr, "g/p-km"),
(result.CO2Total.ConvertToGramm() / result.Distance.ConvertToKiloMeter() / result.PassengerCount.Value)
.ToMinSignificantDigits(3, 1)));
}
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