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

Skip to content
Snippets Groups Projects
Commit 4f471f56 authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

allow reading declaration cycles from file system for buses as well

parent c5f2376d
No related branches found
No related tags found
No related merge requests found
......@@ -115,11 +115,15 @@ namespace TUGraz.VectoCore.Models.Declaration
var mission = new Mission {
MissionType = missionType,
CrossWindCorrectionParameters = row.Field<string>("crosswindcorrection"),
#if USE_EXTENAL_DECLARATION_DATA
CycleFile = File.OpenRead(Path.Combine("DeclarationMissions", missionType.ToString().Replace("EMS", "") + ".vdri")),
#else
CycleFile =
RessourceHelper.ReadStream(
DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." +
missionType.ToString().Replace("EMS", "") +
Constants.FileExtensions.CycleFile),
#endif
AxleWeightDistribution = GetAxleWeightDistribution(row),
BodyCurbWeight = 0.SI<Kilogram>(),
Trailer = new List<MissionTrailer>(),
......
......@@ -95,11 +95,14 @@ namespace TUGraz.VectoCore.Models.Declaration
var mission = new Mission {
MissionType = missionType,
CrossWindCorrectionParameters = row.Field<string>("crosswindcorrection"),
CycleFile =
RessourceHelper.ReadStream(
#if USE_EXTENAL_DECLARATION_DATA
CycleFile = File.OpenRead(Path.Combine("DeclarationMissions", missionType.ToString().Replace("EMS", "") + ".vdri")),
#else
CycleFile = RessourceHelper.ReadStream(
DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." +
missionType.ToString().Replace("EMS", "") +
Constants.FileExtensions.CycleFile),
#endif
AxleWeightDistribution = GetAxleWeightDistribution(row),
CurbMass = row.ParseDouble("curbmass").SI<Kilogram>(),
BodyCurbWeight = 0.SI<Kilogram>(),
......
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