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

Skip to content
Snippets Groups Projects
Commit e1d95f01 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

bugfix: output in vsum file if no fueldensity is available

parent a9204e7f
No related branches found
No related tags found
No related merge requests found
......@@ -462,13 +462,15 @@ namespace TUGraz.VectoCore.OutputData
if (fcfinal != null) {
row[FCFINAL_KM] = fcfinal.ConvertTo().Gramm.Per.Kilo.Meter;
}
row[FCFINAL_LITERPER100KM] = modData.FuelConsumptionFinalLiterPer100Kilometer();
if (vehicleLoading != null && !vehicleLoading.IsEqual(0)) {
row[FCFINAL_LITERPER100TKM] = (modData.FuelConsumptionFinalLiterPer100Kilometer() ?? 0.SI()) /
var fcPer100lkm = modData.FuelConsumptionFinalLiterPer100Kilometer();
row[FCFINAL_LITERPER100KM] = fcPer100lkm;
if (vehicleLoading != null && !vehicleLoading.IsEqual(0) && fcPer100lkm != null) {
row[FCFINAL_LITERPER100TKM] = fcPer100lkm /
vehicleLoading.ConvertTo().Ton;
}
if (cargoVolume > 0) {
row[FCFINAL_LiterPer100M3KM] = (modData.FuelConsumptionFinalLiterPer100Kilometer() ?? 0.SI()) / cargoVolume;
if (cargoVolume > 0 && fcPer100lkm != null) {
row[FCFINAL_LiterPer100M3KM] = fcPer100lkm / cargoVolume;
}
var kilogramPerMeter = modData.CO2PerMeter();
......
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