Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

renaming columns in segment table

parent 8d818583
Branches
Tags
No related merge requests found
......@@ -92,11 +92,11 @@ namespace TUGraz.VectoCore.Models.Declaration
var segment = new Segment {
Found = true,
GrossVehicleWeightMin = row.ParseDouble("gvw_min").SI(Unit.SI.Ton).Cast<Kilogram>(),
GrossVehicleWeightMax = row.ParseDouble("gvw_max").SI(Unit.SI.Ton).Cast<Kilogram>(),
GrossVehicleWeightMin = row.ParseDouble("tpmlm_min").SI(Unit.SI.Ton).Cast<Kilogram>(),
GrossVehicleWeightMax = row.ParseDouble("tpmlm_max").SI(Unit.SI.Ton).Cast<Kilogram>(),
VehicleCategory = vehicleCategory,
AxleConfiguration = axleConfiguration,
VehicleClass = VehicleClassHelper.Parse(row.Field<string>("hdvclass")),
VehicleClass = VehicleClassHelper.Parse(row.Field<string>("hdvgroup")),
AccelerationFile =
RessourceHelper.ReadStream(DeclarationData.DeclarationDataResourcePrefix + ".VACC." +
row.Field<string>(".vaccfile")),
......@@ -126,8 +126,8 @@ namespace TUGraz.VectoCore.Models.Declaration
var isVocational = r.Field<string>("vocational").ToBoolean();
var category = r.Field<string>("vehiclecategory");
var axleConf = r.Field<string>("axleconf.");
var massMin = r.ParseDouble("gvw_min").SI(Unit.SI.Ton);
var massMax = r.ParseDouble("gvw_max").SI(Unit.SI.Ton);
var massMin = r.ParseDouble("tpmlm_min").SI(Unit.SI.Ton);
var massMax = r.ParseDouble("tpmlm_max").SI(Unit.SI.Ton);
return (considerInvalid || isValid == "1")
&& vocational == isVocational
&& category == vehicleCategory.ToString()
......@@ -150,14 +150,14 @@ namespace TUGraz.VectoCore.Models.Declaration
var row = GetSegmentDataRow(vehicleCategory, axleConfiguration, grossVehicleMassRating, vocational, true);
var vehicleHeight = row.ParseDouble("height").SI<Meter>();
var vehicleClass = VehicleClassHelper.Parse(row.Field<string>("hdvclass"));
var vehicleClass = VehicleClassHelper.Parse(row.Field<string>("hdvgroup"));
if (vehicleClass == VehicleClass.Class9) {
// VECTO-471: for class 9 take similar height than rigid with same maximum gross vehicle weight (class 1, 2, 3 or 4).
var rigidGVWrow = _segmentTable.AsEnumerable().FirstOrDefault(r => {
var massMin = r.ParseDouble("gvw_min").SI(Unit.SI.Ton);
var massMax = r.ParseDouble("gvw_max").SI(Unit.SI.Ton);
return new[] { "1", "2", "3", "4" }.Contains(r.Field<string>("hdvclass"))
var massMin = r.ParseDouble("tpmlm_min").SI(Unit.SI.Ton);
var massMax = r.ParseDouble("tpmlm_max").SI(Unit.SI.Ton);
return new[] { "1", "2", "3", "4" }.Contains(r.Field<string>("hdvgroup"))
&& massMin <= grossVehicleMassRating && grossVehicleMassRating <= massMax;
});
if (rigidGVWrow != null) {
......
HDV class , Vocational , Valid , Vehicle Category , Axle Conf. , GVW_Min , GVW_Max , Height , DesignSpeed , Body , Body Construction , Trailer , Trailer Construction , EMS , .vacc file , Cross Wind Correction - Long haul , Cross Wind Correction - EMS , Cross Wind Correction - Other , Truck Axles - Long haul , Truck Axles - Other , Trailer Axles - Long haul , Trailer Axles - Other , Truck Axles - Long haul EMS , Truck Axles - Other EMS , Trailer Axles - Long haul EMS , Trailer Axles - Other EMS , Long haul , Long haul EMS , Regional delivery , Regional delivery EMS , Urban delivery , Municipal utility , Construction , Heavy Urban , Urban , Suburban , Interurban , Coach , CdxA_Default , CdxA_Construction , BodyWeight_MunicipalUtility
HDV group , Vocational , Valid , Vehicle Category , Axle Conf. , TPMLM_Min , TPMLM_Max , Height , DesignSpeed , Body , Body Construction , Trailer , Trailer Construction , EMS , .vacc file , Cross Wind Correction - Long haul , Cross Wind Correction - EMS , Cross Wind Correction - Other , Truck Axles - Long haul , Truck Axles - Other , Trailer Axles - Long haul , Trailer Axles - Other , Truck Axles - Long haul EMS , Truck Axles - Other EMS , Trailer Axles - Long haul EMS , Trailer Axles - Other EMS , Long haul , Long haul EMS , Regional delivery , Regional delivery EMS , Urban delivery , Municipal utility , Construction , Heavy Urban , Urban , Suburban , Interurban , Coach , CdxA_Default , CdxA_Construction , BodyWeight_MunicipalUtility
## 0 , 0 , 0 , RigidTruck , 4x2 , 0 , 7.5 , 4 , 85 , , , , , , Truck.vacc , , , RigidSolo , , , , , , , , , - , , pc10(R)/pc50(R) , , pc10(R)/pc50(R) , - , - , - , - , - , - , - , , ,
1 , 0 , 1 , RigidTruck , 4x2 , 7.5 , 10 , 3.6 , 85 , B1 , , , , , Truck.vacc , , , RigidSolo , , 45/55 , , , , , , , - , - , pc10(R)/pc50(R) , - , pc10(R)/pc50(R) , - , - , - , - , - , - , - , 7.1 , ,
1 , 0 , 1 , Tractor , 4x2 , 7.5 , 10 , 3.6 , 85 , B1 , , , , , Truck.vacc , , , RigidSolo , , 45/55 , , , , , , , - , - , pc10(R)/pc50(R) , - , pc10(R)/pc50(R) , - , - , - , - , - , - , - , 7.1 , ,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment