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

engineering data adapter: use default height in case no vehicle category is found

parent dccdf15e
No related branches found
No related tags found
No related merge requests found
......@@ -129,9 +129,11 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var airDragArea = airdragData.AirDragArea ??
DeclarationData.TruckSegments.LookupCdA(
data.VehicleCategory, data.AxleConfiguration, data.GrossVehicleMassRating, false);
var height = data.Height ?? DeclarationData.TruckSegments.LookupHeight(
data.VehicleCategory, data.AxleConfiguration,
data.GrossVehicleMassRating, false);
var height = data.Height ?? (data.VehicleCategory.IsTruck()
? DeclarationData.TruckSegments.LookupHeight(
data.VehicleCategory, data.AxleConfiguration,
data.GrossVehicleMassRating, false)
: 4.SI<Meter>());
retVal.CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(
airDragArea,
DeclarationDataAdapterHeavyLorry.GetDeclarationAirResistanceCurve(
......@@ -155,9 +157,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
return "MediumLorriesVan";
case VehicleCategory.RigidTruck: return numAxles > axles.NumAxles() ? "RigidTrailer" : "RigidSolo";
case VehicleCategory.Tractor: return "TractorSemitrailer";
//case VehicleCategory.CityBus:
case VehicleCategory.CityBus:
//case VehicleCategory.InterurbanBus:
//case VehicleCategory.Coach: return "CoachBus";
case VehicleCategory.Coach: return "CoachBus";
default: throw new ArgumentOutOfRangeException("vehicleCategory", vehicleCategory, null);
}
}
......
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