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

introduce new field with CdxA from input. required to write correct CdxA value to MRF

parent 120bfda2
No related branches found
No related tags found
No related merge requests found
......@@ -502,6 +502,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var retVal = SetCommonAirdragData(airdragInputData);
retVal.DeclaredAirdragArea = mission.MissionType == MissionType.Construction ? mission.DefaultCDxA : airdragInputData.AirDragArea;
retVal.DeclaredAirdragAreaInput = airdragInputData.AirDragArea;
var aerodynamicDragArea = retVal.DeclaredAirdragArea + mission.Trailer.Sum(t => t.DeltaCdA).DefaultIfNull(0);
......@@ -519,6 +520,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
return new AirdragData() {
CertificationMethod = CertificationMethod.StandardValues,
DeclaredAirdragArea = mission.DefaultCDxA,
DeclaredAirdragAreaInput = mission.DefaultCDxA,
CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(aerodynamicDragArea,
GetDeclarationAirResistanceCurve(mission.CrossWindCorrectionParameters, aerodynamicDragArea, segment.VehicleHeight),
CrossWindCorrectionMode.DeclarationModeCorrection)
......
......@@ -53,6 +53,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
public SquareMeter DeclaredAirdragArea { get; internal set; }
public SquareMeter DeclaredAirdragAreaInput { get; internal set; }
// ReSharper disable once UnusedMember.Global -- used via Validation
public static ValidationResult ValidateAirDragData(AirdragData airDragData, ValidationContext validationContext)
{
......
......@@ -237,7 +237,7 @@ namespace TUGraz.VectoCore.OutputData.XML
if (airdragData.CertificationMethod == CertificationMethod.StandardValues) {
return new XElement(tns + XMLNames.Component_AirDrag,
new XElement(tns + XMLNames.Report_Component_CertificationMethod, airdragData.CertificationMethod.ToXMLFormat()),
new XElement(tns + XMLNames.Report_AirDrag_CdxA, airdragData.DeclaredAirdragArea.ToXMLFormat(2))
new XElement(tns + XMLNames.Report_AirDrag_CdxA, airdragData.DeclaredAirdragAreaInput.ToXMLFormat(2))
);
}
return new XElement(tns + XMLNames.Component_AirDrag,
......@@ -245,7 +245,7 @@ namespace TUGraz.VectoCore.OutputData.XML
new XElement(tns + XMLNames.Report_Component_CertificationMethod, airdragData.CertificationMethod.ToXMLFormat()),
new XElement(tns + XMLNames.Report_Component_CertificationNumber, airdragData.CertificationNumber),
new XElement(tns + XMLNames.DI_Signature_Reference_DigestValue, airdragData.DigestValueInput),
new XElement(tns + XMLNames.Report_AirDrag_CdxA, airdragData.DeclaredAirdragArea.ToXMLFormat(2))
new XElement(tns + XMLNames.Report_AirDrag_CdxA, airdragData.DeclaredAirdragAreaInput.ToXMLFormat(2))
);
}
......
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