diff --git a/CSE/Calculation/main_calculation_call.vb b/CSE/Calculation/main_calculation_call.vb index faed7dbffe660ffcd385010db1a3b43ec717fa33..dd61d26fa23303d9bbc27480ce32e8b5ded9ff9f 100644 --- a/CSE/Calculation/main_calculation_call.vb +++ b/CSE/Calculation/main_calculation_call.vb @@ -207,7 +207,7 @@ Public Module main_calculation_call ' Calculate the values for v_wind, beta and v_air fWindBetaAir(vehicleX) - ' Calculate the moving average from v_vind + ' Calculate the moving average from v_wind fMoveAve(CalcData(tCompCali.t), CalcData(tCompCali.vwind_c), CalcData(tCompCali.vwind_1s)) ' Calculate the average values for v_wind, beta and v_wind_1s_max @@ -328,13 +328,13 @@ Public Module main_calculation_call Function ffvpeBeta() As Boolean ' Declaration Dim anz_s(1, 0), i, j, CalcX(0), VSec(0), num As Integer - Dim ave_vc(1, 0), vair_ar(1, 0), beta_ar(1, 0), v_air_ges, beta_ges, ave_vc_ges As Double + Dim ave_vc(1, 0), vair_ic(1, 0), beta_ic(1, 0), v_air_ges, beta_ges, ave_vc_ges As Double ' Initialise For i = 0 To 1 ave_vc(i, 0) = 0 - vair_ar(i, 0) = 0 - beta_ar(i, 0) = 0 + vair_ic(i, 0) = 0 + beta_ic(i, 0) = 0 anz_s(i, 0) = 0 Next i num = 0 @@ -350,8 +350,8 @@ Public Module main_calculation_call ReDim Preserve CalcX(UBound(CalcX) + 1) ReDim Preserve VSec(UBound(VSec) + 1) ReDim Preserve ave_vc(1, UBound(ave_vc, 2) + 1) - ReDim Preserve vair_ar(1, UBound(vair_ar, 2) + 1) - ReDim Preserve beta_ar(1, UBound(beta_ar, 2) + 1) + ReDim Preserve vair_ic(1, UBound(vair_ic, 2) + 1) + ReDim Preserve beta_ic(1, UBound(beta_ic, 2) + 1) ReDim Preserve anz_s(1, UBound(anz_s, 2) + 1) CalcX(UBound(CalcX)) = ErgValues(tCompErg.SecID)(i) VSec(UBound(VSec)) = 0 @@ -366,13 +366,13 @@ Public Module main_calculation_call VSec(UBound(VSec)) = 1 If ErgValues(tCompErg.DirID)(i) = ErgValues(tCompErg.DirID)(0) Then ave_vc(0, (UBound(ave_vc, 2))) += ErgValues(tCompErg.v_veh)(i) / 3.6 - vair_ar(0, (UBound(vair_ar, 2))) += ErgValues(tCompErg.vair_ic)(i) - beta_ar(0, (UBound(beta_ar, 2))) += ErgValues(tCompErg.beta_ic)(i) + vair_ic(0, (UBound(vair_ic, 2))) += ErgValues(tCompErg.vair_ic)(i) + beta_ic(0, (UBound(beta_ic, 2))) += ErgValues(tCompErg.beta_ic)(i) anz_s(0, (UBound(anz_s, 2))) += 1 Else ave_vc(1, (UBound(ave_vc, 2))) += ErgValues(tCompErg.v_veh)(i) / 3.6 - vair_ar(1, (UBound(vair_ar, 2))) += ErgValues(tCompErg.vair_ic)(i) - beta_ar(1, (UBound(beta_ar, 2))) += ErgValues(tCompErg.beta_ic)(i) + vair_ic(1, (UBound(vair_ic, 2))) += ErgValues(tCompErg.vair_ic)(i) + beta_ic(1, (UBound(beta_ic, 2))) += ErgValues(tCompErg.beta_ic)(i) anz_s(1, (UBound(anz_s, 2))) += 1 End If End If @@ -380,13 +380,13 @@ Public Module main_calculation_call VSec(UBound(VSec)) = 1 If ErgValues(tCompErg.DirID)(j) = ErgValues(tCompErg.DirID)(0) Then ave_vc(0, (UBound(ave_vc, 2))) += ErgValues(tCompErg.v_veh)(j) / 3.6 - vair_ar(0, (UBound(vair_ar, 2))) += ErgValues(tCompErg.vair_ic)(j) - beta_ar(0, (UBound(beta_ar, 2))) += ErgValues(tCompErg.beta_ic)(j) + vair_ic(0, (UBound(vair_ic, 2))) += ErgValues(tCompErg.vair_ic)(j) + beta_ic(0, (UBound(beta_ic, 2))) += ErgValues(tCompErg.beta_ic)(j) anz_s(0, (UBound(anz_s, 2))) += 1 Else ave_vc(1, (UBound(ave_vc, 2))) += ErgValues(tCompErg.v_veh)(j) / 3.6 - vair_ar(1, (UBound(vair_ar, 2))) += ErgValues(tCompErg.vair_ic)(j) - beta_ar(1, (UBound(beta_ar, 2))) += ErgValues(tCompErg.beta_ic)(j) + vair_ic(1, (UBound(vair_ic, 2))) += ErgValues(tCompErg.vair_ic)(j) + beta_ic(1, (UBound(beta_ic, 2))) += ErgValues(tCompErg.beta_ic)(j) anz_s(1, (UBound(anz_s, 2))) += 1 End If End If @@ -399,8 +399,8 @@ Public Module main_calculation_call ave_vc_ges = 0 For j = 0 To 1 If VSec(i) = 1 Then - v_air_ges += vair_ar(j, i) / anz_s(j, i) - beta_ges += beta_ar(j, i) / anz_s(j, i) + v_air_ges += vair_ic(j, i) / anz_s(j, i) + beta_ges += beta_ic(j, i) / anz_s(j, i) ave_vc_ges += ave_vc(j, i) / anz_s(j, i) num += 1 End If @@ -540,7 +540,7 @@ Public Module main_calculation_call ' Ceck if enough sections are detected If SecCount.AnzSec.Count - 1 < 1 Then - Throw New Exception(format("Insufficent numbers of valid measurement sections({0}) available!", SecCount.AnzSec.Count)) + Throw New Exception(format("Insufficient numbers of valid measurement sections({0}) available!", SecCount.AnzSec.Count)) End If ' Check if enough valid sections in both directionsection @@ -599,7 +599,7 @@ Public Module main_calculation_call End If Next i If anz < 2 Then - Throw New Exception(format("Insufficent numbers of valid measurement sections({0}) available!", anz)) + Throw New Exception(format("Insufficient numbers of valid measurement sections({0}) available!", anz)) End If ' Look if something have changed @@ -683,7 +683,7 @@ Public Module main_calculation_call ' Ceck if enough sections are detected If SecCount.AnzSec.Count - 1 < 1 Then - Throw New Exception(format("Insufficent numbers of valid measurement sections({0}) in the low speed test available!", SecCount.AnzSec.Count)) + Throw New Exception(format("Insufficient numbers of valid measurement sections({0}) in the low speed test available!", SecCount.AnzSec.Count)) End If ' Check if enough valid sections in both directionsection @@ -798,7 +798,7 @@ Public Module main_calculation_call ' Ceck if enough sections are detected If SecCount.AnzSec.Count - 1 < 1 Then - Throw New Exception(format("Insufficent numbers of valid measurement sections({0}) in the high speed test available!", SecCount.AnzSec.Count)) + Throw New Exception(format("Insufficient numbers of valid measurement sections({0}) in the high speed test available!", SecCount.AnzSec.Count)) End If ' Check if enough valid sections in both directionsection diff --git a/CSE/GUI/F_Main.Designer.vb b/CSE/GUI/F_Main.Designer.vb index 64475e0ee625a13bcaab9b1449066a7915c8b1ff..907d6e9832b9c2271f087ab0508d2173e878c02e 100644 --- a/CSE/GUI/F_Main.Designer.vb +++ b/CSE/GUI/F_Main.Designer.vb @@ -33,11 +33,14 @@ Partial Class F_Main Me.ToolsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.MenuItemClearLog = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripMenuItemLog = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripSeparator() + Me.CreateActivationFileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripMenuItemOption = New System.Windows.Forms.ToolStripMenuItem() Me.InfoToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripMenuItemAbout = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripMenuItemManu = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripSeparator() + Me.ToolStripMenuItemAbout = New System.Windows.Forms.ToolStripMenuItem() Me.BackgroundWorkerVECTO = New System.ComponentModel.BackgroundWorker() Me.GroupBoxJob = New System.Windows.Forms.GroupBox() Me.TextBoxWeather = New System.Windows.Forms.TextBox() @@ -227,9 +230,6 @@ Partial Class F_Main Me.Label20 = New System.Windows.Forms.Label() Me.LRhoAirRef = New System.Windows.Forms.Label() Me.TB_rho_air_ref = New System.Windows.Forms.TextBox() - Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripSeparator() - Me.CreateActivationFileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripSeparator() Me.MenuStrip1.SuspendLayout() Me.GroupBoxJob.SuspendLayout() Me.GB_hz_out.SuspendLayout() @@ -330,6 +330,17 @@ Partial Class F_Main Me.ToolStripMenuItemLog.Size = New System.Drawing.Size(186, 22) Me.ToolStripMenuItemLog.Text = "Open LogFile" ' + 'ToolStripMenuItem2 + ' + Me.ToolStripMenuItem2.Name = "ToolStripMenuItem2" + Me.ToolStripMenuItem2.Size = New System.Drawing.Size(183, 6) + ' + 'CreateActivationFileToolStripMenuItem + ' + Me.CreateActivationFileToolStripMenuItem.Name = "CreateActivationFileToolStripMenuItem" + Me.CreateActivationFileToolStripMenuItem.Size = New System.Drawing.Size(186, 22) + Me.CreateActivationFileToolStripMenuItem.Text = "Create Activation File" + ' 'ToolStripSeparator3 ' Me.ToolStripSeparator3.Name = "ToolStripSeparator3" @@ -350,19 +361,24 @@ Partial Class F_Main Me.InfoToolStripMenuItem.Size = New System.Drawing.Size(44, 20) Me.InfoToolStripMenuItem.Text = "Help" ' + 'ToolStripMenuItemManu + ' + Me.ToolStripMenuItemManu.Name = "ToolStripMenuItemManu" + Me.ToolStripMenuItemManu.Size = New System.Drawing.Size(140, 22) + Me.ToolStripMenuItemManu.Text = "User Manual" + ' + 'ToolStripMenuItem1 + ' + Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1" + Me.ToolStripMenuItem1.Size = New System.Drawing.Size(137, 6) + ' 'ToolStripMenuItemAbout ' Me.ToolStripMenuItemAbout.Image = Global.CSE.My.Resources.Resources.Info Me.ToolStripMenuItemAbout.Name = "ToolStripMenuItemAbout" - Me.ToolStripMenuItemAbout.Size = New System.Drawing.Size(152, 22) + Me.ToolStripMenuItemAbout.Size = New System.Drawing.Size(140, 22) Me.ToolStripMenuItemAbout.Text = "About CSE" ' - 'ToolStripMenuItemManu - ' - Me.ToolStripMenuItemManu.Name = "ToolStripMenuItemManu" - Me.ToolStripMenuItemManu.Size = New System.Drawing.Size(152, 22) - Me.ToolStripMenuItemManu.Text = "User Manual" - ' 'BackgroundWorkerVECTO ' Me.BackgroundWorkerVECTO.WorkerReportsProgress = True @@ -371,7 +387,7 @@ Partial Class F_Main 'GroupBoxJob ' Me.GroupBoxJob.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.GroupBoxJob.Controls.Add(Me.TextBoxWeather) Me.GroupBoxJob.Controls.Add(Me.ButtonWeather) Me.GroupBoxJob.Controls.Add(Me.ButtonSelectWeather) @@ -390,7 +406,7 @@ Partial Class F_Main 'TextBoxWeather ' Me.TextBoxWeather.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TextBoxWeather.Location = New System.Drawing.Point(144, 42) Me.TextBoxWeather.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxWeather.Name = "TextBoxWeather" @@ -423,7 +439,7 @@ Partial Class F_Main 'TextBoxVeh1 ' Me.TextBoxVeh1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TextBoxVeh1.Location = New System.Drawing.Point(145, 15) Me.TextBoxVeh1.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxVeh1.Name = "TextBoxVeh1" @@ -585,6 +601,7 @@ Partial Class F_Main Me.TextBoxbetaf.Name = "TextBoxbetaf" Me.TextBoxbetaf.Size = New System.Drawing.Size(40, 20) Me.TextBoxbetaf.TabIndex = 10 + Me.TextBoxbetaf.Text = "1" Me.TextBoxbetaf.TextAlign = System.Windows.Forms.HorizontalAlignment.Right ' 'TextBoxbetad @@ -593,6 +610,7 @@ Partial Class F_Main Me.TextBoxbetad.Name = "TextBoxbetad" Me.TextBoxbetad.Size = New System.Drawing.Size(40, 20) Me.TextBoxbetad.TabIndex = 11 + Me.TextBoxbetad.Text = "0" Me.TextBoxbetad.TextAlign = System.Windows.Forms.HorizontalAlignment.Right ' 'TextBoxAirf @@ -601,6 +619,7 @@ Partial Class F_Main Me.TextBoxAirf.Name = "TextBoxAirf" Me.TextBoxAirf.Size = New System.Drawing.Size(40, 20) Me.TextBoxAirf.TabIndex = 8 + Me.TextBoxAirf.Text = "1" Me.TextBoxAirf.TextAlign = System.Windows.Forms.HorizontalAlignment.Right ' 'TextBoxAird @@ -609,6 +628,7 @@ Partial Class F_Main Me.TextBoxAird.Name = "TextBoxAird" Me.TextBoxAird.Size = New System.Drawing.Size(40, 20) Me.TextBoxAird.TabIndex = 9 + Me.TextBoxAird.Text = "0" Me.TextBoxAird.TextAlign = System.Windows.Forms.HorizontalAlignment.Right ' 'CB_gradient_correction @@ -634,7 +654,7 @@ Partial Class F_Main 'GroupBoxInput ' Me.GroupBoxInput.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.GroupBoxInput.Controls.Add(Me.ButtonDataLS1) Me.GroupBoxInput.Controls.Add(Me.TextBoxDataLS2) Me.GroupBoxInput.Controls.Add(Me.ButtonSelectDataLS1) @@ -672,7 +692,7 @@ Partial Class F_Main 'TextBoxDataLS2 ' Me.TextBoxDataLS2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TextBoxDataLS2.Location = New System.Drawing.Point(145, 110) Me.TextBoxDataLS2.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxDataLS2.Name = "TextBoxDataLS2" @@ -705,7 +725,7 @@ Partial Class F_Main 'TextBoxDataLS1 ' Me.TextBoxDataLS1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TextBoxDataLS1.Location = New System.Drawing.Point(145, 56) Me.TextBoxDataLS1.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxDataLS1.Name = "TextBoxDataLS1" @@ -739,7 +759,7 @@ Partial Class F_Main 'TextBoxDataHS ' Me.TextBoxDataHS.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TextBoxDataHS.Location = New System.Drawing.Point(144, 83) Me.TextBoxDataHS.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxDataHS.Name = "TextBoxDataHS" @@ -776,7 +796,7 @@ Partial Class F_Main 'TextBoxMSCT ' Me.TextBoxMSCT.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TextBoxMSCT.Location = New System.Drawing.Point(144, 19) Me.TextBoxMSCT.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxMSCT.Name = "TextBoxMSCT" @@ -855,7 +875,7 @@ Partial Class F_Main 'GroupBox1 ' Me.GroupBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.GroupBox1.Controls.Add(Me.TextBoxDataC) Me.GroupBox1.Controls.Add(Me.ButtonDataC) Me.GroupBox1.Controls.Add(Me.ButtonSelectDataC) @@ -874,7 +894,7 @@ Partial Class F_Main 'TextBoxDataC ' Me.TextBoxDataC.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TextBoxDataC.Location = New System.Drawing.Point(144, 47) Me.TextBoxDataC.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxDataC.Name = "TextBoxDataC" @@ -907,7 +927,7 @@ Partial Class F_Main 'TextBoxMSCC ' Me.TextBoxMSCC.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TextBoxMSCC.Location = New System.Drawing.Point(144, 20) Me.TextBoxMSCC.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxMSCC.Name = "TextBoxMSCC" @@ -1043,8 +1063,8 @@ Partial Class F_Main ' Me.TabControlOutMsg.Alignment = System.Windows.Forms.TabAlignment.Bottom Me.TabControlOutMsg.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TabControlOutMsg.Controls.Add(Me.TabPageMSG) Me.TabControlOutMsg.Controls.Add(Me.TabPageWar) Me.TabControlOutMsg.Controls.Add(Me.TabPageErr) @@ -1072,8 +1092,8 @@ Partial Class F_Main 'ListBoxMSG ' Me.ListBoxMSG.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ListBoxMSG.Font = New System.Drawing.Font("Consolas", 8.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.ListBoxMSG.FormattingEnabled = True Me.ListBoxMSG.HorizontalScrollbar = True @@ -1099,8 +1119,8 @@ Partial Class F_Main 'ListBoxWar ' Me.ListBoxWar.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ListBoxWar.Font = New System.Drawing.Font("Consolas", 8.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.ListBoxWar.FormattingEnabled = True Me.ListBoxWar.HorizontalScrollbar = True @@ -1125,8 +1145,8 @@ Partial Class F_Main 'ListBoxErr ' Me.ListBoxErr.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ListBoxErr.Font = New System.Drawing.Font("Consolas", 8.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.ListBoxErr.FormattingEnabled = True Me.ListBoxErr.HorizontalScrollbar = True @@ -1140,7 +1160,7 @@ Partial Class F_Main 'TextBoxVeh ' Me.TextBoxVeh.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TextBoxVeh.Location = New System.Drawing.Point(98, 19) Me.TextBoxVeh.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxVeh.Name = "TextBoxVeh" @@ -1150,7 +1170,7 @@ Partial Class F_Main 'TabControl1 ' Me.TabControl1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.TabControl1.Controls.Add(Me.TPMain) Me.TabControl1.Controls.Add(Me.TPCriteria) Me.TabControl1.Location = New System.Drawing.Point(8, 72) @@ -2324,22 +2344,6 @@ Partial Class F_Main Me.TB_rho_air_ref.TabIndex = 1 Me.TB_rho_air_ref.TextAlign = System.Windows.Forms.HorizontalAlignment.Right ' - 'ToolStripMenuItem1 - ' - Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1" - Me.ToolStripMenuItem1.Size = New System.Drawing.Size(149, 6) - ' - 'CreateActivationFileToolStripMenuItem - ' - Me.CreateActivationFileToolStripMenuItem.Name = "CreateActivationFileToolStripMenuItem" - Me.CreateActivationFileToolStripMenuItem.Size = New System.Drawing.Size(186, 22) - Me.CreateActivationFileToolStripMenuItem.Text = "Create Activation File" - ' - 'ToolStripMenuItem2 - ' - Me.ToolStripMenuItem2.Name = "ToolStripMenuItem2" - Me.ToolStripMenuItem2.Size = New System.Drawing.Size(183, 6) - ' 'F_Main ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/CSE/GUI/F_Main.vb b/CSE/GUI/F_Main.vb index b6da9bdf07b5804178a4ca1417642ddcc5624e48..e343e70539b9c3d6fb1386d26bcecd7674577289 100644 --- a/CSE/GUI/F_Main.vb +++ b/CSE/GUI/F_Main.vb @@ -86,6 +86,9 @@ Public Class F_Main logme(9, False, format("Failed storing default Preferences({0}) due to: {1}", PrefsPath, ex.Message), ex) End Try End If + + ' Load the default settings into criteria tab + UI_PopulateFromCriteria() End Sub Private Sub ClickExitHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItemExit.Click @@ -107,8 +110,6 @@ Public Class F_Main End Sub - - #Region "AsynJob" Private Enum OpType @@ -224,6 +225,7 @@ Public Class F_Main End If ' Read the data from the GUI + UI_PopulatePath() UI_PopulateToJob(True) UI_PopulateToCriteria() @@ -257,7 +259,11 @@ Public Class F_Main Job.ResetValue(True) ' Save the Jobfiles - doSaveJob(False) + If Not doSaveJob(False) Then + logme(9, False, format("No Jobfile name given!")) + Me.CalibrationState = False + Exit Sub + End If ' Clear the MSG on the GUI Me.ListBoxMSG.Items.Clear() @@ -340,7 +346,11 @@ Public Class F_Main Job.ResetValue() ' Save the Jobfiles - doSaveJob(False) + If Not doSaveJob(False) Then + logme(9, False, format("No Jobfile name given!")) + Me.EvaluationState = False + Exit Sub + End If ' Clear the MSG on the GUI fClear_VECTO_Form(False, False) @@ -429,7 +439,10 @@ Public Class F_Main doSaveJob(saveAs) End Sub - Private Sub doSaveJob(ByVal isSaveAs As Boolean) + Private Function doSaveJob(ByVal isSaveAs As Boolean) As Boolean + ' Control the texboxes + UI_PopulatePath() + ' Identify if the file should save under a new name If JobFile = Nothing Or isSaveAs Then ' Open the filebrowser to select the folder and name of the Jobfile @@ -439,7 +452,7 @@ Public Class F_Main Me.Text = Formname & " " & JobFile End If If (JobFile = Nothing) Then - Exit Sub + Return False End If End If @@ -452,7 +465,9 @@ Public Class F_Main JobFile = joinPaths(fPath(JobFile), fName(JobFile, False) & ".csjob.json") End If Job.Store(JobFile) - End Sub + + Return True + End Function #Region "UI populate" @@ -477,7 +492,6 @@ Public Class F_Main Job.high_fpath = TextBoxDataHS.Text Job.low2_fpath = TextBoxDataLS2.Text Job.coast_track_fpath = TextBoxMSCT.Text - Crt.rr_corr_factor = TB_rr_corr_factor.Text If validate Then Job.Validate() @@ -508,6 +522,7 @@ Public Class F_Main Crt.delta_Hz_max = TB_delta_Hz_max.Text Crt.rho_air_ref = TB_rho_air_ref.Text Crt.acc_corr_avg = TB_acc_corr_avg.Text + Crt.rr_corr_factor = TB_rr_corr_factor.Text Crt.delta_parallel_max = TB_delta_parallel_max.Text ' Identification of measurement section Crt.trigger_delta_x_max = TB_trigger_delta_x_max.Text @@ -556,7 +571,6 @@ Public Class F_Main TextBoxDataC.Text = Job.calib_run_fpath ' Test TextBoxMSCT.Text = Job.coast_track_fpath - TB_rr_corr_factor.Text = Crt.rr_corr_factor TextBoxDataLS1.Text = Job.low1_fpath TextBoxDataHS.Text = Job.high_fpath TextBoxDataLS2.Text = Job.low2_fpath @@ -577,6 +591,7 @@ Public Class F_Main TB_delta_Hz_max.Text = Crt.delta_Hz_max TB_rho_air_ref.Text = Crt.rho_air_ref TB_acc_corr_avg.Text = Crt.acc_corr_avg + TB_rr_corr_factor.Text = Crt.rr_corr_factor TB_delta_parallel_max.Text = Crt.delta_parallel_max ' Identification of measurement section TB_trigger_delta_x_max.Text = Crt.trigger_delta_x_max @@ -621,6 +636,14 @@ Public Class F_Main End If End Sub + ' Function to set Path to default by calibration if nothing is used by testrun + Sub UI_PopulatePath() + ' Control if all testrun pathes have a value + If TextBoxMSCT.Text = "" Then TextBoxMSCT.Text = MyPath + If TextBoxDataLS1.Text = "" Then TextBoxDataLS1.Text = MyPath + If TextBoxDataHS.Text = "" Then TextBoxDataHS.Text = MyPath + If TextBoxDataLS2.Text = "" Then TextBoxDataLS2.Text = MyPath + End Sub ' Clear the GUI Public Function fClear_VECTO_Form(ByVal Komplet As Boolean, Optional ByVal Fields As Boolean = True) As Boolean @@ -644,7 +667,6 @@ Public Class F_Main ' Calibration fields TextBoxDataC.Clear() TextBoxMSCC.Clear() - TB_rr_corr_factor.Text = 1.0 ' Test run fields TextBoxMSCT.Clear() @@ -929,8 +951,9 @@ Public Class F_Main Private Sub doResetCriteria(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCrtReset.Click ' Set the parameter to standard - installJob(New cJob()) - UI_PopulateFromJob() + If Not IsNothing(JobFile) Then + logme(8, False, format("The Job-file({0}) has changed because of criteria update", JobFile)) + End If UI_PopulateFromCriteria() End Sub @@ -956,7 +979,9 @@ Public Class F_Main Job.Criteria = newCrt Crt = newCrt End If - UI_PopulateFromJob() + If Not IsNothing(JobFile) Then + logme(8, False, format("The Job-file({0}) has changed because of criteria update", JobFile)) + End If UI_PopulateFromCriteria() End Sub @@ -1081,8 +1106,4 @@ Public Class F_Main #End Region - Private Sub ClearLogToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItemClearLog.Click - - End Sub - End Class diff --git a/CSE/IO/input.vb b/CSE/IO/input.vb index 4e153183ff07b5c08ba0f9c660ea98d281c1404c..fbca354cc302d555fe4177a381f35164a6b1bc62 100644 --- a/CSE/IO/input.vb +++ b/CSE/IO/input.vb @@ -15,6 +15,7 @@ Public Module input Sub ReadInputMSC(ByRef MSCX As cMSC, ByVal MSCfile As String, Optional ByVal calibration As Boolean = True) ' Declarations Dim i As Integer + Dim RefDID As Integer Dim RefHead As Double Dim Line() As String Using FileInMSCSpez As New cFile_V3 @@ -88,6 +89,14 @@ Public Module input Next i Else For i = 1 To MSCX.meID.Count - 1 + If i = 1 Then + RefHead = MSCX.head(i) + RefDID = MSCX.dID(i) + Else + If RefHead = MSCX.head(i) And Not RefDID = MSCX.dID(i) Then + Throw New Exception("Two different directions for same heading given. Please correct your input in the File: " & MSCfile) + End If + End If MSCX.headID.Add(1) Next i End If