Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 8bea8456 authored by David AMO GONZALEZ's avatar David AMO GONZALEZ
Browse files

Merge branch 'feat/v27_xsd' into 'main'

Implement VECTO input for v2.7

See merge request !3
parents b1699d9d ce6e7a66
Branches main
1 merge request!3Implement VECTO input for v2.7
Pipeline #284093 passed with warnings
Showing with 32053 additions and 31660 deletions
...@@ -18,6 +18,8 @@ build/ ...@@ -18,6 +18,8 @@ build/
bld/ bld/
[Bb]in/ [Bb]in/
[Oo]bj/ [Oo]bj/
[Dd]eploy/
[Pp]ackage/
# Roslyn cache directories # Roslyn cache directories
*.ide/ *.ide/
......
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14 # Visual Studio Version 17
VisualStudioVersion = 14.0.25420.1 VisualStudioVersion = 17.12.35707.178 d17.12
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "AirDrag", "CSE\AirDrag.vbproj", "{6845E24A-D1E7-4B28-92E7-2EBF850F044B}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "AirDrag", "CSE\AirDrag.vbproj", "{6845E24A-D1E7-4B28-92E7-2EBF850F044B}"
EndProject EndProject
......
...@@ -5,7 +5,14 @@ VECTO-CSE: Development ...@@ -5,7 +5,14 @@ VECTO-CSE: Development
Before compiling you need to add/check references to: Before compiling you need to add/check references to:
* vectolic.dll * vectolic.dll
* Newtonsoft.Json.dll
In order to use the latest `Vecto Hashing` and `Vecto Common` packages add _vecto nuget registry_:
```sh
dotnet nuget add source "https://code.europa.eu/api/v4/projects/89/packages/nuget/index.json" --name "gitlab-registry" --username <USERNAME> --password <PERSONAL_ACCESS_TOKEN>
```
or for more details follow the [Vecto Wiki](https://code.europa.eu/vecto/vectoci/-/wikis/VECTO-CI/setup#vecto-users-setup).
### EXECUTE ### EXECUTE
The following directories/files must be provided in the application folder (e.g. ..\bin\Debug): The following directories/files must be provided in the application folder (e.g. ..\bin\Debug):
...@@ -17,19 +24,30 @@ The following directories/files must be provided in the application folder (e.g. ...@@ -17,19 +24,30 @@ The following directories/files must be provided in the application folder (e.g.
* DemoData/ * DemoData/
* Docs/CSE-User Manual.pdf (generated from Word-file) * Docs/CSE-User Manual.pdf (generated from Word-file)
### RELEASE ### RELEASE
For releasing follow the steps:
1. Update CHANGES.md with latest modifications
2. Run `Docs/convert_release_notes.ps1` in its containing folder.
3. Update Directory.Build.props property `<Version>` accordingly, *i.e.* `3.3.0`.
4. Build the solution in Release mode.
5. Publish the created package located under *Package* folder.
6. Update GitLab tags.
7. Send announcement email.
### DEPRECATED *RELEASE* Section
⚠️ **Deprecated method, see New Releasing section.**
Checklist to build a new release: Checklist to build a new release:
1 (ask to) Create a new "version" in JIRA. 1. (ask to) Create a new "version" in JIRA.
* Mark all resolved issues in this new version. * Mark all resolved issues in this new version.
2. Update CHANGES.md with work done since last release. 2. Update CHANGES.md with work done since last release.
3. Make zip-folder named with the "Semantic-version", ie: 2014_15_5-VECTO_CSE-2.0.1-beta1. 3. Make zip-folder named with the "Semantic-version", ie: 2014_15_5-VECTO_CSE-2.0.1-beta1.
4. Copy into it: 4. Copy into it:
* executable (`.EXE` and optionally `.PDB` when a prerelease) * executable (`.EXE` and optionally `.PDB` when a prerelease)
* vectolic.dll (check correct version) * vectolic.dll (check correct version)
* Newtonsoft.Json.dll 6.0.0
* Declaration/ (With all its files marked as READONLY!!) * Declaration/ (With all its files marked as READONLY!!)
* DemoData/ * DemoData/
* Docs/CSE-User Manual.pdf (*remember* to generate from Word-file and delete irrelevant files) * Docs/CSE-User Manual.pdf (*remember* to generate from Word-file and delete irrelevant files)
...@@ -46,7 +64,7 @@ Checklist to build a new release: ...@@ -46,7 +64,7 @@ Checklist to build a new release:
https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/ https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/
and link from: and link from:
https://webgate.ec.europa.eu/CITnet/confluence/display/VECTO_CSE/Releases https://webgate.ec.europa.eu/CITnet/confluence/display/VECTO_CSE/Releases
10. Make licenses and update private pages 1. Make licenses and update private pages
11. Tag repos in git. 2. Tag repos in git.
12. Send announcment email through JIRA (ie see VECTO-28). 3. Send announcement email through JIRA (ie see VECTO-28).
* Linking any fixed ISSUES in the announcment and Wiki's release-page. * Linking any fixed ISSUES in the announcement and Wiki's release-page.
VECTO-AirDrag: Changes VECTO-AirDrag: Changelog
=================== ===================
#### 2022-05-21: v3.2.0 #### ## v3.3.0 (2025-03-14) ##
Release of the VECTO Air Drag tool adhering to the certification regulation EU 2017/1400 as amended by (EU) 2025/258 of 7 February 2025. The tool has been updated to export new XML files and new measurement segment validity criteria. More specifically:
### Features ###
- Generate XSD v2.6 VECTO inputs
- Accept positive values for delta CFD
- Adjusts criteria and input to 3rd amendment updates:
- Change v_veh_avg_max_HS and v_veh_avg_min_HS criteria for buses
- Change v_veh_avg_max_HS and v_veh_avg_min_HS criteria for lorries
- Change t_amb_min criteria
- Change v_wind_avg_max_HS and gust criteria
- Read new required value s_brake from .csdat input
- Add <s_brake> column and values to .csdat input
- Break simulation if LowSpeed test exceeds 25 minutes
- Create package during Release build
### Refactor ###
- Do not hardcode VECTO references
## v3.2.0 (2022-05-21) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -18,7 +39,8 @@ TUG improvements: ...@@ -18,7 +39,8 @@ TUG improvements:
* Update DemoData * Update DemoData
* Update ReleaseNotes * Update ReleaseNotes
#### 2019-01-31: v3.1.9 #### ## v3.1.9 (2019-01-31) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -26,62 +48,71 @@ TUG improvements: ...@@ -26,62 +48,71 @@ TUG improvements:
* Update DemoData * Update DemoData
* Update ReleaseNotes * Update ReleaseNotes
#### 2019-01-04: v3.1.8 #### ## v3.1.8 (2019-01-04) ##
TUG improvements: TUG improvements:
* New version number * New version number
* Adaption of gearbox types on new legalisation * Adaption of gearbox types on new legalisation
* Adaption of GUI´s to only show the logo from the European Commission * Adaption of GUIs to only show the logo from the European Commission
* Update DemoData * Update DemoData
* Update ReleaseNotes * Update ReleaseNotes
* Update UserManual * Update UserManual
* Release candidate output * Release candidate output
#### 2018-06-26: v3.1.7 #### ## v3.1.7 (2018-06-26) ##
TUG improvements: TUG improvements:
* New version number * New version number
* Correction of the result output for gearbox type AT if n_eng is not given * Correction of the result output for gearbox type AT if n_eng is not given
#### 2018-02-15: v3.1.6 #### ## v3.1.6 (2018-02-15) ##
TUG improvements: TUG improvements:
* New version number * New version number
* Hotfix for VECTO Input file * Hotfix for VECTO Input file
* Culture info is automatically set to [en-US] standard * Culture info is automatically set to [en-US] standard
#### 2018-02-08: v3.1.5 #### ## v3.1.5 (2018-02-08) ##
TUG improvements: TUG improvements:
* New version number * New version number
* Hotfix for rounding method * Hotfix for rounding method
#### 2018-01-22: v3.1.4 #### ## v3.1.4 (2018-01-22) ##
TUG improvements: TUG improvements:
* New version number * New version number
* Bugfix for rounding method * Bugfix for rounding method
#### 2017-11-07: v3.1.3 #### ## v3.1.3 (2017-11-07) ##
TUG improvements: TUG improvements:
* New version number * New version number
* Bugfix for speed criterium * Bugfix for speed criterium
#### 2017-11-03: v3.1.2 #### ## v3.1.2 (2017-11-03) ##
TUG improvements: TUG improvements:
* New version number * New version number
* License module deleted * License module deleted
#### 2017-10-04: v3.1.1 #### ## v3.1.1 (2017-10-04) ##
TUG improvements: TUG improvements:
* New version number * New version number
* Bugfix for direct start option (now the VECTO input files can be created) * Bugfix for direct start option (now the VECTO input files can be created)
* Correction version number (now the version number is generated over the assembly number) * Correction version number (now the version number is generated over the assembly number)
#### 2017-07-14: v3.1.0 #### ## v3.1.0 (2017-07-14) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -91,7 +122,8 @@ TUG improvements: ...@@ -91,7 +122,8 @@ TUG improvements:
* Update ReleaseNotes * Update ReleaseNotes
* Update UserManual * Update UserManual
#### 2017-03-22: v3.0.8 #### ## v3.0.8 (2017-03-22) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -101,14 +133,16 @@ TUG improvements: ...@@ -101,14 +133,16 @@ TUG improvements:
* Update UserManual * Update UserManual
* Update JobFile * Update JobFile
#### 2017-02-03: v3.0.7 #### ## v3.0.7 (2017-02-03) ##
TUG improvements: TUG improvements:
* New version number * New version number
* Validity criterias for calibration run extended (see technical annex) * Validity criterias for calibration run extended (see technical annex)
* New calibration criterias (v_veh_1s_delta_CAL, v_veh_ave_delta_CAL) * New calibration criterias (v_veh_1s_delta_CAL, v_veh_ave_delta_CAL)
#### 2017-01-13: v3.0.5/6 #### ## v3.0.5/6 (2017-01-13) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -116,7 +150,8 @@ TUG improvements: ...@@ -116,7 +150,8 @@ TUG improvements:
* Uneven numbers of datasets per heading in calibration test now allowed * Uneven numbers of datasets per heading in calibration test now allowed
* Correction of maximum allowed vehicle high from class 1 and class 2 * Correction of maximum allowed vehicle high from class 1 and class 2
#### 2016-11-25: v3.0.3/4 #### ## v3.0.3/4 (2016-11-25) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -124,14 +159,16 @@ TUG improvements: ...@@ -124,14 +159,16 @@ TUG improvements:
* Correction of the output messages * Correction of the output messages
* Correction of the DemoData * Correction of the DemoData
#### 2016-11-25: v3.0.1/2 #### ## v3.0.1/2 (2016-11-25) ##
TUG improvements: TUG improvements:
* New version number * New version number
* Bugfix for digit check by use of GPS * Bugfix for digit check by use of GPS
* Bugfix for measurement section detection for root point calculation * Bugfix for measurement section detection for root point calculation
#### 2016-11-16: v3.0.0 #### ## v3.0.0 (2016-11-16) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -139,13 +176,15 @@ TUG improvements: ...@@ -139,13 +176,15 @@ TUG improvements:
* A license valid until 16th of March is distributed with the code. * A license valid until 16th of March is distributed with the code.
* Update DEMOData * Update DEMOData
#### 2016-11-09: v2.0.7-beta8/9 #### ## v2.0.7-beta8/9 (2016-11-09) ##
TUG improvements: TUG improvements:
* Correction of rolling resistance criteria * Correction of rolling resistance criteria
* Correction of digit test for coordinates * Correction of digit test for coordinates
#### 2016-10-20: v2.0.7-beta7 #### ## v2.0.7-beta7 (2016-10-20) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -165,8 +204,8 @@ TUG improvements: ...@@ -165,8 +204,8 @@ TUG improvements:
* Add reference vehicle high in genshape class * Add reference vehicle high in genshape class
* Add minimum/maximum vehicle high in genshape class * Add minimum/maximum vehicle high in genshape class
* Control of min/max height with vehicle height only in Declaration mode * Control of min/max height with vehicle height only in Declaration mode
* Calculation of new Result values (delta_CdxA_height; v_avg_LS/HS; t_amb_LS1, CdxA(ß)_H1/2, beta_H1/2) * Calculation of new Result values (delta_CdxA_height; v_avg_LS/HS; t_amb_LS1, CdxA_H1/2, beta_H1/2)
* Change of CdxA(ß) and beta calculation * Change of CdxA and beta calculation
* Output files in Declaration mode extended * Output files in Declaration mode extended
* Output files adapted * Output files adapted
* Expansion of the job-File due to new results * Expansion of the job-File due to new results
...@@ -177,7 +216,8 @@ TUG improvements: ...@@ -177,7 +216,8 @@ TUG improvements:
* Update of Excel DemoData file * Update of Excel DemoData file
* Update user manual and release notes * Update user manual and release notes
#### 2016-01-21: v2.0.6-beta6 #### ## v2.0.6-beta6 (2016-01-21) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -185,7 +225,8 @@ TUG improvements: ...@@ -185,7 +225,8 @@ TUG improvements:
* Bugfix old functions for day changes deleted * Bugfix old functions for day changes deleted
* Update user manual and release notes * Update user manual and release notes
#### 2015-11-25: v2.0.5-beta6 #### ## v2.0.5-beta6 (2015-11-25) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -195,7 +236,8 @@ TUG improvements: ...@@ -195,7 +236,8 @@ TUG improvements:
* Update of the ending message if an error during the calculation detected * Update of the ending message if an error during the calculation detected
* Update user manual and release notes * Update user manual and release notes
#### 2015-10-13: v2.0.4-beta6 #### ## v2.0.4-beta6 (2015-10-13) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -206,7 +248,8 @@ TUG improvements: ...@@ -206,7 +248,8 @@ TUG improvements:
* Update of the excel file * Update of the excel file
* Update error messages * Update error messages
#### 2015-07-23: v2.0.3-beta6 #### ## v2.0.3-beta6 (2015-07-23) ##
TUG improvements: TUG improvements:
* New version number * New version number
...@@ -214,10 +257,11 @@ TUG improvements: ...@@ -214,10 +257,11 @@ TUG improvements:
* Update user manual and release notes (Now always the newest version will be opened) * Update user manual and release notes (Now always the newest version will be opened)
* Deleted unused variables (FC from input data, t_amb_tamac from criteria) * Deleted unused variables (FC from input data, t_amb_tamac from criteria)
* Add ground temperature as optional signal to input data (<t_ground>) * Add ground temperature as optional signal to input data (<t_ground>)
* Add new criteria parameter t_ground_max = 40°C * Add new criteria parameter t_ground_max = 40C
* Set t_amb_max to 25°C (old 35°C) * Set t_amb_max to 25C (old 35C)
## v2.0.2-beta6 (2015-07-20) ##
#### 2015-07-20: v2.0.2-beta6 ####
TUG improvements: TUG improvements:
* Bugfix heading control * Bugfix heading control
...@@ -228,14 +272,16 @@ TUG improvements: ...@@ -228,14 +272,16 @@ TUG improvements:
* Change t_tire from required input data to optional (like p_tire) * Change t_tire from required input data to optional (like p_tire)
* Delete rho_air_ref from criteria and GUI * Delete rho_air_ref from criteria and GUI
#### 2015-07-01: v2.0.2-beta6 #### ## v2.0.2-beta6 (2015-07-01) ##
TUG improvements: TUG improvements:
* New Version number. * New Version number.
* Update region and language settings: now it is regardless of the system which settings are used ! But the file definitions are still the same * Update region and language settings: now it is regardless of the system which settings are used ! But the file definitions are still the same
* Update of the excel makro in terms of the system region and language settings * Update of the excel makro in terms of the system region and language settings
#### 2015-06-24: v2.0.2-beta5 #### ## v2.0.2-beta5 (2015-06-24) ##
Mostly TUG improvements: Mostly TUG improvements:
* FIX Job-save missing criteria (hack) * FIX Job-save missing criteria (hack)
...@@ -251,20 +297,21 @@ Mostly TUG improvements: ...@@ -251,20 +297,21 @@ Mostly TUG improvements:
* Update r_dyn calculation for each test (HS, LS1, LS2) * Update r_dyn calculation for each test (HS, LS1, LS2)
* Update DemoData * Update DemoData
* Update user manual and release notes * Update user manual and release notes
* Output folder will be now created automatically if it´s not existing without questioning * Output folder will be now created automatically if its not existing without questioning
* Welcome form added for first application start * Welcome form added for first application start
* Correction of welcome window * Correction of welcome window
* Add the Excel-makro to generate the input data into the DemoData files * Add the Excel-makro to generate the input data into the DemoData files
* New Version number. * New Version number.
#### 2015-05-21: v2.0.1-beta5 #### ## v2.0.1-beta5 (2015-05-21) ##
TUG improvements: TUG improvements:
* Handling of time steps where coordinates are constant over a certain time period (GPS accuracy issue) set gradient to 0 to avoid division by zero * Handling of time steps where coordinates are constant over a certain time period (GPS accuracy issue) set gradient to 0 to avoid division by zero
* Allow also non-continuous input data in *.csdat files * Allow also non-continuous input data in *.csdat files
* Direct start option included * Direct start option included
* Anemometer instrument calibration removed from CSE calculation * Anemometer instrument calibration removed from CSE calculation
* Update of definition of beta-signal (180° = air flow from front) * Update of definition of beta-signal (180 = air flow from front)
* Acceleration correction: true as default * Acceleration correction: true as default
* Control if heading and given direction is always the same * Control if heading and given direction is always the same
* set criteria to "standard" when CSE opens * set criteria to "standard" when CSE opens
...@@ -272,15 +319,17 @@ TUG improvements: ...@@ -272,15 +319,17 @@ TUG improvements:
* ResetCriteria and ImportCriteria do not clear main tab * ResetCriteria and ImportCriteria do not clear main tab
* New Version number. * New Version number.
#### 2014-11-13: v2.0.1-beta4 #### ## v2.0.1-beta4 (2014-11-13) ##
TUG improvements: TUG improvements:
* Bugfix linear regression calculation LS * Bugfix linear regression calculation LS
* Add control for beta angle <= 360° and calculation to +-180° if angle > +-180° * Add control for beta angle <= 360 and calculation to +-180 if angle > +-180
* Update user manual * Update user manual
* New Version number. * New Version number.
#### 2014-11-10: v2.0.1-beta3 #### ## v2.0.1-beta3 (2014-11-10) ##
TUG improvements: TUG improvements:
* Correction HS calculation * Correction HS calculation
...@@ -288,19 +337,21 @@ TUG improvements: ...@@ -288,19 +337,21 @@ TUG improvements:
* Update length calculation in csms-file to check if specified length from user and coordinates are the same * Update length calculation in csms-file to check if specified length from user and coordinates are the same
* New Version number. * New Version number.
#### 2014-09-30: v2.0.1-beta2 #### ## v2.0.1-beta2 (2014-09-30) ##
TUG improvements: TUG improvements:
* Correction GenShape Check * Correction GenShape Check
* New Version number. * New Version number.
#### 2014-09-15: v2.0.1-beta1 #### ## v2.0.1-beta1 (2014-09-15) ##
TUG improvements: TUG improvements:
* IO: Data reading corrected for first data set in measurement section file, weather file and data files. * IO: Data reading corrected for first data set in measurement section file, weather file and data files.
* New Version number. * New Version number.
TODO: 2014-06-25: v2.0.1 TODv2.0(O: 2014-06-25) .1
-------------------- --------------------
Mostly JRC contributions (see VECTO-29 & VECTO-35): Mostly JRC contributions (see VECTO-29 & VECTO-35):
...@@ -315,7 +366,7 @@ Mostly JRC contributions (see VECTO-29 & VECTO-35): ...@@ -315,7 +366,7 @@ Mostly JRC contributions (see VECTO-29 & VECTO-35):
* Possible to specify any editor (not only notepad.exe) for viewing files. * Possible to specify any editor (not only notepad.exe) for viewing files.
* Standarize versioning using [SemanticVersioning](http://semver.org/). * Standarize versioning using [SemanticVersioning](http://semver.org/).
* Welcome developers and users with README.md, CHANGES.md and COPYING.txt files. * Welcome developers and users with README.md, CHANGES.md and COPYING.txt files.
##### Internal: ### Internal:
* Implement an API for writing Header/Body json-files. * Implement an API for writing Header/Body json-files.
* Apply Object-oriented design weith resource-management when I/O files. * Apply Object-oriented design weith resource-management when I/O files.
* Sporadic fixes to work with filenames having 2-part extensions (ie `some_file.csjob.json`). * Sporadic fixes to work with filenames having 2-part extensions (ie `some_file.csjob.json`).
...@@ -328,20 +379,22 @@ Mostly JRC contributions (see VECTO-29 & VECTO-35): ...@@ -328,20 +379,22 @@ Mostly JRC contributions (see VECTO-29 & VECTO-35):
More analytically: More analytically:
#### 2014-06-23: v2.0.1-beta0 #### ## v2.0.1-beta0 (2014-06-23) ##
Mostly TUG improvements: Mostly TUG improvements:
* json: Store run-results within the Job-file. * json: Store run-results within the Job-file.
* csv: Ensure result-files are valid CSVs. * csv: Ensure result-files are valid CSVs.
* csv: Changed comment symbol in CSV files from 'c' --> '#' * csv: Changed comment symbol in CSV files from 'c' --> '#'
* csv: Unify hunits into header labels. * csv: Unify hunits into header labels.
##### Internal: ### Internal:
* Use Exceptions instead of CancelAsync() and error-flags in calc-routines and input.vb. * Use Exceptions instead of CancelAsync() and error-flags in calc-routines and input.vb.
* Remove unused distVincenty() func. * Remove unused distVincenty() func.
* Added EUPL preamble on all source-files. * Added EUPL preamble on all source-files.
#### 2014-06-04: v2.0.1-pre2 #### ## v2.0.1-pre2 (2014-06-04) ##
JRC contributions: JRC contributions:
* Convert Job & Criteria files to JSON and possible to store them separately. * Convert Job & Criteria files to JSON and possible to store them separately.
...@@ -349,7 +402,7 @@ JRC contributions: ...@@ -349,7 +402,7 @@ JRC contributions:
* Use Use WorkingDir trick for all job-file paths, so that Job-files can be ported to other computers. * Use Use WorkingDir trick for all job-file paths, so that Job-files can be ported to other computers.
* UI: Make the Log-window visible at all times (more necessary now that unhandled exceptions are appropriately reported). * UI: Make the Log-window visible at all times (more necessary now that unhandled exceptions are appropriately reported).
* UI: Setup criteria-infobox from JSON-schema. * UI: Setup criteria-infobox from JSON-schema.
##### Internal: ### Internal:
* Log unhandled exceptions. * Log unhandled exceptions.
* Gather all infos related to Job-properties (type, description, units) in a single place, the JSON-schema for the job-file. * Gather all infos related to Job-properties (type, description, units) in a single place, the JSON-schema for the job-file.
* async: Stop abusing worker-Thread with Globals, use DoWorkEventArgs instead. * async: Stop abusing worker-Thread with Globals, use DoWorkEventArgs instead.
...@@ -357,14 +410,15 @@ JRC contributions: ...@@ -357,14 +410,15 @@ JRC contributions:
* More refactorings to simplify structure of source files and folders. * More refactorings to simplify structure of source files and folders.
#### 2014-05-30: v2.0.1-pre1 #### ## v2.0.1-pre1 (2014-05-30) ##
JRC contributions: JRC contributions:
* Read/write Vehicle-file as JSON. * Read/write Vehicle-file as JSON.
* prefsUI: Add Reload button. * prefsUI: Add Reload button.
* Remember window-location (use .net Settings for that). * Remember window-location (use .net Settings for that).
* All logs (even those sent to msg-box) are written to log-file, with timestamps and stack-traces. * All logs (even those sent to msg-box) are written to log-file, with timestamps and stack-traces.
##### Internal: ### Internal:
* Start saving stack-traces into the log-file. * Start saving stack-traces into the log-file.
* Enhance JSON-files with standard header/body behavior. * Enhance JSON-files with standard header/body behavior.
* Link JSON to GUI controls (labels & toolstips) * Link JSON to GUI controls (labels & toolstips)
...@@ -372,7 +426,8 @@ JRC contributions: ...@@ -372,7 +426,8 @@ JRC contributions:
* Rework logging as a single routine, whether invoked from Background Worker or not. * Rework logging as a single routine, whether invoked from Background Worker or not.
#### 2014-05-23: v2.0.1-pre0 #### ## v2.0.1-pre0 (2014-05-23) ##
JRC contributions: JRC contributions:
* Separate config/ from Declaration/ folders. * Separate config/ from Declaration/ folders.
...@@ -380,10 +435,11 @@ JRC contributions: ...@@ -380,10 +435,11 @@ JRC contributions:
use [SemanticVersioning](http://semver.org/) 2.0.0 instead. use [SemanticVersioning](http://semver.org/) 2.0.0 instead.
* Possible to use any editor (not only notepad.exe). * Possible to use any editor (not only notepad.exe).
* Added README.md, CHANGES.md, COPYING.txt files. * Added README.md, CHANGES.md, COPYING.txt files.
##### Internal: ### Internal:
* Auto create config/ on the 1st run, converted to JSON with transparent error-handling. * Auto create config/ on the 1st run, converted to JSON with transparent error-handling.
* FIX leaking of file-descriptors by using VB's 'Using' statement (class 'cFile_v3' now implements IDisposeable). * FIX leaking of file-descriptors by using VB's 'Using' statement (class 'cFile_v3' now implements IDisposeable).
#### 2014-05-14: CSE2.01 #### ## 2014-05-14: CSE2.01 ##
1st delivery from TU-Graz under Lot-3. 1st delivery from TU-Graz under Lot-3.
...@@ -78,26 +78,52 @@ ...@@ -78,26 +78,52 @@
<ApplicationManifest>My Project\app.manifest</ApplicationManifest> <ApplicationManifest>My Project\app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\Castle.Core.4.2.0\lib\net45\Castle.Core.dll</HintPath>
<HintPath>..\Libs\JSON.Net\Net40\Newtonsoft.Json.dll</HintPath> </Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
</Reference>
<Reference Include="Newtonsoft.Json.Schema, Version=4.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.Schema.4.0.1\lib\net45\Newtonsoft.Json.Schema.dll</HintPath>
</Reference>
<Reference Include="Ninject, Version=3.3.6.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<HintPath>..\packages\Ninject.3.3.6\lib\net45\Ninject.dll</HintPath>
</Reference>
<Reference Include="Ninject.Extensions.ContextPreservation, Version=3.3.1.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<HintPath>..\packages\Ninject.Extensions.ContextPreservation.3.3.1\lib\net45\Ninject.Extensions.ContextPreservation.dll</HintPath>
</Reference>
<Reference Include="Ninject.Extensions.Factory, Version=3.3.3.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<HintPath>..\packages\Ninject.Extensions.Factory.3.3.3\lib\net45\Ninject.Extensions.Factory.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.13\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Composition.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Deployment" /> <Reference Include="System.Deployment" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Caching" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="VectoCommon, Version=3.2.0.925, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="VectoCommon, Version=4.3.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\VectoCommon.4.3.2\lib\net48\VectoCommon.dll</HintPath>
<HintPath>bin\Release\VectoCommon.dll</HintPath>
</Reference> </Reference>
<Reference Include="VectoHashing, Version=1.1.0.924, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="VectoHashing, Version=4.3.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\VectoHashing.4.3.2\lib\net48\VectoHashing.dll</HintPath>
<HintPath>bin\Release\VectoHashing.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
...@@ -253,6 +279,7 @@ ...@@ -253,6 +279,7 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" />
<None Include="Resources\Beenden.png" /> <None Include="Resources\Beenden.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -30,6 +30,7 @@ Module AirDrag_Globals ...@@ -30,6 +30,7 @@ Module AirDrag_Globals
t_amb_veh t_amb_veh
trigger trigger
user_valid user_valid
s_brake
Undefined Undefined
End Enum End Enum
...@@ -235,6 +236,8 @@ Module AirDrag_Globals ...@@ -235,6 +236,8 @@ Module AirDrag_Globals
Return tComp.trigger Return tComp.trigger
Case sKey.Meas.valid Case sKey.Meas.valid
Return tComp.user_valid Return tComp.user_valid
Case sKey.Meas.s_brake
Return tComp.s_brake
Case Else Case Else
Return tComp.Undefined Return tComp.Undefined
End Select End Select
...@@ -314,6 +317,8 @@ Module AirDrag_Globals ...@@ -314,6 +317,8 @@ Module AirDrag_Globals
Return "trigger" Return "trigger"
Case tComp.user_valid Case tComp.user_valid
Return "valid" Return "valid"
Case tComp.s_brake
Return "s_brake"
Case tComp.Undefined Case tComp.Undefined
Return "Undefined" Return "Undefined"
Case Else Case Else
...@@ -363,6 +368,8 @@ Module AirDrag_Globals ...@@ -363,6 +368,8 @@ Module AirDrag_Globals
Return "[-]" Return "[-]"
Case tComp.user_valid Case tComp.user_valid
Return "[-]" Return "[-]"
Case tComp.s_brake
Return "[-]"
Case tComp.Undefined Case tComp.Undefined
Return "[-]" Return "[-]"
Case Else Case Else
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="4.5.0.0" newVersion="6.0.0.0" /> <bindingRedirect oldVersion="4.5.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.6.0" newVersion="3.3.6.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup> <startup>
......
...@@ -77,7 +77,7 @@ Public Module main_calculation_call ...@@ -77,7 +77,7 @@ Public Module main_calculation_call
' Read the input files ' Read the input files
logme(7, False, "Reading Input Files...") logme(7, False, "Reading Input Files...")
Dim vehicle As New cVehicle(Job.vehicle_fpath) Dim vehicle As New cVehicle(Job.vehicle_fpath)
If Not fCheckVeh(3, vehicle) And Job.mode = 1 Then Throw New Exception("Accuraty of vehicle parameters not ensured!") If Not fCheckVeh(3, vehicle) And Job.mode = 1 Then Throw New Exception("Accuracy of vehicle parameters not ensured!")
ReadInputMSC(MSC, Job.coast_track_fpath, isCalibrate) ReadInputMSC(MSC, Job.coast_track_fpath, isCalibrate)
If Crt.gradient_correction Then ReadAltitudeFiles(MSC, Altdata) If Crt.gradient_correction Then ReadAltitudeFiles(MSC, Altdata)
ReadWeather(Job.ambient_fpath) ReadWeather(Job.ambient_fpath)
...@@ -676,7 +676,7 @@ Public Module main_calculation_call ...@@ -676,7 +676,7 @@ Public Module main_calculation_call
End If End If
Next i Next i
' Ceck if enough sections are detected ' Check if enough sections are detected
If SecCount.AnzSec.Count - 1 < 1 Then If SecCount.AnzSec.Count - 1 < 1 Then
Throw New Exception(format("Insufficient 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 End If
...@@ -795,7 +795,7 @@ Public Module main_calculation_call ...@@ -795,7 +795,7 @@ Public Module main_calculation_call
End If End If
Next i Next i
' Ceck if enough sections are detected ' Check if enough sections are detected
If SecCount.AnzSec.Count - 1 < 1 Then If SecCount.AnzSec.Count - 1 < 1 Then
Throw New Exception(format("Insufficient 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 End If
...@@ -819,7 +819,7 @@ Public Module main_calculation_call ...@@ -819,7 +819,7 @@ Public Module main_calculation_call
End If End If
Next i Next i
' Ceck if enough sections are detected ' Check if enough sections are detected
If anzHS1 < Crt.segruns_min_head_HS Or anzHS2 < Crt.segruns_min_head_HS Then If anzHS1 < Crt.segruns_min_head_HS Or anzHS2 < Crt.segruns_min_head_HS Then
Throw New Exception(format("Number of valid high speed datasets too low! HeadDir1: {0}; HeadDir2: {1}.", anzHS1, anzHS2)) Throw New Exception(format("Number of valid high speed datasets too low! HeadDir1: {0}; HeadDir2: {1}.", anzHS1, anzHS2))
End If End If
...@@ -834,7 +834,7 @@ Public Module main_calculation_call ...@@ -834,7 +834,7 @@ Public Module main_calculation_call
Dim igear As Double Dim igear As Double
Dim allFalse As Boolean Dim allFalse As Boolean
' Initialisation ' Initialization
Change = False Change = False
allFalse = True allFalse = True
...@@ -849,7 +849,7 @@ Public Module main_calculation_call ...@@ -849,7 +849,7 @@ Public Module main_calculation_call
' Reset the ErgValues for the criterias ' Reset the ErgValues for the criterias
ResetErgVal() ResetErgVal()
For i = 0 To ErgValues(tCompErg.SecID).Count - 1 For i = 0 To ErgValues(tCompErg.SecID).Count - 1
' Identify whitch criteria is not valid ' Identify which criteria is not valid
If ErgValues(tCompErg.user_valid)(i) = 1 Then ErgValues(tCompErg.val_User)(i) = 1 If ErgValues(tCompErg.user_valid)(i) = 1 Then ErgValues(tCompErg.val_User)(i) = 1
If ErgValues(tCompErg.v_veh)(i) < Crt.v_veh_avg_max_LS And If ErgValues(tCompErg.v_veh)(i) < Crt.v_veh_avg_max_LS And
ErgValues(tCompErg.v_veh)(i) > Crt.v_veh_avg_min_LS Then ErgValues(tCompErg.val_vVeh_avg)(i) = 1 ErgValues(tCompErg.v_veh)(i) > Crt.v_veh_avg_min_LS Then ErgValues(tCompErg.val_vVeh_avg)(i) = 1
...@@ -1179,7 +1179,8 @@ Public Module main_calculation_call ...@@ -1179,7 +1179,8 @@ Public Module main_calculation_call
tVehClass.Class40e, tVehClass.Class40e,
tVehClass.Class40f tVehClass.Class40f
Crt.tq_sum_float_delta_LS = 0.3 Crt.tq_sum_float_delta_LS = 0.3
Crt.v_veh_avg_max_HS = 103 Crt.v_veh_avg_max_HS = 102
Crt.v_veh_avg_min_HS = 97
End Select End Select
Return True Return True
End If End If
......
...@@ -42,4 +42,5 @@ Public Class csKeyMeas ...@@ -42,4 +42,5 @@ Public Class csKeyMeas
Public t_amb_veh As String = "<T_AMB_VEH>" Public t_amb_veh As String = "<T_AMB_VEH>"
Public trigger As String = "<TRIGGER>" Public trigger As String = "<TRIGGER>"
Public valid As String = "<VALID>" Public valid As String = "<VALID>"
Public s_brake As String = "<S_BRAKE>"
End Class End Class
\ No newline at end of file
...@@ -39,157 +39,254 @@ Partial Class F_VECTOInput ...@@ -39,157 +39,254 @@ Partial Class F_VECTOInput
Me.Label9 = New System.Windows.Forms.Label() Me.Label9 = New System.Windows.Forms.Label()
Me.ButtonCancel = New System.Windows.Forms.Button() Me.ButtonCancel = New System.Windows.Forms.Button()
Me.ButtonOK = New System.Windows.Forms.Button() Me.ButtonOK = New System.Windows.Forms.Button()
Me.GBCFD = New System.Windows.Forms.GroupBox()
Me.CBCFD_Enabled = New System.Windows.Forms.CheckBox()
Me.LBDeltaCFD_Unit = New System.Windows.Forms.Label()
Me.LBLicenseCFDMethod = New System.Windows.Forms.Label()
Me.LBCdACFD = New System.Windows.Forms.Label()
Me.TBCdACFD = New System.Windows.Forms.TextBox()
Me.TBLicenseCFDMethod = New System.Windows.Forms.TextBox()
Me.GBCFD.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'TBManufacturer 'TBManufacturer
' '
Me.TBManufacturer.Location = New System.Drawing.Point(171, 12) Me.TBManufacturer.Location = New System.Drawing.Point(256, 18)
Me.TBManufacturer.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.TBManufacturer.Name = "TBManufacturer" Me.TBManufacturer.Name = "TBManufacturer"
Me.TBManufacturer.Size = New System.Drawing.Size(151, 20) Me.TBManufacturer.Size = New System.Drawing.Size(224, 26)
Me.TBManufacturer.TabIndex = 0 Me.TBManufacturer.TabIndex = 0
' '
'TBModel 'TBModel
' '
Me.TBModel.Location = New System.Drawing.Point(171, 38) Me.TBModel.Location = New System.Drawing.Point(256, 58)
Me.TBModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.TBModel.Name = "TBModel" Me.TBModel.Name = "TBModel"
Me.TBModel.Size = New System.Drawing.Size(151, 20) Me.TBModel.Size = New System.Drawing.Size(224, 26)
Me.TBModel.TabIndex = 1 Me.TBModel.TabIndex = 1
' '
'TBCertNum 'TBCertNum
' '
Me.TBCertNum.Location = New System.Drawing.Point(171, 64) Me.TBCertNum.Location = New System.Drawing.Point(256, 98)
Me.TBCertNum.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.TBCertNum.Name = "TBCertNum" Me.TBCertNum.Name = "TBCertNum"
Me.TBCertNum.Size = New System.Drawing.Size(151, 20) Me.TBCertNum.Size = New System.Drawing.Size(224, 26)
Me.TBCertNum.TabIndex = 2 Me.TBCertNum.TabIndex = 2
' '
'TBCdxA 'TBCdxA
' '
Me.TBCdxA.Location = New System.Drawing.Point(171, 90) Me.TBCdxA.Location = New System.Drawing.Point(256, 138)
Me.TBCdxA.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.TBCdxA.Name = "TBCdxA" Me.TBCdxA.Name = "TBCdxA"
Me.TBCdxA.Size = New System.Drawing.Size(100, 20) Me.TBCdxA.Size = New System.Drawing.Size(148, 26)
Me.TBCdxA.TabIndex = 3 Me.TBCdxA.TabIndex = 3
' '
'TBTransR 'TBTransR
' '
Me.TBTransR.Location = New System.Drawing.Point(171, 116) Me.TBTransR.Location = New System.Drawing.Point(254, 362)
Me.TBTransR.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.TBTransR.Name = "TBTransR" Me.TBTransR.Name = "TBTransR"
Me.TBTransR.Size = New System.Drawing.Size(100, 20) Me.TBTransR.Size = New System.Drawing.Size(148, 26)
Me.TBTransR.TabIndex = 4 Me.TBTransR.TabIndex = 4
' '
'TBWorstCase 'TBWorstCase
' '
Me.TBWorstCase.Location = New System.Drawing.Point(171, 142) Me.TBWorstCase.Location = New System.Drawing.Point(254, 402)
Me.TBWorstCase.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.TBWorstCase.Name = "TBWorstCase" Me.TBWorstCase.Name = "TBWorstCase"
Me.TBWorstCase.Size = New System.Drawing.Size(100, 20) Me.TBWorstCase.Size = New System.Drawing.Size(148, 26)
Me.TBWorstCase.TabIndex = 5 Me.TBWorstCase.TabIndex = 5
' '
'Label1 'Label1
' '
Me.Label1.AutoSize = True Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(12, 15) Me.Label1.Location = New System.Drawing.Point(18, 23)
Me.Label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label1.Name = "Label1" Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(70, 13) Me.Label1.Size = New System.Drawing.Size(104, 20)
Me.Label1.TabIndex = 6 Me.Label1.TabIndex = 6
Me.Label1.Text = "Manufacturer" Me.Label1.Text = "Manufacturer"
' '
'Label2 'Label2
' '
Me.Label2.AutoSize = True Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(12, 41) Me.Label2.Location = New System.Drawing.Point(18, 63)
Me.Label2.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label2.Name = "Label2" Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(36, 13) Me.Label2.Size = New System.Drawing.Size(52, 20)
Me.Label2.TabIndex = 7 Me.Label2.TabIndex = 7
Me.Label2.Text = "Model" Me.Label2.Text = "Model"
' '
'Label3 'Label3
' '
Me.Label3.AutoSize = True Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(12, 67) Me.Label3.Location = New System.Drawing.Point(18, 103)
Me.Label3.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label3.Name = "Label3" Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(102, 13) Me.Label3.Size = New System.Drawing.Size(153, 20)
Me.Label3.TabIndex = 8 Me.Label3.TabIndex = 8
Me.Label3.Text = "Certification Number" Me.Label3.Text = "Certification Number"
' '
'Label4 'Label4
' '
Me.Label4.AutoSize = True Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(12, 93) Me.Label4.Location = New System.Drawing.Point(18, 143)
Me.Label4.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label4.Name = "Label4" Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(32, 13) Me.Label4.Size = New System.Drawing.Size(47, 20)
Me.Label4.TabIndex = 9 Me.Label4.TabIndex = 9
Me.Label4.Text = "CdxA" Me.Label4.Text = "CdxA"
' '
'Label5 'Label5
' '
Me.Label5.AutoSize = True Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(12, 119) Me.Label5.Location = New System.Drawing.Point(16, 367)
Me.Label5.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label5.Name = "Label5" Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(129, 13) Me.Label5.Size = New System.Drawing.Size(195, 20)
Me.Label5.TabIndex = 10 Me.Label5.TabIndex = 10
Me.Label5.Text = "Delta CdxA - transfer rules" Me.Label5.Text = "Delta CdxA - transfer rules"
' '
'Label6 'Label6
' '
Me.Label6.AutoSize = True Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(12, 145) Me.Label6.Location = New System.Drawing.Point(16, 407)
Me.Label6.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label6.Name = "Label6" Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(153, 13) Me.Label6.Size = New System.Drawing.Size(228, 20)
Me.Label6.TabIndex = 11 Me.Label6.TabIndex = 11
Me.Label6.Text = "Delta CdxA - worst case parent" Me.Label6.Text = "Delta CdxA - worst case parent"
' '
'Label7 'Label7
' '
Me.Label7.AutoSize = True Me.Label7.AutoSize = True
Me.Label7.Location = New System.Drawing.Point(277, 93) Me.Label7.Location = New System.Drawing.Point(416, 143)
Me.Label7.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label7.Name = "Label7" Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(18, 13) Me.Label7.Size = New System.Drawing.Size(27, 20)
Me.Label7.TabIndex = 12 Me.Label7.TabIndex = 12
Me.Label7.Text = "m²" Me.Label7.Text = "m²"
' '
'Label8 'Label8
' '
Me.Label8.AutoSize = True Me.Label8.AutoSize = True
Me.Label8.Location = New System.Drawing.Point(277, 145) Me.Label8.Location = New System.Drawing.Point(414, 407)
Me.Label8.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label8.Name = "Label8" Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(18, 13) Me.Label8.Size = New System.Drawing.Size(27, 20)
Me.Label8.TabIndex = 13 Me.Label8.TabIndex = 13
Me.Label8.Text = "m²" Me.Label8.Text = "m²"
' '
'Label9 'Label9
' '
Me.Label9.AutoSize = True Me.Label9.AutoSize = True
Me.Label9.Location = New System.Drawing.Point(277, 119) Me.Label9.Location = New System.Drawing.Point(414, 367)
Me.Label9.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label9.Name = "Label9" Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(18, 13) Me.Label9.Size = New System.Drawing.Size(27, 20)
Me.Label9.TabIndex = 14 Me.Label9.TabIndex = 14
Me.Label9.Text = "m²" Me.Label9.Text = "m²"
' '
'ButtonCancel 'ButtonCancel
' '
Me.ButtonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.ButtonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.ButtonCancel.Location = New System.Drawing.Point(247, 181) Me.ButtonCancel.Location = New System.Drawing.Point(368, 462)
Me.ButtonCancel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.ButtonCancel.Name = "ButtonCancel" Me.ButtonCancel.Name = "ButtonCancel"
Me.ButtonCancel.Size = New System.Drawing.Size(75, 23) Me.ButtonCancel.Size = New System.Drawing.Size(112, 35)
Me.ButtonCancel.TabIndex = 15 Me.ButtonCancel.TabIndex = 15
Me.ButtonCancel.Text = "Cancel" Me.ButtonCancel.Text = "Cancel"
Me.ButtonCancel.UseVisualStyleBackColor = True Me.ButtonCancel.UseVisualStyleBackColor = True
' '
'ButtonOK 'ButtonOK
' '
Me.ButtonOK.Location = New System.Drawing.Point(166, 181) Me.ButtonOK.Location = New System.Drawing.Point(247, 462)
Me.ButtonOK.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.ButtonOK.Name = "ButtonOK" Me.ButtonOK.Name = "ButtonOK"
Me.ButtonOK.Size = New System.Drawing.Size(75, 23) Me.ButtonOK.Size = New System.Drawing.Size(112, 35)
Me.ButtonOK.TabIndex = 16 Me.ButtonOK.TabIndex = 16
Me.ButtonOK.Text = "OK" Me.ButtonOK.Text = "OK"
Me.ButtonOK.UseVisualStyleBackColor = True Me.ButtonOK.UseVisualStyleBackColor = True
' '
'GBCFD
'
Me.GBCFD.Controls.Add(Me.CBCFD_Enabled)
Me.GBCFD.Controls.Add(Me.LBDeltaCFD_Unit)
Me.GBCFD.Controls.Add(Me.LBLicenseCFDMethod)
Me.GBCFD.Controls.Add(Me.LBCdACFD)
Me.GBCFD.Controls.Add(Me.TBCdACFD)
Me.GBCFD.Controls.Add(Me.TBLicenseCFDMethod)
Me.GBCFD.Location = New System.Drawing.Point(22, 172)
Me.GBCFD.Name = "GBCFD"
Me.GBCFD.Size = New System.Drawing.Size(458, 182)
Me.GBCFD.TabIndex = 17
Me.GBCFD.TabStop = False
Me.GBCFD.Text = "CFD"
'
'CBCFD_Enabled
'
Me.CBCFD_Enabled.AutoSize = True
Me.CBCFD_Enabled.Location = New System.Drawing.Point(22, 29)
Me.CBCFD_Enabled.Name = "CBCFD_Enabled"
Me.CBCFD_Enabled.Size = New System.Drawing.Size(94, 24)
Me.CBCFD_Enabled.TabIndex = 22
Me.CBCFD_Enabled.Text = "Enabled"
Me.CBCFD_Enabled.UseVisualStyleBackColor = True
'
'LBDeltaCFD_Unit
'
Me.LBDeltaCFD_Unit.AutoSize = True
Me.LBDeltaCFD_Unit.Location = New System.Drawing.Point(413, 69)
Me.LBDeltaCFD_Unit.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.LBDeltaCFD_Unit.Name = "LBDeltaCFD_Unit"
Me.LBDeltaCFD_Unit.Size = New System.Drawing.Size(27, 20)
Me.LBDeltaCFD_Unit.TabIndex = 20
Me.LBDeltaCFD_Unit.Text = "m²"
'
'LBLicenseCFDMethod
'
Me.LBLicenseCFDMethod.AutoSize = True
Me.LBLicenseCFDMethod.Location = New System.Drawing.Point(18, 109)
Me.LBLicenseCFDMethod.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.LBLicenseCFDMethod.Name = "LBLicenseCFDMethod"
Me.LBLicenseCFDMethod.Size = New System.Drawing.Size(219, 20)
Me.LBLicenseCFDMethod.TabIndex = 21
Me.LBLicenseCFDMethod.Text = "License Number CFD Method"
'
'LBCdACFD
'
Me.LBCdACFD.AutoSize = True
Me.LBCdACFD.Location = New System.Drawing.Point(18, 69)
Me.LBCdACFD.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.LBCdACFD.Name = "LBCdACFD"
Me.LBCdACFD.Size = New System.Drawing.Size(135, 20)
Me.LBCdACFD.TabIndex = 19
Me.LBCdACFD.Text = "Delta CdxA - CFD"
'
'TBCdACFD
'
Me.TBCdACFD.Location = New System.Drawing.Point(253, 64)
Me.TBCdACFD.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.TBCdACFD.Name = "TBCdACFD"
Me.TBCdACFD.Size = New System.Drawing.Size(148, 26)
Me.TBCdACFD.TabIndex = 18
'
'TBLicenseCFDMethod
'
Me.TBLicenseCFDMethod.Location = New System.Drawing.Point(19, 136)
Me.TBLicenseCFDMethod.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.TBLicenseCFDMethod.Name = "TBLicenseCFDMethod"
Me.TBLicenseCFDMethod.Size = New System.Drawing.Size(382, 26)
Me.TBLicenseCFDMethod.TabIndex = 3
'
'F_VECTOInput 'F_VECTOInput
' '
Me.AcceptButton = Me.ButtonOK Me.AcceptButton = Me.ButtonOK
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.ButtonCancel Me.CancelButton = Me.ButtonCancel
Me.ClientSize = New System.Drawing.Size(334, 216) Me.ClientSize = New System.Drawing.Size(501, 519)
Me.Controls.Add(Me.GBCFD)
Me.Controls.Add(Me.ButtonOK) Me.Controls.Add(Me.ButtonOK)
Me.Controls.Add(Me.ButtonCancel) Me.Controls.Add(Me.ButtonCancel)
Me.Controls.Add(Me.Label9) Me.Controls.Add(Me.Label9)
...@@ -207,8 +304,11 @@ Partial Class F_VECTOInput ...@@ -207,8 +304,11 @@ Partial Class F_VECTOInput
Me.Controls.Add(Me.TBCertNum) Me.Controls.Add(Me.TBCertNum)
Me.Controls.Add(Me.TBModel) Me.Controls.Add(Me.TBModel)
Me.Controls.Add(Me.TBManufacturer) Me.Controls.Add(Me.TBManufacturer)
Me.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Name = "F_VECTOInput" Me.Name = "F_VECTOInput"
Me.Text = "F_VECTOInput" Me.Text = "F_VECTOInput"
Me.GBCFD.ResumeLayout(False)
Me.GBCFD.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
...@@ -231,4 +331,11 @@ Partial Class F_VECTOInput ...@@ -231,4 +331,11 @@ Partial Class F_VECTOInput
Friend WithEvents Label9 As Label Friend WithEvents Label9 As Label
Friend WithEvents ButtonCancel As Button Friend WithEvents ButtonCancel As Button
Friend WithEvents ButtonOK As Button Friend WithEvents ButtonOK As Button
Friend WithEvents GBCFD As GroupBox
Friend WithEvents TBLicenseCFDMethod As TextBox
Friend WithEvents LBDeltaCFD_Unit As Label
Friend WithEvents LBCdACFD As Label
Friend WithEvents TBCdACFD As TextBox
Friend WithEvents LBLicenseCFDMethod As Label
Friend WithEvents CBCFD_Enabled As CheckBox
End Class End Class
Imports System.IO Imports System.IO
Imports System.Xml Imports System.Xml
Imports TUGraz.VectoHashing Imports TUGraz.VectoHashing
Imports TUGraz.VectoCommon
Public Class F_VECTOInput Public Class F_VECTOInput
' Declaration ' Declaration
Dim componentNamespace As XNamespace = "urn:tugraz:ivt:VectoAPI:DeclarationComponent:v1.0" Dim componentNamespace As XNamespace = "urn:tugraz:ivt:VectoAPI:DeclarationComponent:v1.0"
Dim componentNamespaceV22 As XNamespace = "urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.2"
Dim tns As XNamespace = "urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" Dim tns As XNamespace = "urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0"
' Load GUI ' Load GUI
...@@ -34,6 +34,9 @@ Public Class F_VECTOInput ...@@ -34,6 +34,9 @@ Public Class F_VECTOInput
TBManufacturer.Text = VECTOconf.Manufacturer TBManufacturer.Text = VECTOconf.Manufacturer
TBTransR.Text = 0 TBTransR.Text = 0
TBWorstCase.Text = 0 TBWorstCase.Text = 0
CBCFD_Enabled.Checked = False
EnableCFDComponents(CBCFD_Enabled.Checked)
End Sub End Sub
' Get values from GUI and put in config values ' Get values from GUI and put in config values
...@@ -45,10 +48,20 @@ Public Class F_VECTOInput ...@@ -45,10 +48,20 @@ Public Class F_VECTOInput
value.AppVers = AppName & " " & AppVers value.AppVers = AppName & " " & AppVers
value.TransfR = Convert.ToDouble(Me.TBTransR.Text) value.TransfR = Convert.ToDouble(Me.TBTransR.Text)
value.WorstCase = Convert.ToDouble(Me.TBWorstCase.Text) value.WorstCase = Convert.ToDouble(Me.TBWorstCase.Text)
value.CdxACFD = If(String.IsNullOrEmpty(Me.TBCdACFD.Text), Nothing, Convert.ToDouble(Me.TBCdACFD.Text))
value.LicenseNumberMethodCFD = Me.TBLicenseCFDMethod.Text
End Sub
Private Sub EnableCFDComponents(enabled As Boolean)
Me.TBCdACFD.Enabled = enabled
Me.LBCdACFD.Enabled = enabled
Me.LBDeltaCFD_Unit.Enabled = enabled
Me.TBLicenseCFDMethod.Enabled = enabled
Me.LBLicenseCFDMethod.Enabled = enabled
End Sub End Sub
#Region "Buttons" #Region "Buttons"
' Cacnel ' Cancel
Private Sub ButtonCancel_Click(sender As Object, e As EventArgs) Handles ButtonCancel.Click Private Sub ButtonCancel_Click(sender As Object, e As EventArgs) Handles ButtonCancel.Click
Me.Close() Me.Close()
End Sub End Sub
...@@ -79,6 +92,7 @@ Public Class F_VECTOInput ...@@ -79,6 +92,7 @@ Public Class F_VECTOInput
If check Then If check Then
' Write the xml file and Hashing ' Write the xml file and Hashing
Call AirDragDocument() Call AirDragDocument()
Call AirDragDocumentV26()
' Message ' Message
logme(7, False, "Generation of the VECTO input file successful.") logme(7, False, "Generation of the VECTO input file successful.")
...@@ -131,10 +145,31 @@ Public Class F_VECTOInput ...@@ -131,10 +145,31 @@ Public Class F_VECTOInput
If input < 0 Or input > 0.2 Then If input < 0 Or input > 0.2 Then
TBWorstCase.Clear() TBWorstCase.Clear()
MessageBox.Show("only values between 0 and 0.2 are allowed. Please correct your input.") MessageBox.Show(
"Only values between 0 and 0.2 are allowed. Please correct the input.",
"Incorrect input value",
MessageBoxButtons.OK,
MessageBoxIcon.Warning)
TBWorstCase.Focus() TBWorstCase.Focus()
End If End If
End Sub End Sub
Private Sub TBCdACFD_Leave(sender As Object, e As EventArgs) Handles TBCdACFD.Leave
Dim inputValue As Double = TBCdACFD.Text
If inputValue < 0 Then
TBCdACFD.Clear()
MessageBox.Show(
"Only values greater than 0 are allowed. Please correct the input.",
"Incorrect input value",
MessageBoxButtons.OK,
MessageBoxIcon.Warning)
End If
End Sub
Private Sub CBCFD_Enabled_CheckedChanged(sender As Object, e As EventArgs) Handles CBCFD_Enabled.CheckedChanged
EnableCFDComponents(CBCFD_Enabled.Checked)
End Sub
#End Region #End Region
#Region "Hashing & xml File" #Region "Hashing & xml File"
...@@ -153,6 +188,21 @@ Public Class F_VECTOInput ...@@ -153,6 +188,21 @@ Public Class F_VECTOInput
Return True Return True
End Function End Function
Private Function AirDragDocumentV26() As Boolean
Dim stream As MemoryStream = New MemoryStream()
Dim writer As StreamWriter = New StreamWriter(stream)
writer.Write(GenerateComponentDocumentV26(CreateAirdragV26(componentNamespaceV22)))
writer.Flush()
stream.Seek(0, SeekOrigin.Begin)
Dim h = VectoHash.Load(stream)
Dim Report As XDocument = h.AddHash()
Report.Save(OutFolder & fName(JobFile, False) & "_v26.xml")
Return True
End Function
Protected Function GenerateComponentDocument(content As XElement) As XDocument Protected Function GenerateComponentDocument(content As XElement) As XDocument
' Declaration ' Declaration
Dim xsi = XNamespace.[Get]("http://www.w3.org/2001/XMLSchema-instance") Dim xsi = XNamespace.[Get]("http://www.w3.org/2001/XMLSchema-instance")
...@@ -192,5 +242,68 @@ Public Class F_VECTOInput ...@@ -192,5 +242,68 @@ Public Class F_VECTOInput
New XElement(tns + "TransferredCdxA", Math.Round(VECTOconf.CdxA + VECTOconf.TransfR, 2, MidpointRounding.AwayFromZero).ToString("0.00")), New XElement(tns + "TransferredCdxA", Math.Round(VECTOconf.CdxA + VECTOconf.TransfR, 2, MidpointRounding.AwayFromZero).ToString("0.00")),
New XElement(tns + "DeclaredCdxA", Math.Round((VECTOconf.CdxA + VECTOconf.TransfR + VECTOconf.WorstCase), 2, MidpointRounding.AwayFromZero).ToString("0.00")))) New XElement(tns + "DeclaredCdxA", Math.Round((VECTOconf.CdxA + VECTOconf.TransfR + VECTOconf.WorstCase), 2, MidpointRounding.AwayFromZero).ToString("0.00"))))
End Function End Function
Protected Function GenerateComponentDocumentV26(content As XElement) As XDocument
' Declaration
Dim xsi = XNamespace.[Get]("http://www.w3.org/2001/XMLSchema-instance")
Dim SchemaVersion As String = "2.0"
Dim SchemaLocationBaseUrl As String = "https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/XML/XSD/"
Dim ns = "urn:tugraz:ivt:VectoAPI:DeclarationDefinitions"
Dim xmlnsComponent = "urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.2"
Dim xmlns As XNamespace = "urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.2"
Dim component = New XDocument()
component.Add(New XElement(componentNamespaceV22 + "VectoInputDeclaration",
New XAttribute("schemaVersion", SchemaVersion),
New XAttribute(XNamespace.Xmlns + "xsi", xsi.NamespaceName),
New XAttribute("xmlns", xmlns),
New XAttribute(XNamespace.Xmlns + "v2.0", $"{ns}:v2.0"),
New XAttribute(XNamespace.Xmlns + "v2.3", $"{ns}:v2.3"),
New XAttribute(XNamespace.Xmlns + "v2.6", $"{ns}:v2.6"),
New XAttribute(XNamespace.Xmlns + "tns", componentNamespaceV22),
New XAttribute(xsi + "schemaLocation", String.Format("{0} {1}VectoComponent.xsd", componentNamespaceV22, SchemaLocationBaseUrl)),
content))
Return component
End Function
Protected Function CreateAirdragV26(ns As XNamespace)
Dim AppVersx As String
Dim xsi = XNamespace.[Get]("http://www.w3.org/2001/XMLSchema-instance")
If RELEASE_CANDIDATE Then
AppVersx = AppVers + " - RELEASE CANDIDATE, NOT FOR CERTIFICATION!"
ElseIf BETA_VERSION Then
AppVersx = AppVers + " - BETA VERSION, NOT FOR CERTIFICATION!"
Else
AppVersx = AppVers
End If
Dim v26 = "v2.6"
Dim v20Namespace As XNamespace = "urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"
Dim v26Namespace As XNamespace = $"urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:{v26}"
Dim cfdXElements
If (VECTOconf.CdxACFD IsNot Nothing And Not String.IsNullOrEmpty(VECTOconf.LicenseNumberMethodCFD)) Then
cfdXElements = New XElement() {
New XElement(v26Namespace + "DeltaCdxA_CFD", Math.Round((VECTOconf.CdxACFD.Value), 2, MidpointRounding.AwayFromZero).ToString("0.00")),
New XElement(v26Namespace + "LicenseNumberCFDMethod", VECTOconf.LicenseNumberMethodCFD)}
Else
cfdXElements = New XElement() {}
End If
Return New XElement(ns + "AirDrag",
New XElement(v20Namespace + "Data",
New XAttribute(xsi + "type", $"{v26}:AirDragDataDeclarationType"),
New XElement(v26Namespace + "Manufacturer", VECTOconf.Manufacturer),
New XElement(v26Namespace + "Model", VECTOconf.Model),
New XElement(v26Namespace + "CertificationNumber", VECTOconf.CertNum),
New XElement(v26Namespace + "Date", XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc)),
New XElement(v26Namespace + "AppVersion", "VECTOAirDrag_" + AppVersx),
New XElement(v26Namespace + "CdxA_0", Math.Round(VECTOconf.CdxA, 2, MidpointRounding.AwayFromZero).ToString("0.00")),
cfdXElements,
New XElement(v26Namespace + "DeltaCdxA_declared", Math.Round((VECTOconf.WorstCase), 2, MidpointRounding.AwayFromZero).ToString("0.00")),
New XElement(v26Namespace + "DeltaTransferredCdxA", Math.Round(VECTOconf.TransfR, 2, MidpointRounding.AwayFromZero).ToString("0.00"))))
End Function
#End Region #End Region
End Class End Class
\ No newline at end of file
...@@ -22,7 +22,7 @@ Public Class cCriteria ...@@ -22,7 +22,7 @@ Public Class cCriteria
}</json>.Value) }</json>.Value)
End Function End Function
'' Default values are Decleration '' Default values are Declaration
Private Shared Function BuildBody() As JObject Private Shared Function BuildBody() As JObject
Dim b, g As Object Dim b, g As Object
b = New JObject() b = New JObject()
...@@ -54,8 +54,8 @@ Public Class cCriteria ...@@ -54,8 +54,8 @@ Public Class cCriteria
g.delta_Hz_max = 1 g.delta_Hz_max = 1
g.delta_parallel_max = 20 g.delta_parallel_max = 20
g.v_wind_avg_max_CAL = 5 g.v_wind_avg_max_CAL = 4
g.v_wind_1s_max_CAL = 8 g.v_wind_1s_max_CAL = 7
g.beta_avg_max_CAL = 5 g.beta_avg_max_CAL = 5
g.v_veh_1s_delta_CAL = 1 g.v_veh_1s_delta_CAL = 1
g.v_veh_ave_delta_CAL = 2 g.v_veh_ave_delta_CAL = 2
...@@ -68,18 +68,18 @@ Public Class cCriteria ...@@ -68,18 +68,18 @@ Public Class cCriteria
g.tq_sum_float_delta_LS = 0.3 g.tq_sum_float_delta_LS = 0.3
g.delta_n_ec_LS = 0.02 g.delta_n_ec_LS = 0.02
g.v_wind_avg_max_HS = 5 g.v_wind_avg_max_HS = 4
g.v_wind_1s_max_HS = 8 g.v_wind_1s_max_HS = 7
g.beta_avg_max_HS = 3 g.beta_avg_max_HS = 3
g.v_veh_avg_min_HS = 85 g.v_veh_avg_min_HS = 87
g.v_veh_avg_max_HS = 95 g.v_veh_avg_max_HS = 92
g.tq_sum_1s_delta_HS = 0.2 g.tq_sum_1s_delta_HS = 0.2
g.delta_n_ec_HS = 0.02 g.delta_n_ec_HS = 0.02
g.v_veh_1s_delta_HS = 0.3 g.v_veh_1s_delta_HS = 0.3
g.delta_v_avg_min_HS = 3 g.delta_v_avg_min_HS = 3
g.delta_rr_max = 0.4 g.delta_rr_max = 0.4
g.t_amb_min = 0 g.t_amb_min = 5
g.t_amb_max = 25 g.t_amb_max = 25
g.t_ground_max = 40 g.t_ground_max = 40
...@@ -241,7 +241,7 @@ Public Class cCriteria ...@@ -241,7 +241,7 @@ Public Class cCriteria
"units": "km/h", "units": "km/h",
}, },
"v_veh_avg_max_HS": {"type": "number", "required": true, "v_veh_avg_max_HS": {"type": "number", "required": true,
"description": "Maximum average vehicle speed (high speed). 103 km/h for buses", "description": "Maximum average vehicle speed (high speed). 102 km/h for buses",
"units": "km/h", "units": "km/h",
}, },
"v_veh_1s_delta_HS": {"type": "number", "required": true, "v_veh_1s_delta_HS": {"type": "number", "required": true,
...@@ -319,7 +319,7 @@ Public Class cCriteria ...@@ -319,7 +319,7 @@ Public Class cCriteria
'' Check schema '' Check schema
'' ''
Dim schema = JsonSchema.Parse(JSchemaStr(isStrictBody)) Dim schema = JSchema.Parse(JSchemaStr(isStrictBody))
ValidateJson(Body, schema, validateMsgs) ValidateJson(Body, schema, validateMsgs)
If validateMsgs.Any() Then Return If validateMsgs.Any() Then Return
......
...@@ -283,7 +283,7 @@ Public Class cJob ...@@ -283,7 +283,7 @@ Public Class cJob
'' Check schema '' Check schema
'' ''
Dim schema = JsonSchema.Parse(JSchemaStr(isStrictBody)) Dim schema = JSchema.Parse(JSchemaStr(isStrictBody))
ValidateJson(Body, schema, validateMsgs) ValidateJson(Body, schema, validateMsgs)
If validateMsgs.Any() Then Return If validateMsgs.Any() Then Return
......
...@@ -263,7 +263,7 @@ When False, it overrides Application's choice and is not replaced ever.", ...@@ -263,7 +263,7 @@ When False, it overrides Application's choice and is not replaced ever.",
If prefs Is Nothing Then prefs = AirDrag.Prefs If prefs Is Nothing Then prefs = AirDrag.Prefs
Dim validateMsgs As IList(Of String) = New List(Of String) Dim validateMsgs As IList(Of String) = New List(Of String)
Dim fileSchema = JsonSchema.Parse(JSchemaStr_Header(strictHeader)) Dim fileSchema = JSchema.Parse(JSchemaStr_Header(strictHeader))
'' Validate Header '' Validate Header
'' ''
......
...@@ -155,7 +155,7 @@ in the `/Header/CreatedBy` property of JSON-files, for protecting its privacy.", ...@@ -155,7 +155,7 @@ in the `/Header/CreatedBy` property of JSON-files, for protecting its privacy.",
'' Check schema '' Check schema
'' ''
Dim schema = JsonSchema.Parse(JSchemaStr(isStrictBody)) Dim schema = JSchema.Parse(JSchemaStr(isStrictBody))
ValidateJson(Me.Body, schema, validateMsgs) ValidateJson(Me.Body, schema, validateMsgs)
End Sub End Sub
......
...@@ -37,6 +37,8 @@ Public Class cVECTOconfig ...@@ -37,6 +37,8 @@ Public Class cVECTOconfig
' "CdxA": 0, ' "CdxA": 0,
' "TransfR": 0, ' "TransfR": 0,
' "WorstCase": 0, ' "WorstCase": 0,
' "CdxACFD": null,
' "LicenseNumberMethodCFD": "",
' }</json>.Value) ' }</json>.Value)
End Function End Function
...@@ -92,6 +94,19 @@ Public Class cVECTOconfig ...@@ -92,6 +94,19 @@ Public Class cVECTOconfig
"default": 0, "default": 0,
"description": "The Delta CdxA - worst case parent", "description": "The Delta CdxA - worst case parent",
}, },
"LicenseNumberMethodCFD": {
"title": "License Number Method CFD",
"type": ["string", "null"],
"default": null,
"description": "The License Number Method CFD.",
},
"CdxACFD": {
"title": "Delta CdxA - CFD",
"type": "number",
"default": null,
"minimum": 0,
"description": "The Delta CdxA - CFD",
},
} }
}</json>.Value }</json>.Value
End Function End Function
...@@ -126,7 +141,7 @@ Public Class cVECTOconfig ...@@ -126,7 +141,7 @@ Public Class cVECTOconfig
'' Check schema '' Check schema
'' ''
Dim schema = JsonSchema.Parse(JSchemaStr(isStrictBody)) Dim schema = JSchema.Parse(JSchemaStr(isStrictBody))
ValidateJson(Me.Body, schema, validateMsgs) ValidateJson(Me.Body, schema, validateMsgs)
End Sub End Sub
...@@ -194,5 +209,23 @@ Public Class cVECTOconfig ...@@ -194,5 +209,23 @@ Public Class cVECTOconfig
End Set End Set
End Property End Property
Public Property LicenseNumberMethodCFD As String
Get
Return PropOrDefault(".LicenseNumberMethodCFD")
End Get
Set(ByVal value As String)
Me.Body("LicenseNumberMethodCFD") = value
End Set
End Property
Public Property CdxACFD As Double?
Get
Return PropOrDefault(".CdxACFD")
End Get
Set(ByVal value As Double?)
Me.Body("CdxACFD") = value
End Set
End Property
#End Region ' "json props" #End Region ' "json props"
End Class End Class
...@@ -392,15 +392,15 @@ The generic parameters for classes are stored in the GenShape.shp", ...@@ -392,15 +392,15 @@ The generic parameters for classes are stored in the GenShape.shp",
' Check schema ' Check schema
If (Me.FileVersion = "1.0.0") Then If (Me.FileVersion = "1.0.0") Then
Dim schema = JsonSchema.Parse(JSchemaStrV100(isStrictBody)) Dim schema = JSchema.Parse(JSchemaStrV100(isStrictBody))
ValidateJson(Body, schema, validateMsgs) ValidateJson(Body, schema, validateMsgs)
IsOldVeh = True IsOldVeh = True
ElseIf (Me.FileVersion = "1.0.1") Then ElseIf (Me.FileVersion = "1.0.1") Then
Dim schema = JsonSchema.Parse(JSchemaStrV101(isStrictBody)) Dim schema = JSchema.Parse(JSchemaStrV101(isStrictBody))
ValidateJson(Body, schema, validateMsgs) ValidateJson(Body, schema, validateMsgs)
IsOldVeh = False IsOldVeh = False
Else Else
Dim schema = JsonSchema.Parse(JSchemaStrV102(isStrictBody)) Dim schema = JSchema.Parse(JSchemaStrV102(isStrictBody))
ValidateJson(Body, schema, validateMsgs) ValidateJson(Body, schema, validateMsgs)
IsOldVeh = False IsOldVeh = False
End If End If
...@@ -420,9 +420,9 @@ The generic parameters for classes are stored in the GenShape.shp", ...@@ -420,9 +420,9 @@ The generic parameters for classes are stored in the GenShape.shp",
If IsNothing(Me.Body("vVehMax")) Then If IsNothing(Me.Body("vVehMax")) Then
Select Case Me.classCode Select Case Me.classCode
Case tVehClass.Class1, tVehClass.Class2, tVehClass.Class3, tVehClass.Class4, tVehClass.Class5, tVehClass.Class9, tVehClass.Class10, tVehClass.Class53, tVehClass.Class54 Case tVehClass.Class1, tVehClass.Class2, tVehClass.Class3, tVehClass.Class4, tVehClass.Class5, tVehClass.Class9, tVehClass.Class10, tVehClass.Class53, tVehClass.Class54
Me.Body("vVehMax") = 95 Me.Body("vVehMax") = 92
Case Else Case Else
Me.Body("vVehMax") = 103 Me.Body("vVehMax") = 102
End Select End Select
End If End If
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
' See the LICENSE.txt for the specific language governing permissions and limitations. ' See the LICENSE.txt for the specific language governing permissions and limitations.
' Read the input data ' Read the input data
Public Module input Public Module input
' Read the measurement section config file ' Read the measurement section config file
Sub ReadInputMSC(ByRef MSCX As cMSC, ByVal MSCfile As String, Optional ByVal calibration As Boolean = True) Sub ReadInputMSC(ByRef MSCX As cMSC, ByVal MSCfile As String, Optional ByVal calibration As Boolean = True)
' Declarations ' Declarations
...@@ -422,12 +424,13 @@ Public Module input ...@@ -422,12 +424,13 @@ Public Module input
Dim Comp As tComp Dim Comp As tComp
Dim MeasCheck As New Dictionary(Of tComp, Boolean) Dim MeasCheck As New Dictionary(Of tComp, Boolean)
Dim sKVM As New KeyValuePair(Of tComp, Boolean) Dim sKVM As New KeyValuePair(Of tComp, Boolean)
Dim Spalten As New Dictionary(Of tComp, Integer) Dim Spalten As New Dictionary(Of tComp, Integer) ' Spalten -> Columns
Dim sKV As New KeyValuePair(Of tComp, Integer) Dim sKV As New KeyValuePair(Of tComp, Integer)
Dim SpaltenUndef As New Dictionary(Of String, Integer) Dim SpaltenUndef As New Dictionary(Of String, Integer)
Dim sKVUndef As New KeyValuePair(Of String, Integer) Dim sKVUndef As New KeyValuePair(Of String, Integer)
Dim EnumStr As tCompCali Dim EnumStr As tCompCali
Dim UTMCoord As New cUTMCoord Dim UTMCoord As New cUTMCoord
Dim LowSpeedTestMaxDuration As Double = 25 * 60 ' 25 minutes in seconds
' Initialise ' Initialise
tDim = -1 tDim = -1
...@@ -478,6 +481,7 @@ Public Module input ...@@ -478,6 +481,7 @@ Public Module input
MeasCheck.Add(tComp.t_amb_veh, False) MeasCheck.Add(tComp.t_amb_veh, False)
MeasCheck.Add(tComp.trigger, False) MeasCheck.Add(tComp.trigger, False)
MeasCheck.Add(tComp.user_valid, False) MeasCheck.Add(tComp.user_valid, False)
MeasCheck.Add(tComp.s_brake, False)
'*** Second row: Name/Identification of the Components '*** Second row: Name/Identification of the Components
Line = FileInMeasure.ReadLine Line = FileInMeasure.ReadLine
...@@ -623,6 +627,10 @@ Public Module input ...@@ -623,6 +627,10 @@ Public Module input
If Not KoordSys(0) And Not KoordSys(1) Then If Not KoordSys(0) And Not KoordSys(1) Then
Throw New Exception("Only same coordinate system allowed for calculation. Please give the coordinates in one system [DD.DD] or [MM.MM].") Throw New Exception("Only same coordinate system allowed for calculation. Please give the coordinates in one system [DD.DD] or [MM.MM].")
End If End If
Case tComp.s_brake
If (MeasCheck(tComp.s_brake) = False Or Not MeasCheck(tComp.s_brake)) Then
Throw New Exception("Missing signal for " & fCompName(tComp.s_brake))
End If
Case Else Case Else
Throw New Exception("Missing signal for " & fCompName(sKVM.Key)) Throw New Exception("Missing signal for " & fCompName(sKVM.Key))
End Select End Select
...@@ -637,6 +645,7 @@ Public Module input ...@@ -637,6 +645,7 @@ Public Module input
tDim += 1 tDim += 1
Line = FileInMeasure.ReadLine Line = FileInMeasure.ReadLine
For Each sKV In Spalten For Each sKV In Spalten
InputData(sKV.Key).Add(CDbl(Line(sKV.Value))) InputData(sKV.Key).Add(CDbl(Line(sKV.Value)))
If sKV.Key = tComp.t Then If sKV.Key = tComp.t Then
...@@ -646,6 +655,12 @@ Public Module input ...@@ -646,6 +655,12 @@ Public Module input
End If End If
End If End If
CalcData(tCompCali.t).Add(CDbl(Line(sKV.Value) + nDay * DayTimeSec)) CalcData(tCompCali.t).Add(CDbl(Line(sKV.Value) + nDay * DayTimeSec))
ElseIf sKV.Key = tComp.s_brake Then
Dim wasServiceBrakeUsed = CBool(Line(sKV.Value))
If wasServiceBrakeUsed Then
logme(9, False, "Service brake was activated during test. Usage of service brake is not permitted.")
Throw New Exception("Service brake was activated during test. Usage of service brake is not permitted.")
End If
ElseIf sKV.Key = tComp.lati Or sKV.Key = tComp.lati_D Then ElseIf sKV.Key = tComp.lati Or sKV.Key = tComp.lati_D Then
If Line(sKV.Value).Substring(Line(sKV.Value).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID) Then CounterLat += 1 If Line(sKV.Value).Substring(Line(sKV.Value).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID) Then CounterLat += 1
If UTMcalc Then If UTMcalc Then
...@@ -727,6 +742,15 @@ Public Module input ...@@ -727,6 +742,15 @@ Public Module input
InputUndefData(sKVUndef.Key).Add(CDbl(Line(sKVUndef.Value))) InputUndefData(sKVUndef.Key).Add(CDbl(Line(sKVUndef.Value)))
Next Next
Loop Loop
If Datafile Is Job.low1_fpath Or Datafile Is Job.low2_fpath Then
Dim initTimestamp = CalcData(tComp.t).First()
Dim lastTimestamp = CalcData(tComp.t).Last()
If (lastTimestamp - initTimestamp) > LowSpeedTestMaxDuration Then
logme(9, False, "The maximum time for the low speed test shall not exceed 25 minutes.")
Throw New Exception("Low speed test shall not exceed 25 minutes.")
End If
End If
Catch ex As Exception Catch ex As Exception
Throw New Exception(format("Exception while reading file({0}), line({1}) due to: {2}!: ", Datafile, tDim + 1, ex.Message), ex) Throw New Exception(format("Exception while reading file({0}), line({1}) due to: {2}!: ", Datafile, tDim + 1, ex.Message), ex)
End Try End Try
...@@ -734,16 +758,16 @@ Public Module input ...@@ -734,16 +758,16 @@ Public Module input
' Check coordinate digits ' Check coordinate digits
If CounterLat > 0 Then If CounterLat > 0 Then
If Job.mode = 1 Then If Job.mode = 1 Then
Throw New Exception(format("The latitude coordinates from file ({0}) have not enough digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLat)) Throw New Exception(format("The latitude coordinates from file ({0}) have not enough digits after the decimal separator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLat))
Else Else
logme(8, False, format("The latitude coordinates from file ({0}) have not enough digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLat)) logme(8, False, format("The latitude coordinates from file ({0}) have not enough digits after the decimal separator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLat))
End If End If
End If End If
If CounterLong > 0 Then If CounterLong > 0 Then
If Job.mode = 1 Then If Job.mode = 1 Then
Throw New Exception(format("The longitude coordinates from file ({0}) have not enough digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLong)) Throw New Exception(format("The longitude coordinates from file ({0}) have not enough digits after the decimal separator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLong))
Else Else
logme(8, False, format("The longitude coordinates from file ({0}) have not enough digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLong)) logme(8, False, format("The longitude coordinates from file ({0}) have not enough digits after the decimal separator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLong))
End If End If
End If End If
...@@ -768,7 +792,7 @@ Public Module input ...@@ -768,7 +792,7 @@ Public Module input
End If End If
Loop Loop
' Change the decimal seperator back ' Change the decimal separator back
If DemoDataF Then If DemoDataF Then
System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = Prefs.decSep System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = Prefs.decSep
DemoDataF = False DemoDataF = False
......
...@@ -442,9 +442,9 @@ Module utils ...@@ -442,9 +442,9 @@ Module utils
End Using End Using
End Function End Function
Function ReadAndValidateJsonFile(ByVal inFname As String, ByVal jschema As JsonSchema, ByVal validationMsgs As IList(Of String)) As JObject Function ReadAndValidateJsonFile(ByVal inFname As String, ByVal jschema As JSchema, ByVal validationMsgs As IList(Of String)) As JObject
Using reader As IO.TextReader = IO.File.OpenText(inFname) Using reader As IO.TextReader = IO.File.OpenText(inFname)
Dim validator As New JsonValidatingReader(New JsonTextReader(reader)) Dim validator As New JSchemaValidatingReader(New JsonTextReader(reader))
validator.Schema = jschema validator.Schema = jschema
AddHandler validator.ValidationEventHandler, Sub(o, a) validationMsgs.Add(format("{0}-->{1}", a.Path, a.Message)) AddHandler validator.ValidationEventHandler, Sub(o, a) validationMsgs.Add(format("{0}-->{1}", a.Path, a.Message))
...@@ -455,9 +455,9 @@ Module utils ...@@ -455,9 +455,9 @@ Module utils
End Using End Using
End Function End Function
Function ReadAndValidateJsonText(ByVal jsonText As String, ByVal jschema As JsonSchema, ByVal validationMsgs As IList(Of String)) As JObject Function ReadAndValidateJsonText(ByVal jsonText As String, ByVal jschema As JSchema, ByVal validationMsgs As IList(Of String)) As JObject
Using reader As IO.TextReader = New IO.StringReader(jsonText) Using reader As IO.TextReader = New IO.StringReader(jsonText)
Dim validator As New JsonValidatingReader(New JsonTextReader(reader)) Dim validator As New JSchemaValidatingReader(New JsonTextReader(reader))
validator.Schema = jschema validator.Schema = jschema
AddHandler validator.ValidationEventHandler, Sub(o, a) validationMsgs.Add(format("{0}-->{1}", a.Path, a.Message)) AddHandler validator.ValidationEventHandler, Sub(o, a) validationMsgs.Add(format("{0}-->{1}", a.Path, a.Message))
...@@ -468,7 +468,7 @@ Module utils ...@@ -468,7 +468,7 @@ Module utils
End Using End Using
End Function End Function
Sub ValidateJson(ByVal json As JObject, ByVal jschema As JsonSchema, ByVal validationMsgs As IList(Of String)) Sub ValidateJson(ByVal json As JObject, ByVal jschema As JSchema, ByVal validationMsgs As IList(Of String))
json.Validate(jschema, Sub(o, a) validationMsgs.Add(format("{0}-->{1}", a.Path, a.Message))) json.Validate(jschema, Sub(o, a) validationMsgs.Add(format("{0}-->{1}", a.Path, a.Message)))
End Sub End Sub
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment