diff --git a/CHANGES.md b/CHANGES.md index 8c4693551799df7897e0e26ece6490f3e7b55b27..16e826320f8cfd88415a428f297d98dc72c265b0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,11 +2,11 @@ VECTO-CSE: Changes =================== -TODO: 2014-06-??: v2.0.1 +TODO: 2014-06-25: v2.0.1 -------------------- Mostly JRC contributions (see VECTO-29 & VECTO-35): - * IO: JSON-ize preferences, vehicle, job & criteria-files EXCEPT from Track-file and Output-values. + * IO: JSON-ize preferences, vehicle, job & criteria-files EXCEPT from Track-file. * IO: CSVize all the rest files with a single header line and use '#' for comment lines. * IO: Separate config/ from Declaration/ folders. * UI: Provide default-values and help-messages in GUI/files with infos fetched from JSON-schemas. @@ -30,11 +30,14 @@ Mostly JRC contributions (see VECTO-29 & VECTO-35): More analytically: -#### 2014-06-23: v2.0.1-pre3 #### +#### 2014-06-23: v2.0.1-beta0 #### TUG & JRC improvements: - * Changed comment symbol in CSV files from 'c' --> '#' - * Unify hunits into header labels. + * json: Store run-results within the Job-file. + * csv: Ensure result-files are valid CSVs. + * csv: Changed comment symbol in CSV files from 'c' --> '#' + * csv: Unify hunits into header labels. +##### Internal: * Use Exceptions instead of CancelAsync() and error-flags in calc-routines and input.vb. * Remove unused distVincenty() func. diff --git a/CSE/ApplicationEvents.vb b/CSE/ApplicationEvents.vb index 7dfab40b2780a839e410270ddeaadc086525ba3c..595638d3a63adc7e3c64495ec159c274d2297ab0 100644 --- a/CSE/ApplicationEvents.vb +++ b/CSE/ApplicationEvents.vb @@ -1,4 +1,15 @@ -Namespace My +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Namespace My Partial Friend Class MyApplication Private Sub MyApplication_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown diff --git a/CSE/CSE.vbproj b/CSE/CSE.vbproj index d139b2ffbdf33d340516ec277782f25bb1f5b2de..17f2a44a77339ccb620d9fd5bc71707e80c5953e 100644 --- a/CSE/CSE.vbproj +++ b/CSE/CSE.vbproj @@ -116,7 +116,6 @@ <Compile Include="Classes\cValidSec.vb" /> <Compile Include="IO\cVehicle.vb" /> <Compile Include="Classes\cVirtMSC.vb" /> - <Compile Include="IO\cResults.vb" /> <Compile Include="IO\output.vb" /> <Compile Include="IO\OutputTest.vb" /> <Compile Include="Calculation\Minor_routines_calculate.vb" /> diff --git a/CSE/CSE_Globals.vb b/CSE/CSE_Globals.vb index cf694b515861d88b23b7f87f764112ffc2472bf3..aab8cdbd36bdb45eb104f1324b78261912eee474 100644 --- a/CSE/CSE_Globals.vb +++ b/CSE/CSE_Globals.vb @@ -1,4 +1,15 @@ -Module CSE_Globals +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Module CSE_Globals Public Enum tComp t lati diff --git a/CSE/Calculation/Minor_routines_calculate.vb b/CSE/Calculation/Minor_routines_calculate.vb index fae462183177727dccf7756a468945322112265e..2bf5d3dfe3a4736512ff07cba1428d44674c56d8 100644 --- a/CSE/Calculation/Minor_routines_calculate.vb +++ b/CSE/Calculation/Minor_routines_calculate.vb @@ -1,4 +1,15 @@ -Module Minor_routines_calculate +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Module Minor_routines_calculate ' Koordinat calculation Public Function KleinPkt(ByVal orgKoordX As Double, ByVal orgKoordY As Double, ByVal Tae As Double, ByVal Saf As Double, ByVal Sfp As Double) As Array ' Declaration @@ -57,7 +68,7 @@ 'Check whether Time is not reversed For i = 1 To TimeX.Count - 1 If i = 1 Then tstep = TimeX(i) - TimeX(i - 1) - If tstep + (tstep * crt.delta_Hz_max / 100) < Math.Abs(TimeX(i) - TimeX(i - 1)) Or tstep - (tstep * crt.delta_Hz_max / 100) > Math.Abs(TimeX(i) - TimeX(i - 1)) Then + If tstep + (tstep * Crt.delta_Hz_max / 100) < Math.Abs(TimeX(i) - TimeX(i - 1)) Or tstep - (tstep * Crt.delta_Hz_max / 100) > Math.Abs(TimeX(i) - TimeX(i - 1)) Then If Sprung Then logme(9, False, "Time step invalid! t(" & i - 1 & ") = " & TimeX(i - 1) & "[s], t(" & i & ") = " & TimeX(i) & "[s]") Return False @@ -128,7 +139,7 @@ 'Check whether Time is not reversed For i = 1 To TimeX.Count - 1 If i = 1 Then tstep = TimeX(i) - TimeX(i - 1) - If tstep + (tstep * crt.delta_Hz_max / 100) < Math.Abs(TimeX(i) - TimeX(i - 1)) Or tstep - (tstep * crt.delta_Hz_max / 100) > Math.Abs(TimeX(i) - TimeX(i - 1)) Then + If tstep + (tstep * Crt.delta_Hz_max / 100) < Math.Abs(TimeX(i) - TimeX(i - 1)) Or tstep - (tstep * Crt.delta_Hz_max / 100) > Math.Abs(TimeX(i) - TimeX(i - 1)) Then If Sprung Then logme(9, False, "Time step invalid! t(" & i - 1 & ") = " & TimeX(i - 1) & "[s], t(" & i & ") = " & TimeX(i) & "[s]") Return False diff --git a/CSE/Calculation/Signal_identification.vb b/CSE/Calculation/Signal_identification.vb index 08c70e9e21d2b21bba9b85bbc49edc2639d376ab..c97935ff0cfcddbeef44b63fd557ffde1faf1bc2 100644 --- a/CSE/Calculation/Signal_identification.vb +++ b/CSE/Calculation/Signal_identification.vb @@ -1,4 +1,15 @@ -Imports CSE.cCriteria +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Imports CSE.cCriteria Module Signal_identification ' Divide the signal into there directions diff --git a/CSE/Calculation/main_calculation_call.vb b/CSE/Calculation/main_calculation_call.vb index b11b59802a7fe7eaf59518f7969b066afe93b11d..e7e11f57afaff79c678208225a313affce4db92c 100644 --- a/CSE/Calculation/main_calculation_call.vb +++ b/CSE/Calculation/main_calculation_call.vb @@ -1,4 +1,15 @@ -Public Module main_calculation_call +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Public Module main_calculation_call ' Main calculation Sub calculation(ByVal isCalibrate As Boolean) diff --git a/CSE/Calculation/sub_linear_regression.vb b/CSE/Calculation/sub_linear_regression.vb index 08ec315d11c8aba9174e54041a3e9e94328d3a80..f5fd82e26db94a879306f7f61c2b23554246c200 100644 --- a/CSE/Calculation/sub_linear_regression.vb +++ b/CSE/Calculation/sub_linear_regression.vb @@ -1,4 +1,15 @@ -Module sub_linear_regression +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Module sub_linear_regression ' Main function for the calculate the regression Public Function fCalcReg(ByVal vehicle As cVehicle) As Boolean diff --git a/CSE/Classes/CResult.vb b/CSE/Classes/CResult.vb index 3a93da21ae3602d71d817e81df760c83c04bfab8..bf0ba9b5832667149b882afafce61c5328968027 100644 --- a/CSE/Classes/CResult.vb +++ b/CSE/Classes/CResult.vb @@ -1,4 +1,15 @@ -Public Class CResult +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Public Class CResult ' Declarations Public Head As String Public Unit As String diff --git a/CSE/Classes/cFile_v3.vb b/CSE/Classes/cFile_v3.vb index 84a4b235b76964f381988c71f925f0fc406ee6e5..f799abb47276203d29893f327408d2c7af5b624e 100644 --- a/CSE/Classes/cFile_v3.vb +++ b/CSE/Classes/cFile_v3.vb @@ -1,3 +1,14 @@ +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + Public Class cFile_V3 Implements IDisposable diff --git a/CSE/Classes/cGenShp.vb b/CSE/Classes/cGenShp.vb index e08af37177529f0f2ee24a77a090102461ac017a..efbc2584cc4e17f9d5cead2495ce7f5a77d4ffc2 100644 --- a/CSE/Classes/cGenShp.vb +++ b/CSE/Classes/cGenShp.vb @@ -1,4 +1,15 @@ -Public Class cGenShp +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Public Class cGenShp Public veh_class As List(Of Integer) ' vehicle class Public veh_conf As List(Of Integer) ' vehicle configuration Public fa_pe As List(Of Double) ' Fa_pe diff --git a/CSE/Classes/cMSC.vb b/CSE/Classes/cMSC.vb index dc87f253b16aeb36e89ea14e3dbac0826bc59443..0855864e01a07e9d5accd56bfca9ec2b8f8d9ebe 100644 --- a/CSE/Classes/cMSC.vb +++ b/CSE/Classes/cMSC.vb @@ -1,4 +1,15 @@ -Public Class cMSC +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Public Class cMSC Public meID As List(Of Integer) ' Measurement ID Public dID As List(Of Integer) ' Direction ID Public len As List(Of Double) ' Lenght [m] diff --git a/CSE/Classes/cUTMCoord.vb b/CSE/Classes/cUTMCoord.vb index b6b8cd8974bda7927e7ef4f57d1462d8f61af61f..9b513250aa50f282b5c5a331d8f2dcf42a7ad154 100644 --- a/CSE/Classes/cUTMCoord.vb +++ b/CSE/Classes/cUTMCoord.vb @@ -1,4 +1,15 @@ -Public Class cUTMCoord +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Public Class cUTMCoord Public Easting As Double Public Northing As Double Public Zone As Integer diff --git a/CSE/Classes/cValidSec.vb b/CSE/Classes/cValidSec.vb index 4738841ba536a0b1999e30f80bfd4c2aed94d951..82a1ade7b4f8f25cfbbe800b5abcba4809617e33 100644 --- a/CSE/Classes/cValidSec.vb +++ b/CSE/Classes/cValidSec.vb @@ -1,4 +1,15 @@ -Public Class cValidSec +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Public Class cValidSec Public NameSec As List(Of String) ' Name of the section Public AnzSec As List(Of Integer) ' Number of valid sections Public ValidSec As List(Of Boolean) ' Verify if enough sections in both directions diff --git a/CSE/Classes/cVirtMSC.vb b/CSE/Classes/cVirtMSC.vb index b46548382f15b1f16b44c490000e1c9be1397d8b..89a84e5eb9601f7b83494011cce7e1d40a064fa3 100644 --- a/CSE/Classes/cVirtMSC.vb +++ b/CSE/Classes/cVirtMSC.vb @@ -1,4 +1,15 @@ -Public Class cVirtMSC +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Public Class cVirtMSC Public meID As List(Of Integer) ' Measurement ID Public dID As List(Of Integer) ' Direction ID Public KoordA As List(Of Array) ' Latetude (start) [mm.mm] diff --git a/CSE/Classes/csKey.vb b/CSE/Classes/csKey.vb index 8869870e444eeda8f0129b588e36b16c7108e165..0744dfd5fbda12a435ef5af2509931fa58aba83f 100644 --- a/CSE/Classes/csKey.vb +++ b/CSE/Classes/csKey.vb @@ -1,4 +1,15 @@ -Public Class csKey +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Public Class csKey Public Weather As New csKeyWeather Public Meas As New csKeyMeas End Class diff --git a/CSE/GUI/FB_Dialog.vb b/CSE/GUI/FB_Dialog.vb index 30a63ac5ce974e7995cfefba59ae26dcd48a67a9..1696fa1f84b9583123e297c3a0cc42085d609f65 100644 --- a/CSE/GUI/FB_Dialog.vb +++ b/CSE/GUI/FB_Dialog.vb @@ -1,3 +1,14 @@ +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + Public Class FB_Dialog Private MyFolder As String @@ -614,7 +625,7 @@ Public Class FB_Dialog End Sub 'Select All - Click - Private Sub ButtonAll_Click(sender As System.Object, e As System.EventArgs) Handles ButtonAll.Click + Private Sub ButtonAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAll.Click Dim i As Integer Me.ListViewFiles.BeginUpdate() For i = 0 To Me.ListViewFiles.Items.Count - 1 @@ -907,7 +918,7 @@ lb1: End Sub ' New File - Private Sub NewFileToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles NewFileToolStripMenuItem.Click + Private Sub NewFileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewFileToolStripMenuItem.Click Dim File As String Dim Result As DialogResult diff --git a/CSE/GUI/FB_FavDlog.vb b/CSE/GUI/FB_FavDlog.vb index 7dad82bfbc7ee73f995dedd7ad7d6dbfcbae119f..c9ebed25e16a0d5129bc6f02c9832c5003f68cf0 100644 --- a/CSE/GUI/FB_FavDlog.vb +++ b/CSE/GUI/FB_FavDlog.vb @@ -1,4 +1,15 @@ -Imports System.Windows.Forms +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Imports System.Windows.Forms Public Class FB_FavDlog ' Load Folder history diff --git a/CSE/GUI/F_About.vb b/CSE/GUI/F_About.vb index 53d14e2a4db0ec0738b1e8551e32017be47a5f96..5e094b74298d8a725861922fa433104c9eb73cfd 100644 --- a/CSE/GUI/F_About.vb +++ b/CSE/GUI/F_About.vb @@ -1,3 +1,14 @@ +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + Public Class F_About diff --git a/CSE/GUI/F_Main.vb b/CSE/GUI/F_Main.vb index 77e92557e0fd11f1667d175346692852bae350ae..b6da9bdf07b5804178a4ca1417642ddcc5624e48 100644 --- a/CSE/GUI/F_Main.vb +++ b/CSE/GUI/F_Main.vb @@ -1,4 +1,15 @@ -Imports System.IO +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Imports System.IO Imports Newtonsoft.Json.Linq Public Class F_Main diff --git a/CSE/GUI/F_Preferences.vb b/CSE/GUI/F_Preferences.vb index 746655d513e21cb02f176173d9265b910d74ee26..3cbcb3e0315f0f335913e459c8bb4bfb042d64f2 100644 --- a/CSE/GUI/F_Preferences.vb +++ b/CSE/GUI/F_Preferences.vb @@ -1,3 +1,14 @@ +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + Imports Newtonsoft.Json.Linq Public Class F_Preferences diff --git a/CSE/GUI/cFileBrowser.vb b/CSE/GUI/cFileBrowser.vb index 83618bb88663367e4836b1f39cd8b5be7043708a..bf4cbd23ea7cee11ca5278443f74401815a10b0e 100644 --- a/CSE/GUI/cFileBrowser.vb +++ b/CSE/GUI/cFileBrowser.vb @@ -1,3 +1,14 @@ +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + Imports System.Collections 'Imports System.Windows.Forms diff --git a/CSE/IO/OutputTest.vb b/CSE/IO/OutputTest.vb index 29028418854ea19fd1754cac22b1282afaa6526c..f49162221ca44ddc9395ee966399c5d5246bc642 100644 --- a/CSE/IO/OutputTest.vb +++ b/CSE/IO/OutputTest.vb @@ -1,4 +1,15 @@ -Public Module OutputTest +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Public Module OutputTest Function fOuttest(ByVal Datafile As String) As Boolean ' Declaration Dim i As Integer diff --git a/CSE/IO/cCriteria.vb b/CSE/IO/cCriteria.vb index bf1221a790dcdcedb94ba99b9ac65b7c2251252d..b35e287ad264c532b127a67df09493956094f7f9 100644 --- a/CSE/IO/cCriteria.vb +++ b/CSE/IO/cCriteria.vb @@ -1,4 +1,15 @@ -Imports Newtonsoft.Json.Linq +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Imports Newtonsoft.Json.Linq Imports Newtonsoft.Json.Schema Public Class cCriteria diff --git a/CSE/IO/cJob.vb b/CSE/IO/cJob.vb index a2037e274cf670e61c907ed9945e4e34958cc23f..3e47212db21d6e238808feb9ad5e67dc25e49ea3 100644 --- a/CSE/IO/cJob.vb +++ b/CSE/IO/cJob.vb @@ -1,4 +1,15 @@ -Imports Newtonsoft.Json.Linq +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Imports Newtonsoft.Json.Linq Imports Newtonsoft.Json.Schema Public Class cJob diff --git a/CSE/IO/cJsonFile.vb b/CSE/IO/cJsonFile.vb index 54de58676cddfd61f50ba7caac322bba81e8cd35..924ab048259228846396bb4fca000f6eebf76b9a 100644 --- a/CSE/IO/cJsonFile.vb +++ b/CSE/IO/cJsonFile.vb @@ -1,4 +1,15 @@ -Imports Newtonsoft.Json.Linq +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Imports Newtonsoft.Json.Linq Imports Newtonsoft.Json.Schema Imports System.Globalization @@ -19,6 +30,17 @@ Imports System.Globalization ''' • /Header/BodySchema: The JSON-schema of the body will be placed HERE, for documenting file. ''' When true, it is always replaced by the Body's schema on the next save. When false, it overrides ''' application's choice and is not replaced ever. +''' +''' +''' How to Override: +''' ---------------- +''' You can extend it to add Body-content in 2 ways (and a combination o0f both is possible): +''' • With Properties: Add Properties that on Get/Set write/read directly from the body-content, +''' so the object is always in sync with the JSON-content. +''' • With public fields: Add fields that do not have any side-effect, but then the JSON-content +''' needs to get synced with those fields. This is achieved by overriding thefollowing 2 methods: +''' +''' In any case, ''' </remarks> Public MustInherit Class cJsonFile Implements ICloneable @@ -109,8 +131,11 @@ When False, it overrides Application's choice and is not replaced ever.", ''' <remarks>To signify validation-failure it can throw an exception or add err-messages into the supplied list</remarks> Protected MustOverride Sub ValidateBody(ByVal isStrict As Boolean, ByVal validateMsgs As IList(Of String)) + ''' <summary>Override this to read the JSON-content and update any fields on this instance</summary> Protected Overridable Sub OnContentUpdated() End Sub + + ''' <summary>Override this to update the JSON-content from any fields on this instance before storing it</summary> Protected Overridable Sub OnBeforeContentStored() End Sub diff --git a/CSE/IO/cPreferences.vb b/CSE/IO/cPreferences.vb index 803fdf194c63063a6f5c9397335b24cf49082b21..26350a23b721928070fb06130d69e3a9729ba76c 100644 --- a/CSE/IO/cPreferences.vb +++ b/CSE/IO/cPreferences.vb @@ -1,4 +1,15 @@ -Option Strict Off +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Option Strict Off Imports Newtonsoft.Json.Linq Imports Newtonsoft.Json.Schema diff --git a/CSE/IO/cResults.vb b/CSE/IO/cResults.vb deleted file mode 100644 index 30f7b6bacbed66d0ec40ca32afda1e04c9707223..0000000000000000000000000000000000000000 --- a/CSE/IO/cResults.vb +++ /dev/null @@ -1,195 +0,0 @@ -Imports Newtonsoft.Json.Linq -Imports Newtonsoft.Json.Schema - -Public Class cResults - Inherits cJsonFile - - Protected Overrides Function HeaderOverlay() As JObject - Return JObject.Parse(<json>{ - "Title": "vecto-cse RESULTS", - "FileVersion": "1.0.0", - }</json>.Value) - End Function - - - '' Default values are Decleration - Private Shared Function BuildBody() As JObject - Dim b, g As Object - b = New JObject() - - g = New JObject() - b.Calibration = g - g.fv_veh = 0 - g.fa_pe = 1 - g.fv_pe = 0 - g.beta_ame = 0 - - g = New JObject() - b.Evaluation = g - g.CdxA = 0 - g.beta = 0 - g.delta_CdxA = 0 - g.CdxA0 = 0 - g.CdxA0_opt2 = 0 - - g = New JObject() - b.Validity = g - g.valid_t_tire = True - g.valid_t_amb = True - g.valid_RRC = True - - Return b - End Function - - ''' <param name="isStrictBody">when true, more strict validation</param> - Public Shared Function JSchemaStr(Optional ByVal isStrictBody As Boolean = False) As String - Dim allowAdditionalProps_str As String = (Not isStrictBody).ToString.ToLower - Return <json>{ - "title": "Schema for vecto-cse RESULTS", - "type": "object", "additionalProperties": <%= allowAdditionalProps_str %>, - "required": true, - "properties": { - "Calibration": { - "type": "object", - "required": true, - "additionalProperties": <%= allowAdditionalProps_str %>, - "properties": { - "fv_veh": {"type": "number", "required": true, - "description": "Calibration factor for vehicle speed.", - }, - "fv_pe": {"type": "number", "required": true, - "description": "Calibration factor for air speed (position error).", - }, - "fa_pe": {"type": "number", "required": true, - "description": "Position error correction factor for measured air inflow angle (beta).", - }, - "beta_ame": {"type": "number", "required": true, - "description": "Calibration factor for beta (misalignment).", - "units": "°", - }, - } - }, - "Evaluation": { - "type": "object", - "required": true, - "additionalProperties": <%= allowAdditionalProps_str %>, - "properties": { - "CdxA": {"type": "number", "required": true, - "description": "Average CdxA before yaw angle correction", - "units": "m^2", - }, - "beta": {"type": "number", "required": true, - "description": "Average absolute yaw angle from high speed tests.", - "units": "m^2", - }, - "delta_CdxA": {"type": "number", "required": true, - "description": "Correction of CdxA for yaw angle.", - "units": "m^2", - }, - "CdxA0": {"type": "number", "required": true, - "description": "Correction of CdxA for zero yaw angle.", - "units": "m^2", - }, - "CdxA0_opt2": {"type": "number", "required": true, - "description": "Average CdxA for zero yaw angle (yaw angle correction performed before averaging of measurement sections).", - "units": "m^2", - }, - } - }, - "Validity": { - "type": "object", - "required": true, - "additionalProperties": <%= allowAdditionalProps_str %>, - "properties": { - "valid_t_tire": {"type": "boolean", "required": true, - "description": "Invalid if the maximum ambient temperature exceeded.", - }, - "valid_t_amb": {"type": "boolean", "required": true, - "description": "Invalid if the ambient temperature fallen below minimum.", - }, - "valid_RRC": {"type": "boolean", "required": true, - "description": "Invalid if the ambient temperature higher than allowed.", - }, - } - }, - }, - }</json>.Value - End Function - - - ''' <summary>creates defaults</summary> - ''' <remarks>See cJsonFile() constructor</remarks> - Sub New(Optional ByVal skipValidation As Boolean = False) - MyBase.New(BuildBody, skipValidation) - End Sub - ''' <summary>Reads from file or creates defaults</summary> - Sub New(ByVal foreignBody As JToken, Optional ByVal skipValidation As Boolean = False) - MyBase.New(foreignBody, skipValidation) - End Sub - - - Protected Overrides Function BodySchemaStr() As String - Return JSchemaStr() - End Function - - ''' <exception cref="SystemException">includes all validation errors</exception> - ''' <param name="isStrictBody">when true, no additional json-properties allowed in the data, when nothing, use value from Header</param> - Protected Overrides Sub ValidateBody(ByVal isStrictBody As Boolean, ByVal validateMsgs As IList(Of String)) - '' Check version - '' - Const fromVersion = "1.0.0--" - Const toVersion = "2.0.0--" ' The earliest pre-release. - If Not IsSemanticVersionsSupported(Me.FileVersion, fromVersion, toVersion) Then - validateMsgs.Add(format("Unsupported FileVersion({0}, was not in between [{1}, {2})", Me.FileVersion, fromVersion, toVersion)) - Return - End If - - '' Check schema - '' - Dim schema = JsonSchema.Parse(JSchemaStr(isStrictBody)) - ValidateJson(Body, schema, validateMsgs) - - If validateMsgs.Any() Then Return - - '' Check others - '' - End Sub - -#Region "json props" - ''' <summary>Override it to set custome fields</summary> - Protected Overrides Sub OnBeforeContentStored() - Dim g, b As Object - b = Me.Body - - g = b("Calibration") - g.fv_veh = Job.fv_veh - g.fa_pe = Job.fa_pe - g.fv_pe = Job.fv_pe - g.beta_ame = Job.beta_ame - - g = b("Evaluation") - g.CdxA = Job.CdxA - g.beta = Job.beta - g.delta_CdxA = Job.delta_CdxA - g.CdxA0 = Job.CdxA0 - g.CdxA0_opt2 = Job.CdxA0_opt2 - - g = b("Validity") - g.valid_t_tire = Job.valid_t_tire - g.valid_t_amb = Job.valid_t_amb - g.valid_RRC = Job.valid_RRC - End Sub - - ''' <summary>Do not invoke this method in vain...</summary> - Property Results As cResults - Get - Return New cResults(Me.Body("Results"), True) - End Get - Set(ByVal value As cResults) - Me.Body("Results") = value.Body - End Set - End Property - -#End Region ' json props - -End Class diff --git a/CSE/IO/cVehicle.vb b/CSE/IO/cVehicle.vb index 511811409a1a35db86e4b0d12b3377a3b2da833b..72ffd0c7229f2a5bb1bd55ef22dfc0b9fcc86d91 100644 --- a/CSE/IO/cVehicle.vb +++ b/CSE/IO/cVehicle.vb @@ -1,4 +1,15 @@ -Imports Newtonsoft.Json.Linq +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Imports Newtonsoft.Json.Linq Imports Newtonsoft.Json.Schema Public Enum VehicleConfig diff --git a/CSE/IO/input.vb b/CSE/IO/input.vb index e5ca5f5c7da6582b9277e6f7c97ca702b07d6fb2..bcbfde1c82f787e0a3ccb7fb8c7189dbada2470d 100644 --- a/CSE/IO/input.vb +++ b/CSE/IO/input.vb @@ -1,4 +1,15 @@ -' Read the input data +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +' Read the input data Public Module input ' Read the measurement section config file Sub ReadInputMSC(ByRef MSCX As cMSC, ByVal MSCfile As String, Optional ByVal calibration As Boolean = True) diff --git a/CSE/IO/output.vb b/CSE/IO/output.vb index 55b0d26d43dc57e5f7657859304b85d3f90c356e..e753737a451fca918020d1dd0c48f96a2120e689 100644 --- a/CSE/IO/output.vb +++ b/CSE/IO/output.vb @@ -1,4 +1,15 @@ -Module output +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Module output ' Function for the output of the calculated datas Function fOutDataCalc1Hz(ByVal Datafile As String, ByVal calibration As Boolean) As Boolean ' Declaration diff --git a/CSE/declaration_public.vb b/CSE/declaration_public.vb index f24e89e366e71e8e3d4407a9ecde3f6819dce8ba..daf1a39f48072bc7cb4d7bacf64ecbcd90ccaf12 100644 --- a/CSE/declaration_public.vb +++ b/CSE/declaration_public.vb @@ -1,8 +1,19 @@ -Module declaration_public +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Module declaration_public ' Description of the form Public Const AppName As String = "VECTO_CSE" ' Name of the programm - Public Const AppVers As String = "2.0.1-pre3" ' Version of the Programm + Public Const AppVers As String = "2.0.1-beta0" ' Version of the Programm Public AppDate As String ' Date of the compilation of the programm ' Control variables diff --git a/CSE/utils.vb b/CSE/utils.vb index e299d3886af0e524bdf1646ccfe7123d1a9e2331..a7bd38930a9da95e175ba493c42284bcb96f52ff 100644 --- a/CSE/utils.vb +++ b/CSE/utils.vb @@ -1,4 +1,15 @@ -Imports Newtonsoft.Json.Linq +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. + +Imports Newtonsoft.Json.Linq Imports Newtonsoft.Json Imports Newtonsoft.Json.Schema Imports System.Text.RegularExpressions @@ -263,15 +274,16 @@ Module utils Dim printEx = False Dim lbox As ListBox + Dim mtext = text If (ex IsNot Nothing) Then printEx = (logFileLevel > 1 AndAlso Prefs.logLevel <= 2) - text = format("{0} (Check {1} for details)", text, IIf(printEx, "error/warn tab", "log-file")) + mtext = format("{0} (Check {1} for details)", text, IIf(printEx, "error/warn tab", "log-file")) End If ' Always write to log-msg tab. '' lbox = F_Main.ListBoxMSG - lbox.Items.Add(text) + lbox.Items.Add(mtext) F_Main.TabPageMSG.Text = format("Messages({0})", lbox.Items.Count) ' Set the Scrollbars in the Listboxes at the end lbox.TopIndex = lbox.Items.Count - 1 @@ -295,9 +307,7 @@ Module utils End If lbox.TopIndex = lbox.Items.Count - 1 - F_Main.TabPageWar.Text = format("Warnings({0})", lbox.Items.Count) - - + lbox.Text = format("{0}({1})", label, lbox.Items.Count) End Sub