diff --git a/CHANGES.md b/CHANGES.md index 7a24374e865ff5b5ac376f3f91b9dcfca591cebb..6f3db143112e5fb7e118133d7d495644b53a12e4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,20 @@ TODO * Traction interruption: No engine rev down - hold rpm until new gear engaged (Allison) +### VECTO 2.2 +* Bugfix: Error in Declaration Mode Pneumatic System aux power calculation ([kW] were interpreted as [W]) +* Bugfix: Error in Declaration Mode Electric System aux power calculation +* Moved gear-specific Full Load Curves to Gearbox File +* Combined Drag Coefficient * Cross Sectional Area in one input parameter +* Updated .vgbx file format (Added gear-specific Full Load Curves) +* Updated .veng file format (Removed gear-specific Full Load Curves) +* Updated .vveh file format (Combined Drag Coefficient * Cross Sectional Area in one parameter) +* Updated Generic Vehicles (new file formats) +* Removed WHTC Correction Factor Calculation. Now in external tool, VECTO-Engine. +* Test Options are now only available in Engineering Mode +* Gearbox Editor now shows generic and user-defined shift polygons (if available) +* Various small updates in GUI + ### VECTO 2.1.4 * Bugfixes in start gear and (A)MT shift model * Updated Coach .vcdv file for higher speeds to avoid extrapolation diff --git a/VECTO/GUI/F_VEH.Designer.vb b/VECTO/GUI/F_VEH.Designer.vb index acd224f9e5cd33071ef2f3d4d1e659f9aa5b955f..5bb0ac467d9c9bec06bd208b53560b576dc0dcb0 100644 --- a/VECTO/GUI/F_VEH.Designer.vb +++ b/VECTO/GUI/F_VEH.Designer.vb @@ -39,9 +39,7 @@ Partial Class F_VEH Me.Label2 = New System.Windows.Forms.Label() Me.TbLoad = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() - Me.TBcdTrTr = New System.Windows.Forms.TextBox() - Me.Label4 = New System.Windows.Forms.Label() - Me.TBAquersTrTr = New System.Windows.Forms.TextBox() + Me.TBcdA = New System.Windows.Forms.TextBox() Me.Label13 = New System.Windows.Forms.Label() Me.TBrdyn = New System.Windows.Forms.TextBox() Me.ButOK = New System.Windows.Forms.Button() @@ -49,8 +47,6 @@ Partial Class F_VEH Me.Label14 = New System.Windows.Forms.Label() Me.Label31 = New System.Windows.Forms.Label() Me.Label35 = New System.Windows.Forms.Label() - Me.Label37 = New System.Windows.Forms.Label() - Me.Label38 = New System.Windows.Forms.Label() Me.CbCdMode = New System.Windows.Forms.ComboBox() Me.TbCdFile = New System.Windows.Forms.TextBox() Me.BtCdFileBrowse = New System.Windows.Forms.Button() @@ -111,8 +107,7 @@ Partial Class F_VEH Me.LbCdATr = New System.Windows.Forms.Label() Me.PnCdARig = New System.Windows.Forms.Panel() Me.LbCdARig = New System.Windows.Forms.Label() - Me.TBcwRig = New System.Windows.Forms.TextBox() - Me.TBAquersRig = New System.Windows.Forms.TextBox() + Me.TBcdA2 = New System.Windows.Forms.TextBox() Me.PictureBox1 = New System.Windows.Forms.PictureBox() Me.CmOpenFile = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() @@ -120,6 +115,7 @@ Partial Class F_VEH Me.PnAll = New System.Windows.Forms.Panel() Me.PicVehicle = New System.Windows.Forms.PictureBox() Me.Label8 = New System.Windows.Forms.Label() + Me.Label38 = New System.Windows.Forms.Label() Me.GroupBox6.SuspendLayout() Me.ToolStrip1.SuspendLayout() Me.GroupBox7.SuspendLayout() @@ -173,38 +169,20 @@ Partial Class F_VEH 'Label3 ' Me.Label3.AutoSize = True - Me.Label3.Location = New System.Drawing.Point(37, 55) + Me.Label3.Location = New System.Drawing.Point(36, 52) Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(58, 13) + Me.Label3.Size = New System.Drawing.Size(37, 13) Me.Label3.TabIndex = 8 - Me.Label3.Text = "Drag Coef." - ' - 'TBcdTrTr - ' - Me.TBcdTrTr.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TBcdTrTr.Location = New System.Drawing.Point(2, 24) - Me.TBcdTrTr.Name = "TBcdTrTr" - Me.TBcdTrTr.Size = New System.Drawing.Size(57, 20) - Me.TBcdTrTr.TabIndex = 0 - ' - 'Label4 - ' - Me.Label4.AutoSize = True - Me.Label4.Location = New System.Drawing.Point(12, 81) - Me.Label4.Name = "Label4" - Me.Label4.Size = New System.Drawing.Size(83, 13) - Me.Label4.TabIndex = 10 - Me.Label4.Text = "Cross Sec. Area" + Me.Label3.Text = "cd x A" ' - 'TBAquersTrTr + 'TBcdA ' - Me.TBAquersTrTr.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Me.TBcdA.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TBAquersTrTr.Location = New System.Drawing.Point(2, 50) - Me.TBAquersTrTr.Name = "TBAquersTrTr" - Me.TBAquersTrTr.Size = New System.Drawing.Size(57, 20) - Me.TBAquersTrTr.TabIndex = 1 + Me.TBcdA.Location = New System.Drawing.Point(2, 24) + Me.TBcdA.Name = "TBcdA" + Me.TBcdA.Size = New System.Drawing.Size(57, 20) + Me.TBcdA.TabIndex = 0 ' 'Label13 ' @@ -270,24 +248,6 @@ Partial Class F_VEH Me.Label35.TabIndex = 24 Me.Label35.Text = "[mm]" ' - 'Label37 - ' - Me.Label37.AutoSize = True - Me.Label37.Location = New System.Drawing.Point(230, 53) - Me.Label37.Name = "Label37" - Me.Label37.Size = New System.Drawing.Size(16, 13) - Me.Label37.TabIndex = 24 - Me.Label37.Text = "[-]" - ' - 'Label38 - ' - Me.Label38.AutoSize = True - Me.Label38.Location = New System.Drawing.Point(230, 79) - Me.Label38.Name = "Label38" - Me.Label38.Size = New System.Drawing.Size(24, 13) - Me.Label38.TabIndex = 24 - Me.Label38.Text = "[m²]" - ' 'CbCdMode ' Me.CbCdMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList @@ -796,8 +756,6 @@ Partial Class F_VEH Me.GrAirRes.Controls.Add(Me.PnCdATrTr) Me.GrAirRes.Controls.Add(Me.PnCdARig) Me.GrAirRes.Controls.Add(Me.Label3) - Me.GrAirRes.Controls.Add(Me.Label4) - Me.GrAirRes.Controls.Add(Me.Label37) Me.GrAirRes.Controls.Add(Me.Label38) Me.GrAirRes.Location = New System.Drawing.Point(278, 3) Me.GrAirRes.Name = "GrAirRes" @@ -809,9 +767,8 @@ Partial Class F_VEH 'PnCdATrTr ' Me.PnCdATrTr.Controls.Add(Me.LbCdATr) - Me.PnCdATrTr.Controls.Add(Me.TBcdTrTr) - Me.PnCdATrTr.Controls.Add(Me.TBAquersTrTr) - Me.PnCdATrTr.Location = New System.Drawing.Point(97, 26) + Me.PnCdATrTr.Controls.Add(Me.TBcdA) + Me.PnCdATrTr.Location = New System.Drawing.Point(79, 25) Me.PnCdATrTr.Name = "PnCdATrTr" Me.PnCdATrTr.Size = New System.Drawing.Size(64, 78) Me.PnCdATrTr.TabIndex = 27 @@ -828,9 +785,8 @@ Partial Class F_VEH 'PnCdARig ' Me.PnCdARig.Controls.Add(Me.LbCdARig) - Me.PnCdARig.Controls.Add(Me.TBcwRig) - Me.PnCdARig.Controls.Add(Me.TBAquersRig) - Me.PnCdARig.Location = New System.Drawing.Point(164, 26) + Me.PnCdARig.Controls.Add(Me.TBcdA2) + Me.PnCdARig.Location = New System.Drawing.Point(146, 25) Me.PnCdARig.Name = "PnCdARig" Me.PnCdARig.Size = New System.Drawing.Size(64, 78) Me.PnCdARig.TabIndex = 26 @@ -844,19 +800,12 @@ Partial Class F_VEH Me.LbCdARig.TabIndex = 25 Me.LbCdARig.Text = "Rigid" ' - 'TBcwRig - ' - Me.TBcwRig.Location = New System.Drawing.Point(3, 24) - Me.TBcwRig.Name = "TBcwRig" - Me.TBcwRig.Size = New System.Drawing.Size(57, 20) - Me.TBcwRig.TabIndex = 0 + 'TBcdA2 ' - 'TBAquersRig - ' - Me.TBAquersRig.Location = New System.Drawing.Point(3, 50) - Me.TBAquersRig.Name = "TBAquersRig" - Me.TBAquersRig.Size = New System.Drawing.Size(57, 20) - Me.TBAquersRig.TabIndex = 1 + Me.TBcdA2.Location = New System.Drawing.Point(3, 24) + Me.TBcdA2.Name = "TBcdA2" + Me.TBcdA2.Size = New System.Drawing.Size(57, 20) + Me.TBcdA2.TabIndex = 0 ' 'PictureBox1 ' @@ -917,6 +866,15 @@ Partial Class F_VEH Me.Label8.TabIndex = 40 Me.Label8.Text = "HDV Class" ' + 'Label38 + ' + Me.Label38.AutoSize = True + Me.Label38.Location = New System.Drawing.Point(212, 52) + Me.Label38.Name = "Label38" + Me.Label38.Size = New System.Drawing.Size(24, 13) + Me.Label38.TabIndex = 24 + Me.Label38.Text = "[m²]" + ' 'F_VEH ' Me.AcceptButton = Me.ButOK @@ -976,82 +934,77 @@ Partial Class F_VEH Me.PerformLayout() End Sub - Friend WithEvents Label1 As System.Windows.Forms.Label - Friend WithEvents TbMass As System.Windows.Forms.TextBox - Friend WithEvents Label2 As System.Windows.Forms.Label - Friend WithEvents TbLoad As System.Windows.Forms.TextBox - Friend WithEvents Label3 As System.Windows.Forms.Label - Friend WithEvents TBcdTrTr As System.Windows.Forms.TextBox - Friend WithEvents Label4 As System.Windows.Forms.Label - Friend WithEvents TBAquersTrTr As System.Windows.Forms.TextBox - Friend WithEvents Label13 As System.Windows.Forms.Label - Friend WithEvents TBrdyn As System.Windows.Forms.TextBox - Friend WithEvents ButOK As System.Windows.Forms.Button - Friend WithEvents ButCancel As System.Windows.Forms.Button - Friend WithEvents Label14 As System.Windows.Forms.Label - Friend WithEvents Label31 As System.Windows.Forms.Label - Friend WithEvents Label35 As System.Windows.Forms.Label - Friend WithEvents Label37 As System.Windows.Forms.Label - Friend WithEvents Label38 As System.Windows.Forms.Label - Friend WithEvents CbCdMode As System.Windows.Forms.ComboBox - Friend WithEvents TbCdFile As System.Windows.Forms.TextBox - Friend WithEvents BtCdFileBrowse As System.Windows.Forms.Button - Friend WithEvents GroupBox6 As System.Windows.Forms.GroupBox - Friend WithEvents LbCdMode As System.Windows.Forms.Label - Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip - Friend WithEvents ToolStripBtNew As System.Windows.Forms.ToolStripButton - Friend WithEvents ToolStripBtOpen As System.Windows.Forms.ToolStripButton - Friend WithEvents ToolStripBtSave As System.Windows.Forms.ToolStripButton - Friend WithEvents ToolStripBtSaveAs As System.Windows.Forms.ToolStripButton - Friend WithEvents ToolStripSeparator3 As System.Windows.Forms.ToolStripSeparator - Friend WithEvents ToolStripBtSendTo As System.Windows.Forms.ToolStripButton - Friend WithEvents GroupBox7 As System.Windows.Forms.GroupBox - Friend WithEvents LbRtRatio As System.Windows.Forms.Label - Friend WithEvents TbRtRatio As System.Windows.Forms.TextBox - Friend WithEvents BtRtBrowse As System.Windows.Forms.Button - Friend WithEvents TbRtPath As System.Windows.Forms.TextBox - Friend WithEvents CbRtType As System.Windows.Forms.ComboBox - Friend WithEvents Label12 As System.Windows.Forms.Label - Friend WithEvents Label45 As System.Windows.Forms.Label - Friend WithEvents PnRt As System.Windows.Forms.Panel - Friend WithEvents Label46 As System.Windows.Forms.Label - Friend WithEvents Label50 As System.Windows.Forms.Label - Friend WithEvents TbMassExtra As System.Windows.Forms.TextBox - Friend WithEvents GroupBox8 As System.Windows.Forms.GroupBox - Friend WithEvents ButAxlRem As System.Windows.Forms.Button - Friend WithEvents LvRRC As System.Windows.Forms.ListView - Friend WithEvents ColumnHeader7 As System.Windows.Forms.ColumnHeader - Friend WithEvents ColumnHeader8 As System.Windows.Forms.ColumnHeader - Friend WithEvents ButAxlAdd As System.Windows.Forms.Button - Friend WithEvents CbCat As System.Windows.Forms.ComboBox - Friend WithEvents Label5 As System.Windows.Forms.Label - Friend WithEvents Label9 As System.Windows.Forms.Label - Friend WithEvents TbMassMass As System.Windows.Forms.TextBox - Friend WithEvents ColumnHeader9 As System.Windows.Forms.ColumnHeader - Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip - Friend WithEvents LbStatus As System.Windows.Forms.ToolStripStatusLabel - Friend WithEvents CbAxleConfig As System.Windows.Forms.ComboBox - Friend WithEvents TbHDVclass As System.Windows.Forms.TextBox - Friend WithEvents Label11 As System.Windows.Forms.Label - Friend WithEvents TbLoadingMax As System.Windows.Forms.TextBox - Friend WithEvents Label22 As System.Windows.Forms.Label - Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox - Friend WithEvents GrAirRes As System.Windows.Forms.GroupBox - Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox - Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator - Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton - Friend WithEvents CmOpenFile As System.Windows.Forms.ContextMenuStrip - Friend WithEvents OpenWithToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents ShowInFolderToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents BtCdFileOpen As System.Windows.Forms.Button - Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader - Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader - Friend WithEvents PnLoad As System.Windows.Forms.Panel - Friend WithEvents LbCdARig As System.Windows.Forms.Label - Friend WithEvents LbCdATr As System.Windows.Forms.Label - Friend WithEvents TBcwRig As System.Windows.Forms.TextBox - Friend WithEvents TBAquersRig As System.Windows.Forms.TextBox - Friend WithEvents PnCdARig As System.Windows.Forms.Panel + Friend WithEvents Label1 As System.Windows.Forms.Label + Friend WithEvents TbMass As System.Windows.Forms.TextBox + Friend WithEvents Label2 As System.Windows.Forms.Label + Friend WithEvents TbLoad As System.Windows.Forms.TextBox + Friend WithEvents Label3 As System.Windows.Forms.Label + Friend WithEvents TBcdA As System.Windows.Forms.TextBox + Friend WithEvents Label13 As System.Windows.Forms.Label + Friend WithEvents TBrdyn As System.Windows.Forms.TextBox + Friend WithEvents ButOK As System.Windows.Forms.Button + Friend WithEvents ButCancel As System.Windows.Forms.Button + Friend WithEvents Label14 As System.Windows.Forms.Label + Friend WithEvents Label31 As System.Windows.Forms.Label + Friend WithEvents Label35 As System.Windows.Forms.Label + Friend WithEvents CbCdMode As System.Windows.Forms.ComboBox + Friend WithEvents TbCdFile As System.Windows.Forms.TextBox + Friend WithEvents BtCdFileBrowse As System.Windows.Forms.Button + Friend WithEvents GroupBox6 As System.Windows.Forms.GroupBox + Friend WithEvents LbCdMode As System.Windows.Forms.Label + Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip + Friend WithEvents ToolStripBtNew As System.Windows.Forms.ToolStripButton + Friend WithEvents ToolStripBtOpen As System.Windows.Forms.ToolStripButton + Friend WithEvents ToolStripBtSave As System.Windows.Forms.ToolStripButton + Friend WithEvents ToolStripBtSaveAs As System.Windows.Forms.ToolStripButton + Friend WithEvents ToolStripSeparator3 As System.Windows.Forms.ToolStripSeparator + Friend WithEvents ToolStripBtSendTo As System.Windows.Forms.ToolStripButton + Friend WithEvents GroupBox7 As System.Windows.Forms.GroupBox + Friend WithEvents LbRtRatio As System.Windows.Forms.Label + Friend WithEvents TbRtRatio As System.Windows.Forms.TextBox + Friend WithEvents BtRtBrowse As System.Windows.Forms.Button + Friend WithEvents TbRtPath As System.Windows.Forms.TextBox + Friend WithEvents CbRtType As System.Windows.Forms.ComboBox + Friend WithEvents Label12 As System.Windows.Forms.Label + Friend WithEvents Label45 As System.Windows.Forms.Label + Friend WithEvents PnRt As System.Windows.Forms.Panel + Friend WithEvents Label46 As System.Windows.Forms.Label + Friend WithEvents Label50 As System.Windows.Forms.Label + Friend WithEvents TbMassExtra As System.Windows.Forms.TextBox + Friend WithEvents GroupBox8 As System.Windows.Forms.GroupBox + Friend WithEvents ButAxlRem As System.Windows.Forms.Button + Friend WithEvents LvRRC As System.Windows.Forms.ListView + Friend WithEvents ColumnHeader7 As System.Windows.Forms.ColumnHeader + Friend WithEvents ColumnHeader8 As System.Windows.Forms.ColumnHeader + Friend WithEvents ButAxlAdd As System.Windows.Forms.Button + Friend WithEvents CbCat As System.Windows.Forms.ComboBox + Friend WithEvents Label5 As System.Windows.Forms.Label + Friend WithEvents Label9 As System.Windows.Forms.Label + Friend WithEvents TbMassMass As System.Windows.Forms.TextBox + Friend WithEvents ColumnHeader9 As System.Windows.Forms.ColumnHeader + Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip + Friend WithEvents LbStatus As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents CbAxleConfig As System.Windows.Forms.ComboBox + Friend WithEvents TbHDVclass As System.Windows.Forms.TextBox + Friend WithEvents Label11 As System.Windows.Forms.Label + Friend WithEvents TbLoadingMax As System.Windows.Forms.TextBox + Friend WithEvents Label22 As System.Windows.Forms.Label + Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox + Friend WithEvents GrAirRes As System.Windows.Forms.GroupBox + Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox + Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator + Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton + Friend WithEvents CmOpenFile As System.Windows.Forms.ContextMenuStrip + Friend WithEvents OpenWithToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents ShowInFolderToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents BtCdFileOpen As System.Windows.Forms.Button + Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader + Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader + Friend WithEvents PnLoad As System.Windows.Forms.Panel + Friend WithEvents LbCdARig As System.Windows.Forms.Label + Friend WithEvents LbCdATr As System.Windows.Forms.Label + Friend WithEvents TBcdA2 As System.Windows.Forms.TextBox + Friend WithEvents PnCdARig As System.Windows.Forms.Panel Friend WithEvents PnAll As System.Windows.Forms.Panel Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents ColumnHeader3 As System.Windows.Forms.ColumnHeader @@ -1061,5 +1014,6 @@ Partial Class F_VEH Friend WithEvents PnWheelDiam As System.Windows.Forms.Panel Friend WithEvents PicVehicle As System.Windows.Forms.PictureBox Friend WithEvents Label8 As System.Windows.Forms.Label - Friend WithEvents PnCdATrTr As System.Windows.Forms.Panel + Friend WithEvents PnCdATrTr As System.Windows.Forms.Panel + Friend WithEvents Label38 As System.Windows.Forms.Label End Class diff --git a/VECTO/GUI/F_VEH.vb b/VECTO/GUI/F_VEH.vb index 9e0a8a97ba99dc518d59110349ab09a9c61d83f1..e7b6f3096e1189df631bca77e41e292a2932b660 100644 --- a/VECTO/GUI/F_VEH.vb +++ b/VECTO/GUI/F_VEH.vb @@ -264,10 +264,8 @@ Public Class F_VEH Me.TbMass.Text = "" Me.TbLoad.Text = "" Me.TBrdyn.Text = "" - Me.TBcdTrTr.Text = "" - Me.TBAquersTrTr.Text = "" - Me.TBcwRig.Text = "" - Me.TBAquersRig.Text = "" + Me.TBcdA.Text = "" + Me.TBcdA2.Text = "" Me.CbCdMode.SelectedIndex = 0 Me.TbCdFile.Text = "" @@ -391,10 +389,8 @@ Public Class F_VEH Me.CbAxleConfig.SelectedIndex = CType(VEH0.AxleConf, Integer) - Me.TBcdTrTr.Text = VEH0.Cd0 - Me.TBAquersTrTr.Text = VEH0.Aquers - Me.TBcwRig.Text = VEH0.Cd02 - Me.TBAquersRig.Text = VEH0.Aquers2 + Me.TBcdA.Text = VEH0.CdA0 + Me.TBcdA2.Text = VEH0.CdA02 DeclInit() @@ -421,12 +417,10 @@ Public Class F_VEH VEH0.MassExtra = CSng(fTextboxToNumString(Me.TbMassExtra.Text)) VEH0.Loading = CSng(fTextboxToNumString(Me.TbLoad.Text)) - VEH0.Cd0 = CSng(fTextboxToNumString(Me.TBcdTrTr.Text)) - VEH0.Aquers = CSng(fTextboxToNumString(Me.TBAquersTrTr.Text)) + VEH0.CdA0 = CSng(fTextboxToNumString(Me.TBcdA.Text)) If Me.PnCdARig.Visible Then - VEH0.Cd02 = CSng(fTextboxToNumString(Me.TBcwRig.Text)) - VEH0.Aquers2 = CSng(fTextboxToNumString(Me.TBAquersRig.Text)) + VEH0.CdA02 = CSng(fTextboxToNumString(Me.TBcdA2.Text)) End If VEH0.Rim = Me.CbRim.Text @@ -540,132 +534,132 @@ Public Class F_VEH #Region "Retarder" - 'Rt Type Change - Private Sub CbRtType_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles CbRtType.SelectedIndexChanged - Select Case Me.CbRtType.SelectedIndex - Case 1 'Primary - Me.LbRtRatio.Text = "Ratio to engine speed" - Me.TbRtPath.Enabled = True - Me.BtRtBrowse.Enabled = True - Me.PnRt.Enabled = True - Case 2 'Secondary - Me.LbRtRatio.Text = "Ratio to cardan shaft speed" - Me.TbRtPath.Enabled = True - Me.BtRtBrowse.Enabled = True - Me.PnRt.Enabled = True - Case Else '0 None - Me.LbRtRatio.Text = "Ratio" - Me.TbRtPath.Enabled = False - Me.BtRtBrowse.Enabled = False - Me.PnRt.Enabled = False - End Select + 'Rt Type Change + Private Sub CbRtType_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles CbRtType.SelectedIndexChanged + Select Case Me.CbRtType.SelectedIndex + Case 1 'Primary + Me.LbRtRatio.Text = "Ratio to engine speed" + Me.TbRtPath.Enabled = True + Me.BtRtBrowse.Enabled = True + Me.PnRt.Enabled = True + Case 2 'Secondary + Me.LbRtRatio.Text = "Ratio to cardan shaft speed" + Me.TbRtPath.Enabled = True + Me.BtRtBrowse.Enabled = True + Me.PnRt.Enabled = True + Case Else '0 None + Me.LbRtRatio.Text = "Ratio" + Me.TbRtPath.Enabled = False + Me.BtRtBrowse.Enabled = False + Me.PnRt.Enabled = False + End Select - Change() + Change() - End Sub + End Sub - 'Rt File Browse - Private Sub BtRtBrowse_Click(sender As System.Object, e As System.EventArgs) Handles BtRtBrowse.Click + 'Rt File Browse + Private Sub BtRtBrowse_Click(sender As System.Object, e As System.EventArgs) Handles BtRtBrowse.Click - If fbRLM.OpenDialog(fFileRepl(Me.TbRtPath.Text, fPATH(VehFile))) Then TbRtPath.Text = fFileWoDir(fbRLM.Files(0), fPATH(VehFile)) + If fbRLM.OpenDialog(fFileRepl(Me.TbRtPath.Text, fPATH(VehFile))) Then TbRtPath.Text = fFileWoDir(fbRLM.Files(0), fPATH(VehFile)) - End Sub + End Sub #End Region #Region "Track changes" - Private Sub Change() - If Not Changed Then - Me.LbStatus.Text = "Unsaved changes in current file" - Changed = True - End If - End Sub - - ' "Save changes? "... Returns True if user aborts - Private Function ChangeCheckCancel() As Boolean + Private Sub Change() + If Not Changed Then + Me.LbStatus.Text = "Unsaved changes in current file" + Changed = True + End If + End Sub - If Changed Then - Select Case MsgBox("Save changes ?", MsgBoxStyle.YesNoCancel) - Case MsgBoxResult.Yes - Return Not SaveOrSaveAs(False) - Case MsgBoxResult.Cancel - Return True - Case Else 'MsgBoxResult.No - Changed = False - Return False - End Select + ' "Save changes? "... Returns True if user aborts + Private Function ChangeCheckCancel() As Boolean + + If Changed Then + Select Case MsgBox("Save changes ?", MsgBoxStyle.YesNoCancel) + Case MsgBoxResult.Yes + Return Not SaveOrSaveAs(False) + Case MsgBoxResult.Cancel + Return True + Case Else 'MsgBoxResult.No + Changed = False + Return False + End Select - Else + Else - Return False + Return False - End If + End If - End Function + End Function - Private Sub TBmass_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbMass.TextChanged - SetMaxLoad() - Change() - End Sub + Private Sub TBmass_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbMass.TextChanged + SetMaxLoad() + Change() + End Sub - Private Sub TBston_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbLoad.TextChanged - Change() - End Sub + Private Sub TBston_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbLoad.TextChanged + Change() + End Sub - Private Sub TBDreifen_TextChanged(sender As System.Object, e As System.EventArgs) Handles TBrdyn.TextChanged - Change() - End Sub + Private Sub TBDreifen_TextChanged(sender As System.Object, e As System.EventArgs) Handles TBrdyn.TextChanged + Change() + End Sub - Private Sub CbRim_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles CbRim.SelectedIndexChanged - Change() - DeclInit() - End Sub + Private Sub CbRim_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles CbRim.SelectedIndexChanged + Change() + DeclInit() + End Sub - Private Sub TBcw_TextChanged(sender As System.Object, e As System.EventArgs) Handles TBcdTrTr.TextChanged, TBcwRig.TextChanged - Change() - End Sub + Private Sub TBcw_TextChanged(sender As System.Object, e As System.EventArgs) Handles TBcdA.TextChanged, TBcdA2.TextChanged + Change() + End Sub - Private Sub TBAquers_TextChanged(sender As System.Object, e As System.EventArgs) Handles TBAquersTrTr.TextChanged, TBAquersRig.TextChanged - Change() - End Sub + Private Sub TBAquers_TextChanged(sender As System.Object, e As System.EventArgs) + Change() + End Sub - Private Sub TbCdFile_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbCdFile.TextChanged - Change() - End Sub + Private Sub TbCdFile_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbCdFile.TextChanged + Change() + End Sub - Private Sub TbRtPath_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbRtPath.TextChanged - Change() - End Sub + Private Sub TbRtPath_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbRtPath.TextChanged + Change() + End Sub - Private Sub TbRtRatio_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbRtRatio.TextChanged - Change() - End Sub + Private Sub TbRtRatio_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbRtRatio.TextChanged + Change() + End Sub - Private Sub CbCat_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles CbCat.SelectedIndexChanged - Change() - SetHDVclass() - DeclInit() - End Sub + Private Sub CbCat_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles CbCat.SelectedIndexChanged + Change() + SetHDVclass() + DeclInit() + End Sub - Private Sub TbMassTrailer_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbMassExtra.TextChanged - SetMaxLoad() - Change() - End Sub + Private Sub TbMassTrailer_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbMassExtra.TextChanged + SetMaxLoad() + Change() + End Sub - Private Sub TbMassMax_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbMassMass.TextChanged - SetMaxLoad() - Change() - SetHDVclass() - DeclInit() - End Sub + Private Sub TbMassMax_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbMassMass.TextChanged + SetMaxLoad() + Change() + SetHDVclass() + DeclInit() + End Sub - Private Sub CbAxleConfig_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles CbAxleConfig.SelectedIndexChanged - Change() - SetHDVclass() - DeclInit() - End Sub + Private Sub CbAxleConfig_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles CbAxleConfig.SelectedIndexChanged + Change() + SetHDVclass() + DeclInit() + End Sub #End Region diff --git a/VECTO/Input Files/cVEH.vb b/VECTO/Input Files/cVEH.vb index 13bc8a936373560497071228286ccb6879d687ca..18c8c66d33bf4a263323e22c2768c3769fe1d3c9 100644 --- a/VECTO/Input Files/cVEH.vb +++ b/VECTO/Input Files/cVEH.vb @@ -13,7 +13,7 @@ Imports System.Collections.Generic Public Class cVEH 'V2 MassMax is now saved in [t] instead of [kg] - Private Const FormatVersion As Short = 6 + Private Const FormatVersion As Short = 7 Private FileVersion As Short Private sFilePath As String @@ -23,14 +23,9 @@ Public Class cVEH Public Loading As Single Private siFr0 As Single - Public Cd0 As Single - Public Aquers As Single - - Public Cd02 As Single - Public Aquers2 As Single - - Private Cd0Act As Single - Private AquersAct As Single + Public CdA0 As Single + Public CdA02 As Single + Private CdA0Act As Single Public CdMode As tCdMode Public CdFile As cSubPath @@ -104,12 +99,9 @@ Public Class cVEH Mass = 0 MassExtra = 0 Loading = 0 - Cd0 = 0 - Aquers = 0 - Cd0Act = Cd0 - AquersAct = Aquers - Cd02 = 0 - Aquers2 = 0 + CdA0 = 0 + CdA0Act = CdA0 + CdA02 = 0 CdFile.Clear() CdMode = tCdMode.ConstCd0 CdX.Clear() @@ -181,22 +173,27 @@ Public Class cVEH MassMax = JSON.Content("Body")("MassMax") If FileVersion < 2 Then MassMax /= 1000 - Cd0 = JSON.Content("Body")("Cd") - Aquers = JSON.Content("Body")("CrossSecArea") + If FileVersion < 7 Then + CdA0 = CSng(JSON.Content("Body")("Cd")) * CSng(JSON.Content("Body")("CrossSecArea")) + Else + CdA0 = JSON.Content("Body")("CdA") + End If - Cd02 = Cd0 - Aquers2 = Aquers + CdA02 = CdA0 - If FileVersion < 4 Then - If Not JSON.Content("Body")("CdRigid") Is Nothing Then Cd02 = JSON.Content("Body")("CdRigid") - If Not JSON.Content("Body")("CrossSecAreaRigid") Is Nothing Then Aquers2 = JSON.Content("Body")("CrossSecAreaRigid") - Else - If Not JSON.Content("Body")("Cd2") Is Nothing Then Cd02 = JSON.Content("Body")("Cd2") - If Not JSON.Content("Body")("CrossSecArea2") Is Nothing Then Aquers2 = JSON.Content("Body")("CrossSecArea2") - End If + If FileVersion < 4 Then + If Not JSON.Content("Body")("CdRigid") Is Nothing AndAlso Not JSON.Content("Body")("CrossSecAreaRigid") Is Nothing Then + CdA02 = CSng(JSON.Content("Body")("CdRigid")) * CSng(JSON.Content("Body")("CrossSecAreaRigid")) + End If + ElseIf FileVersion < 7 Then + If Not JSON.Content("Body")("Cd2") Is Nothing AndAlso Not JSON.Content("Body")("CrossSecArea2") Is Nothing Then + CdA02 = CSng(JSON.Content("Body")("Cd2")) * CSng(JSON.Content("Body")("CrossSecArea2")) + End If + Else + If Not JSON.Content("Body")("CdA2") Is Nothing Then CdA02 = JSON.Content("Body")("CdA2") + End If - Cd0Act = Cd0 - AquersAct = Aquers + CdA0Act = CdA0 If FileVersion < 3 Then Itemp = JSON.Content("Body")("WheelsInertia") @@ -294,13 +291,11 @@ Public Class cVEH dic.Add("Loading", Loading) dic.Add("MassMax", MassMax) - dic.Add("Cd", Cd0) - dic.Add("CrossSecArea", Aquers) + dic.Add("CdA", CdA0) - If Cd02 > 0 And Aquers2 > 0 Then - dic.Add("Cd2", Cd02) - dic.Add("CrossSecArea2", Aquers2) - End If + If CdA02 > 0 Then + dic.Add("CdA2", CdA02) + End If dic.Add("rdyn", rdyn) dic.Add("Rim", Rim) @@ -415,17 +410,14 @@ Public Class cVEH If Declaration.SegRef.TrailerOnlyInLongHaul Then If MissionID = tMission.LongHaul Then - Cd0Act = Cd0 - AquersAct = Aquers + CdA0Act = CdA0 Else - Cd0Act = Cd02 - AquersAct = Aquers2 + CdA0Act = CdA02 End If Else - Cd0Act = Cd0 - AquersAct = Aquers + CdA0Act = CdA0 End If @@ -645,7 +637,6 @@ Public Class cVEH Dim vveh As Single Dim alpha As Single Dim beta As Single - Dim CdA0 As Single Dim CdA As Single Dim CdAsum As Single Dim Vwind As Single @@ -659,7 +650,6 @@ Public Class cVEH Dim DeltaCdA As Single Dim share As Single - CdA0 = Cd0Act * AquersAct Vwind = cDeclaration.Vwind * 3.6 Try @@ -709,7 +699,7 @@ Public Class cVEH End If DeltaCdA = (beta - lBeta(k - 1)) * (lDeltaCdA(k) - lDeltaCdA(k - 1)) / (lBeta(k) - lBeta(k - 1)) + lDeltaCdA(k - 1) - CdA = CdA0 + DeltaCdA + CdA = CdA0Act + DeltaCdA If j = 0 OrElse j = 180 Then share = 5 / 180 @@ -734,57 +724,50 @@ Public Class cVEH End Function - Public Function Cd(ByVal x As Single) As Single - Return CdIntpol(x) * Cd0Act + Public Function CdA_Y(ByVal x As Single) As Single + Return CdIntpol(x) End Function - Public Function CdA(ByVal vveh As Single) As Single - Return CdIntpol(vveh) - End Function - Public Function Cd() As Single - Return Cd0Act - End Function + Public Function CdA() As Single + Return CdA0Act + End Function - Public Function CrossSecArea() As Single - Return AquersAct - End Function + Private Function CdIntpol(ByVal x As Single) As Single + Dim i As Int32 - Private Function CdIntpol(ByVal x As Single) As Single - Dim i As Int32 - - 'Extrapolation for x < x(1) - If CdX(0) >= x Then - If CdX(0) > x Then - If CdMode = tCdMode.CdOfBeta Then - MODdata.ModErrors.CdExtrapol = "β= " & x - Else - MODdata.ModErrors.CdExtrapol = "v= " & x - End If - End If - i = 1 - GoTo lbInt - End If + 'Extrapolation for x < x(1) + If CdX(0) >= x Then + If CdX(0) > x Then + If CdMode = tCdMode.CdOfBeta Then + MODdata.ModErrors.CdExtrapol = "β= " & x + Else + MODdata.ModErrors.CdExtrapol = "v= " & x + End If + End If + i = 1 + GoTo lbInt + End If - i = 0 - Do While CdX(i) < x And i < CdDim - i += 1 - Loop + i = 0 + Do While CdX(i) < x And i < CdDim + i += 1 + Loop - 'Extrapolation for x > x(imax) - If CdX(i) < x Then - If CdMode = tCdMode.CdOfBeta Then - MODdata.ModErrors.CdExtrapol = "β= " & x - Else - MODdata.ModErrors.CdExtrapol = "v= " & x - End If - End If + 'Extrapolation for x > x(imax) + If CdX(i) < x Then + If CdMode = tCdMode.CdOfBeta Then + MODdata.ModErrors.CdExtrapol = "β= " & x + Else + MODdata.ModErrors.CdExtrapol = "v= " & x + End If + End If lbInt: - 'Interpolation - Return (x - CdX(i - 1)) * (CdY(i) - CdY(i - 1)) / (CdX(i) - CdX(i - 1)) + CdY(i - 1) + 'Interpolation + Return (x - CdX(i - 1)) * (CdY(i) - CdY(i - 1)) / (CdX(i) - CdX(i - 1)) + CdY(i - 1) - End Function + End Function #End Region diff --git a/VECTO/MODcalc/cPower.vb b/VECTO/MODcalc/cPower.vb index 9440b2151bb78d41f42daa3f9258fc79b9fc4edc..cfe1a7fe5baad3594d8743703388cff8fb8916d6 100644 --- a/VECTO/MODcalc/cPower.vb +++ b/VECTO/MODcalc/cPower.vb @@ -2384,19 +2384,19 @@ lb10: Case tCdMode.ConstCd0 vair = v - CdA = VEH.Cd * VEH.CrossSecArea + CdA = VEH.CdA Case tCdMode.CdOfVeng vair = v - CdA = VEH.Cd(Vkmh) * VEH.CrossSecArea + CdA = VEH.CdA_Y(Vkmh) * VEH.CdA Case tCdMode.CdOfVdecl vair = v - CdA = VEH.CdA(Vkmh) + CdA = VEH.CdA_Y(Vkmh) Case Else 'tCdType.CdOfBeta vair = MODdata.Vh.VairVres(t) - CdA = VEH.Cd(Math.Abs(MODdata.Vh.VairBeta(t))) * VEH.CrossSecArea + CdA = VEH.CdA_Y(Math.Abs(MODdata.Vh.VairBeta(t))) * VEH.CdA End Select diff --git a/VECTO/VECTO_Global.vb b/VECTO/VECTO_Global.vb index 2621fd8a0dae2e1c2165613c6d4b7fc640dcac37..ed89253a484497784ca81e51e0e6637d31f7a78b 100644 --- a/VECTO/VECTO_Global.vb +++ b/VECTO/VECTO_Global.vb @@ -11,7 +11,7 @@ Imports System.Collections.Generic Module VECTO_Global - Public Const VECTOvers As String = "2.2 beta" + Public Const VECTOvers As String = "2.2 beta-2" Public Const LicSigAppCode As String = "VECTO-Release-0093C61E0A2E4BFA9A7ED7E729C56AE4" Public MyAppPath As String Public MyConfPath As String