Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • vliagth/vecto-airdrag
  • amogoda/vecto-airdrag
  • vecto/vecto-airdrag
  • vecto/tug-itna/md_vecto-airdrag
  • vecto/tug-itna/mq_vecto-airdrag
  • vecto/tug-itna/hm_vecto-airdrag
6 results
Show changes
Commits on Source (167)
Showing
with 2718 additions and 1229 deletions
Docs/VECTO_CSE-User Manual.pdf
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
......@@ -16,6 +18,8 @@ build/
bld/
[Bb]in/
[Oo]bj/
[Dd]eploy/
[Pp]ackage/
# Roslyn cache directories
*.ide/
......@@ -57,6 +61,7 @@ dlldata.c
*.pidb
*.svclog
*.scc
*.vs
# Chutzpah Test files
_Chutzpah*
......@@ -183,3 +188,4 @@ UpgradeLog*.htm
# Microsoft Fakes
FakesAssemblies/
*.db

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CSE", "CSE\CSE.vbproj", "{6845E24A-D1E7-4B28-92E7-2EBF850F044B}"
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35707.178 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "AirDrag", "CSE\AirDrag.vbproj", "{6845E24A-D1E7-4B28-92E7-2EBF850F044B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......
......@@ -5,7 +5,14 @@ VECTO-CSE: Development
Before compiling you need to add/check references to:
* 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
The following directories/files must be provided in the application folder (e.g. ..\bin\Debug):
......@@ -17,32 +24,47 @@ The following directories/files must be provided in the application folder (e.g.
* DemoData/
* Docs/CSE-User Manual.pdf (generated from Word-file)
### 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:
1. Make zip-folder named with the "Semantic-version", ie: 2014_15_5-VECTO_CSE-2.0.1-beta1.
2. Copy into it:
* executable (`.EXE` and optionally `.PDB` when a prerelease)
* vectolic.dll (check correct version)
* Newtonsoft.Json.dll 6.0.0
* Declaration/ (With all its files marked as READONLY!!)
* DemoData/
* Docs/CSE-User Manual.pdf (generated from Word-file)
* Docs/GenericData.xlsx
* README.md
* CHANGES.md
* COPYING.txt
3. Make a temp-copy of the folder and run it with a license.
* Does the "User Manual" open?
4. Check everything alright, or else go back to step (2).
5. Issue a Pull-request to CITNet with all latest changes.
6. ZIP the original folder.
7. Upload into CITNet's SVN:
https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/
and link from:
https://webgate.ec.europa.eu/CITnet/confluence/display/VECTO_CSE/Releases
8. Make licenses and update private pages
9. Tag repos.
10. Send announcment email through JIRA (ie see VECTO-28).
1. (ask to) Create a new "version" in JIRA.
* Mark all resolved issues in this new version.
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.
4. Copy into it:
* executable (`.EXE` and optionally `.PDB` when a prerelease)
* vectolic.dll (check correct version)
* Declaration/ (With all its files marked as READONLY!!)
* DemoData/
* Docs/CSE-User Manual.pdf (*remember* to generate from Word-file and delete irrelevant files)
* Docs/GenericData.xlsx
* README.md
* CHANGES.md
* COPYING.txt
5. Make a temp-copy of the folder and run it with a license.
* Does the "User Manual" link in Help-menu open?
6. Check everything alright, or else go back to step (2).
7. Issue a Pull-request to CITNet with all latest changes.
8. ZIP the original folder.
9. Upload into CITNet's SVN:
https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/
and link from:
https://webgate.ec.europa.eu/CITnet/confluence/display/VECTO_CSE/Releases
1. Make licenses and update private pages
2. Tag repos in git.
3. Send announcement email through JIRA (ie see VECTO-28).
* Linking any fixed ISSUES in the announcement and Wiki's release-page.
VECTO-CSE: Changes
VECTO-AirDrag: Changelog
===================
## 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:
TODO: 2014-06-??: v2.0.1
### 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:
* New version number
* DriftCheck implemented
* Drift corrected values in output files
* Adaption of gearbox types. Old gearbox types are also valid
* New vehicle classes added (MLr, MLvan, MB, HB)
* Change of criteria parameter tq_sum_float_delta_LS dependent of vehicle class
* Vehicle file corrected to new input data
* Info labels for tq_sum_float_delta_LS in declaration mode added
* New signal inputs <n_EM> and <n_wheel_ave>
* Bugfix output path in the result file. Now the correct file is written to the title
* Bugfix time sequence. Now the time is checked also with digits after the decimal separator
* Bugfix preferences. Now in the preference GUI the unit for Log-file size is written
* Update DemoData
* Update ReleaseNotes
## v3.1.9 (2019-01-31) ##
TUG improvements:
* New version number
* Adaption of gearbox types. Old gearbox types are also valid
* Update DemoData
* Update ReleaseNotes
## v3.1.8 (2019-01-04) ##
TUG improvements:
* New version number
* Adaption of gearbox types on new legalisation
* Adaption of GUIs to only show the logo from the European Commission
* Update DemoData
* Update ReleaseNotes
* Update UserManual
* Release candidate output
## v3.1.7 (2018-06-26) ##
TUG improvements:
* New version number
* Correction of the result output for gearbox type AT if n_eng is not given
## v3.1.6 (2018-02-15) ##
TUG improvements:
* New version number
* Hotfix for VECTO Input file
* Culture info is automatically set to [en-US] standard
## v3.1.5 (2018-02-08) ##
TUG improvements:
* New version number
* Hotfix for rounding method
## v3.1.4 (2018-01-22) ##
TUG improvements:
* New version number
* Bugfix for rounding method
## v3.1.3 (2017-11-07) ##
TUG improvements:
* New version number
* Bugfix for speed criterium
## v3.1.2 (2017-11-03) ##
TUG improvements:
* New version number
* License module deleted
## v3.1.1 (2017-10-04) ##
TUG improvements:
* New version number
* 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)
## v3.1.0 (2017-07-14) ##
TUG improvements:
* New version number
* Bugfix for correct detection of first/last datapoint inside of a MS
* Update VECTO input file generation
* Update VECTO hashing added
* Update ReleaseNotes
* Update UserManual
## v3.0.8 (2017-03-22) ##
TUG improvements:
* New version number
* Correction calc vehicle speed stability criteria
* Update DemoData
* Update ReleaseNotes
* Update UserManual
* Update JobFile
## v3.0.7 (2017-02-03) ##
TUG improvements:
* New version number
* Validity criterias for calibration run extended (see technical annex)
* New calibration criterias (v_veh_1s_delta_CAL, v_veh_ave_delta_CAL)
## v3.0.5/6 (2017-01-13) ##
TUG improvements:
* New version number
* Change of needed digits after the decimal separator (DGPS: DD.DD[7]/MM.MM[5]; GPS: DD.DD[5]/MM.MM[3])
* Uneven numbers of datasets per heading in calibration test now allowed
* Correction of maximum allowed vehicle high from class 1 and class 2
## v3.0.3/4 (2016-11-25) ##
TUG improvements:
* New version number
* Bugfix for the criteria detection in calibration and LS/HS run
* Correction of the output messages
* Correction of the DemoData
## v3.0.1/2 (2016-11-25) ##
TUG improvements:
* New version number
* Bugfix for digit check by use of GPS
* Bugfix for measurement section detection for root point calculation
## v3.0.0 (2016-11-16) ##
TUG improvements:
* New version number
* Update of needed signals in calibration run (t_ground no longer required as input)
* A license valid until 16th of March is distributed with the code.
* Update DEMOData
## v2.0.7-beta8/9 (2016-11-09) ##
TUG improvements:
* Correction of rolling resistance criteria
* Correction of digit test for coordinates
## v2.0.7-beta7 (2016-10-20) ##
TUG improvements:
* New version number
* Including Declaration and Engineering Mode to program and Job-File
* Fv_veh calculation update (now option 2 is the new preferred one) Option 2 is deleted from result file
* Uneven numbers of datasets per heading in HS test now allowed
* Calculation of F_acc changed due to wheels inertia deletion (now F_acc = 1.03*m*a)
* New design of criteria tab
* Update Standard criteria values + renaming
* Include of new variables for validity criteria (t_amb; t_ground; tq_grd)
* gradient correction implemented
* Check of digits after decimal separator for all coordinates, transmission ratios (gear + axle) and altitudes (Values in vehicle file changed to string values)
* Vehicle file check included (For height and class code)
* Expand vehicle file with vVehMax and GVMMax value
* Change vehicle file configuration parameter from "Rigid/Tractor" to "No/Yes"
* Displacement of Genshape file into code
* Add reference 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
* 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
* Output files in Declaration mode extended
* Output files adapted
* Expansion of the job-File due to new results
* vehWidth and wheelsInertia deleted from vehicle-file
* Deletion of unused variables (omega_wh; omega_wh_acc; omega_p_wh_acc; t_tire; p_tire; ...)
* Deletion of [ss.ss] coordinate input
* Update DEMOData
* Update of Excel DemoData file
* Update user manual and release notes
## v2.0.6-beta6 (2016-01-21) ##
TUG improvements:
* New version number
* Bugfix control heading calculation in *.csms file
* Bugfix old functions for day changes deleted
* Update user manual and release notes
## v2.0.5-beta6 (2015-11-25) ##
TUG improvements:
* New version number
* Renaiming of VECTO-CSE into VECTO-Air Drag
* Bugfix dist calculation
* Bugfix calculation of a_veh_avg and omega_p_wh_acc
* Update of the ending message if an error during the calculation detected
* Update user manual and release notes
## v2.0.4-beta6 (2015-10-13) ##
TUG improvements:
* New version number
* Updates by error/warning output
* Update user manual and release notes
* Free definition for list and decimal separators in the CSV-Files
* Variable definition of the coordinate unit (*.csms and *.csdat files)
* Update of the excel file
* Update error messages
## v2.0.3-beta6 (2015-07-23) ##
TUG improvements:
* New version number
* Bugfix calculation without additional signals
* 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)
* Add ground temperature as optional signal to input data (<t_ground>)
* Add new criteria parameter t_ground_max = 40C
* Set t_amb_max to 25C (old 35C)
## v2.0.2-beta6 (2015-07-20) ##
TUG improvements:
* Bugfix heading control
* Update user manual
* Add "Report bug" option
* Add JIRA Quick Start Guide
* Delete valid_t_tire from output files and job-file
* Change t_tire from required input data to optional (like p_tire)
* Delete rho_air_ref from criteria and GUI
## v2.0.2-beta6 (2015-07-01) ##
TUG improvements:
* 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 of the excel makro in terms of the system region and language settings
## v2.0.2-beta5 (2015-06-24) ##
Mostly TUG improvements:
* FIX Job-save missing criteria (hack)
* Update of calculation of the CdxA value from measured drag forces
* Update GenShape File
* Update of calibration of vehicle speed and anemometer speed (high speed test instead of "claibration test")
* new criteria delta_n_eng for LS/HS included
* Option in VECTO-CSE to read in cardan speed instead of engine speed and gear ratios for HS and LS
--> Update of the vehicle file
* Update calculation with cardan speed: Calculation only if engine speed is not given an automated transmission is used
* Program user friendly updates
* Update F_acc calculation
* Update r_dyn calculation for each test (HS, LS1, LS2)
* Update DemoData
* Update user manual and release notes
* Output folder will be now created automatically if its not existing without questioning
* Welcome form added for first application start
* Correction of welcome window
* Add the Excel-makro to generate the input data into the DemoData files
* New Version number.
## v2.0.1-beta5 (2015-05-21) ##
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
* Allow also non-continuous input data in *.csdat files
* Direct start option included
* Anemometer instrument calibration removed from CSE calculation
* Update of definition of beta-signal (180 = air flow from front)
* Acceleration correction: true as default
* Control if heading and given direction is always the same
* set criteria to "standard" when CSE opens
* store information when switching between tabs
* ResetCriteria and ImportCriteria do not clear main tab
* New Version number.
## v2.0.1-beta4 (2014-11-13) ##
TUG improvements:
* Bugfix linear regression calculation LS
* Add control for beta angle <= 360 and calculation to +-180 if angle > +-180
* Update user manual
* New Version number.
## v2.0.1-beta3 (2014-11-10) ##
TUG improvements:
* Correction HS calculation
* Correction length calculation for the first section in the dat-file when there is a gap between the first and second MS.
* Update length calculation in csms-file to check if specified length from user and coordinates are the same
* New Version number.
## v2.0.1-beta2 (2014-09-30) ##
TUG improvements:
* Correction GenShape Check
* New Version number.
## v2.0.1-beta1 (2014-09-15) ##
TUG improvements:
* IO: Data reading corrected for first data set in measurement section file, weather file and data files.
* New Version number.
TODv2.0(O: 2014-06-25) .1
--------------------
JRC contributions (see VECTO-29):
Mostly JRC contributions (see VECTO-29 & VECTO-35):
* IO: JSON-ize preferences, vehicle, job & criteria-files, ...
* 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.
* UI: Make the Log-window visible at all times (more necessary now that unhandled exceptions are appropriately reported).
......@@ -16,25 +366,43 @@ JRC contributions (see VECTO-29):
* Possible to specify any editor (not only notepad.exe) for viewing files.
* Standarize versioning using [SemanticVersioning](http://semver.org/).
* Welcome developers and users with README.md, CHANGES.md and COPYING.txt files.
##### Internal:
### Internal:
* Implement an API for writing Header/Body json-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`).
* Log: Improve logging-API so now a single log-routine is used everywhere(instead of 3 different ones).
* async: Stop abusing worker-Thread with Globals, use DoWorkEventArgs instead.
* async: Start using Exceptions instead of CancelAsync() and error-flags.
* General restructuring of the folders and names in the project.
More analytically:
#### 2014-06-04: v2.0.1-pre2 ####
## v2.0.1-beta0 (2014-06-23) ##
Mostly TUG improvements:
* 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.
* Added EUPL preamble on all source-files.
## v2.0.1-pre2 (2014-06-04) ##
JRC contributions:
* Convert Job & Criteria files to JSON and possible to store them separately.
* Still supporting old format for reading.
* 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: Setup criteria-infobox from JSON-schema.
##### Internal:
### Internal:
* Log unhandled exceptions.
* 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.
......@@ -42,14 +410,15 @@ JRC contributions:
* 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:
* Read/write Vehicle-file as JSON.
* prefsUI: Add Reload button.
* 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.
##### Internal:
### Internal:
* Start saving stack-traces into the log-file.
* Enhance JSON-files with standard header/body behavior.
* Link JSON to GUI controls (labels & toolstips)
......@@ -57,18 +426,20 @@ JRC contributions:
* 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:
* Separate config/ from Declaration/ folders.
* Remove the versioning infos from app-name (manual, project-name, folders) and
* Remove the versioning infos from app-name (manual, project-name, folders) and
use [SemanticVersioning](http://semver.org/) 2.0.0 instead.
* Possible to use any editor (not only notepad.exe).
* Added README.md, CHANGES.md, COPYING.txt files.
##### Internal:
### Internal:
* 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).
#### 2014-05-14: CSE2.01 ####
## 2014-05-14: CSE2.01 ##
1st delivery from TU-Graz under Lot-3.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
......@@ -9,13 +9,15 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6845E24A-D1E7-4B28-92E7-2EBF850F044B}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>CSE.My.MyApplication</StartupObject>
<RootNamespace>CSE</RootNamespace>
<AssemblyName>CSE</AssemblyName>
<StartupObject>AirDrag.My.MyApplication</StartupObject>
<RootNamespace>AirDrag</RootNamespace>
<AssemblyName>AirDrag</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
......@@ -28,7 +30,6 @@
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
......@@ -39,10 +40,11 @@
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>CSE.xml</DocumentationFile>
<DocumentationFile>AirDrag.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
<WarningsAsErrors>
</WarningsAsErrors>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
......@@ -51,10 +53,11 @@
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>CSE.xml</DocumentationFile>
<DocumentationFile>AirDrag.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
<WarningsAsErrors>
</WarningsAsErrors>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
......@@ -69,25 +72,58 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\CSE.ico</ApplicationIcon>
<ApplicationIcon>Resources\AirDrag.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\JSON.Net\Net40\Newtonsoft.Json.dll</HintPath>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.2.0\lib\net45\Castle.Core.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 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.Deployment" />
<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.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="vectolic, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>bin\Release\vectolic.dll</HintPath>
<Reference Include="VectoCommon, Version=4.3.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\VectoCommon.4.3.2\lib\net48\VectoCommon.dll</HintPath>
</Reference>
<Reference Include="VectoHashing, Version=4.3.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\VectoHashing.4.3.2\lib\net48\VectoHashing.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
......@@ -103,12 +139,33 @@
<Import Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="Classes\cAlt.vb" />
<Compile Include="Classes\cGenShp.vb" />
<Compile Include="Classes\cHHF.vb" />
<Compile Include="Classes\cMSC.vb" />
<Compile Include="GUI\F_JIRA.designer.vb">
<DependentUpon>F_JIRA.vb</DependentUpon>
</Compile>
<Compile Include="GUI\F_JIRA.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="GUI\F_VECTOInput.Designer.vb">
<DependentUpon>F_VECTOInput.vb</DependentUpon>
</Compile>
<Compile Include="GUI\F_VECTOInput.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="GUI\F_Welcome.designer.vb">
<DependentUpon>F_Welcome.vb</DependentUpon>
</Compile>
<Compile Include="GUI\F_Welcome.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="IO\cJsonFile.vb" />
<Compile Include="Classes\CResult.vb" />
<Compile Include="IO\cJob.vb" />
<Compile Include="IO\cCriteria.vb" />
<Compile Include="IO\cVECTOconfig.vb" />
<Compile Include="IO\cPreferences.vb" />
<Compile Include="cSemanticVersion.vb" />
<Compile Include="Classes\csKey.vb" />
......@@ -116,6 +173,7 @@
<Compile Include="Classes\cValidSec.vb" />
<Compile Include="IO\cVehicle.vb" />
<Compile Include="Classes\cVirtMSC.vb" />
<Compile Include="IO\DirectStart.vb" />
<Compile Include="IO\output.vb" />
<Compile Include="IO\OutputTest.vb" />
<Compile Include="Calculation\Minor_routines_calculate.vb" />
......@@ -173,9 +231,12 @@
<Compile Include="ApplicationEvents.vb" />
<Compile Include="utils.vb" />
<Compile Include="Classes\cFile_v3.vb" />
<Compile Include="CSE_Globals.vb" />
<Compile Include="AirDrag_Globals.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="GUI\F_JIRA.resx">
<DependentUpon>F_JIRA.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\F_Preferences.resx">
<DependentUpon>F_Preferences.vb</DependentUpon>
</EmbeddedResource>
......@@ -191,15 +252,22 @@
<EmbeddedResource Include="GUI\F_Main.resx">
<DependentUpon>F_Main.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\F_VECTOInput.resx">
<DependentUpon>F_VECTOInput.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\F_Welcome.resx">
<DependentUpon>F_Welcome.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="My Project\app.manifest" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
......@@ -211,6 +279,7 @@
</None>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\Beenden.png" />
</ItemGroup>
<ItemGroup>
......@@ -302,11 +371,14 @@
<None Include="Resources\Play-icon.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\bug-edit-icon.png" />
<None Include="Resources\AirDrag.ico" />
<None Include="Resources\Speichern_unter_klein.png" />
<None Include="Resources\EuropeanCommission.jpg" />
<Content Include="Resources\Stop-icon.png" />
<None Include="Resources\Stop-icon1.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
......
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="CSE.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="AirDrag.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
culture="neutral"/>
<bindingRedirect oldVersion="4.5.0.0" newVersion="6.0.0.0"/>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="4.5.0.0" newVersion="6.0.0.0" />
</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>
</runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<userSettings>
<CSE.My.MySettings>
<AirDrag.My.MySettings>
<setting name="F_Main_location" serializeAs="String">
<value>0, 0</value>
</setting>
</CSE.My.MySettings>
</AirDrag.My.MySettings>
</userSettings>
</configuration>
\ No newline at end of file
</configuration>
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
......@@ -18,7 +29,7 @@
fbVEL.Close()
fbMSC.Close()
' Restart VECTO CSE (Only by changes on the Confic)
' Restart VECTO Air Drag (Only by changes on the Confic)
If RestartN Then
' Start the *.exe
PSI.FileName = My.Application.Info.AssemblyName & ".exe"
......@@ -32,14 +43,24 @@
Dim fiAss As New IO.FileInfo(joinPaths(Application.Info.DirectoryPath, Application.Info.AssemblyName & ".exe"))
Prefs = New cPreferences(True) ' !!!Skip schema-validation here, or else app hangs as zombie! (do it instead when creating new for Dialog)
'F_Main.installJob(New cJob()) NO! cannot instantiate form without JOB/Crt.
Job = New cJob(True) ' !!!Skip schema
VECTOconf = New cVECTOconfig(True)
Crt = Job.Criteria
' Path to the *.exe
MyPath = My.Application.Info.DirectoryPath & "\"
PrefsPath = joinPaths(MyPath, "config", "preferences.json")
VECTOconfigPath = joinPaths(MyPath, "config", "VECTOconfig.json")
'Separator!
If System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator <> "." Or Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName <> "en" Then
Try
System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US")
System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("en-US")
Catch ex As Exception
logme(9, False, "Failed to set Application Regional Settings to 'en-US'! Check system decimal- and group- separators!")
End Try
End If
' Generateion of folder for the file history if not exists
FB_FilHisDir = joinPaths(MyPath, "config", "fileHistory\")
......@@ -48,12 +69,8 @@
' compile date
AppDate = fiAss.LastWriteTime.Date
' Licencemodul
Lic.FilePath = joinPaths(MyPath, "License.dat")
Lic.AppVersion = AppVers
' Declaration from the filebrowser optionen
fbVECTO = New cFileBrowser("CSE")
fbVECTO = New cFileBrowser("AirDrag")
fbVECTO.Extensions = New String() {"csjob.json", "csjob"}
fbCRT = New cFileBrowser("CRT.json")
......@@ -101,16 +118,12 @@
Private Sub MyApplication_UnhandledException(ByVal sender As Object, ByVal ev As Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs) Handles Me.UnhandledException
Dim ex As Exception = ev.Exception
If AppFormStarted Then
logme(9, False, format("Unhandled exception: \i{0}", ex.Message), ex)
logme(9, False, format("Unhandled exception in {0}: \i{1}", ex.Source, ex.Message), ex)
ev.ExitApplication = False
Else
MsgBox(format("{0} failed after init due to: \n\i{1}", AppName, ex), MsgBoxStyle.Critical, format("{0} failed to Start!", AppName))
End If
End Sub
'Private Sub MyApplicationDomain_UnhandledException(ByVal sender As Object, ByVal ev As UnhandledExceptionEventArgs)
' Dim ex As Exception = DirectCast(ev.ExceptionObject, Exception)
' logme(9, False, format("Worker's unhandled exception: {0}", ex.Message), ex)
'End Sub
End Class
End Namespace
......
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
......@@ -31,7 +42,7 @@
QuadReq = 270 + Math.Abs(Math.Atan(Dy / DX) * 180 / Math.PI)
ElseIf Dy = 0 And DX > 0 Then
QuadReq = 90
ElseIf Dy > 0 And DX = 0 Then
ElseIf Dy >= 0 And DX = 0 Then
QuadReq = 0
ElseIf Dy < 0 And DX = 0 Then
QuadReq = 180
......@@ -41,52 +52,90 @@
End If
End Function
' Höhe-Höhenfüßpunkt calculation
Public Function HHF(ByVal KoordA As Array, ByVal KoordE As Array, ByVal KoordP As Array) As cHHF
' Declaration
Dim DXae, DYae, DXap, DYap, DXep, DYep, Aae, Aap, KAae As Double
Dim result As New cHHF
' Calculation of the parameters
DXae = KoordE(0) - KoordA(0)
DYae = KoordE(1) - KoordA(1)
DXap = KoordP(0) - KoordA(0)
DYap = KoordP(1) - KoordA(1)
DXep = KoordP(0) - KoordE(0)
DYep = KoordP(1) - KoordE(1)
' Calculate the angles
Aae = QuadReq(DXae, DYae)
Aap = QuadReq(DXap, DYap)
' Calculate the angle from the direction A-E to A-P
KAae = Math.Abs(Aae - 360)
result.KAap = Aap + KAae
If result.KAap > 360 Then result.KAap = result.KAap - 360
' Calculate if the Point lays in the virtual point area
result.p = ((DXae ^ 2 + DYae ^ 2) + (DXep ^ 2 + DYep ^ 2) - (DXap ^ 2 + DYap ^ 2)) / (2 * Math.Sqrt(DXae ^ 2 + DYae ^ 2))
result.q = ((DXae ^ 2 + DYae ^ 2) - (DXep ^ 2 + DYep ^ 2) + (DXap ^ 2 + DYap ^ 2)) / (2 * Math.Sqrt(DXae ^ 2 + DYae ^ 2))
' Calculate the distance from P to line AE
result.hp = Math.Sqrt((DXep ^ 2 + DYep ^ 2) - result.p ^ 2)
Return result
End Function
' Function for the calculation of the moving average
Public Function fMoveAve(ByVal TimeX As List(Of Double), ByVal ValuesX As List(Of Double), ByRef NewValues As List(Of Double), Optional ByVal Ave_t As Single = AveSec) As Boolean
' Declaration
Dim i, lauf, laufE, zEnd, tI, Anz, pos, PktB, PktE, anzPkt As Integer
Dim i, lauf, laufE, zEnd, Anz, pos, PktB, PktE, anzPkt As Integer
Dim t0, tstep As Double
Dim Sprung As Boolean
Dim Summe As Double
Dim tI As New List(Of Integer)
' Initialise
Sprung = False
tI = 0
tstep = 0
'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 Sprung Then
logme(9, False, "Time step invalid! t(" & i - 1 & ") = " & TimeX(i - 1) & "[s], t(" & i & ") = " & TimeX(i) & "[s]")
Return False
Else
Sprung = True
tI = i
End If
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
Sprung = True
TI.Add(i)
End If
Next i
' Initialise
If TI.Count = 0 Then TI.Add(0)
If Sprung Then TI.Add(TimeX.Count - 1)
Anz = Math.Round(Ave_t / tstep, 0)
zEnd = TimeX.Count - 1
pos = 0
t0 = 0
anzPkt = 0
If Sprung Then
laufE = 2
laufE = ti.Count - 1
Else
laufE = 1
laufE = 0
End If
For lauf = 1 To laufE
If Sprung And lauf = 1 Then
zEnd = tI - 1
For lauf = 0 To laufE
If Sprung And lauf = 0 Then
zEnd = tI(lauf) - 1
pos = 0
ElseIf Sprung And lauf = laufE Then
zEnd = tI(lauf)
t0 = tI(lauf - 1)
pos = tI(lauf - 1)
ElseIf Sprung And lauf <> 0 Then
zEnd = TI(lauf) - 1
t0 = TI(lauf - 1)
pos = tI(lauf - 1)
Else
pos = tI
t0 = tI
pos = tI(lauf)
t0 = tI(lauf)
zEnd = TimeX.Count - 1
End If
......@@ -115,48 +164,53 @@
' Function for the calculation of the moving average
Public Function fMoveAve(ByVal TimeX As List(Of Double), ByVal ValuesX As List(Of Double), ByRef NewValues As List(Of Double), ByRef StepValues As List(Of Double)) As Boolean
' Declaration
Dim i, lauf, laufE, zEnd, tI, Anz, pos, PktB, PktE, anzPkt As Integer
Dim i, lauf, laufE, zEnd, Anz, pos, PktB, PktE, anzPkt As Integer
Dim t0, tstep As Double
Dim Sprung As Boolean
Dim Summe As Double
Dim tI As New List(Of Integer)
' Initialise
Sprung = False
tI = 0
tstep = 0
'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 Sprung Then
logme(9, False, "Time step invalid! t(" & i - 1 & ") = " & TimeX(i - 1) & "[s], t(" & i & ") = " & TimeX(i) & "[s]")
Return False
Else
Sprung = True
tI = i
End If
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
Sprung = True
tI.Add(i)
End If
Next i
' Initialise
If tI.Count = 0 Then tI.Add(0)
If Sprung Then tI.Add(TimeX.Count - 1)
zEnd = TimeX.Count - 1
pos = 0
t0 = 0
anzPkt = 0
If Sprung Then
laufE = 2
laufE = tI.Count - 1
Else
laufE = 1
laufE = 0
End If
For lauf = 1 To laufE
If Sprung And lauf = 1 Then
zEnd = tI - 1
For lauf = 0 To laufE
If Sprung And lauf = 0 Then
zEnd = tI(lauf) - 1
pos = 0
ElseIf Sprung And lauf = laufE Then
zEnd = tI(lauf)
t0 = tI(lauf - 1)
pos = tI(lauf - 1)
ElseIf Sprung And lauf <> 0 Then
zEnd = tI(lauf) - 1
t0 = tI(lauf - 1)
pos = tI(lauf - 1)
Else
pos = tI
t0 = tI
pos = tI(lauf)
t0 = tI(lauf)
zEnd = TimeX.Count - 1
End If
......@@ -317,13 +371,13 @@
End Function
' Detect the position from the right section and direction
Public Function fSecPos(ByVal MSCX As cMSC, ByVal Sec As Integer, ByVal Dir As Integer) As Double
Public Function fSecPos(ByVal Altdata As List(Of cAlt), ByVal Sec As Integer, ByVal Dir As Integer) As Double
' Declaration
Dim i As Integer
' Search after the rigt section and direction
For i = 1 To MSCX.meID.Count - 1
If MSCX.meID(i) = Sec And MSCX.dID(i) = Dir Then
For i = 1 To Altdata.Count - 1
If Altdata(i).meID = Sec And Altdata(i).dID = Dir Then
Return i
End If
Next i
......@@ -332,127 +386,44 @@
End Function
' Calculate the altitude
Public Function fAltInterp(ByVal File As String, ByVal dist As Double) As Double
Public Function fAltInterp(ByVal Altdata As cAlt, ByVal Lati_root As Double, ByVal Longi_root As Double) As Double
' Declaration
Dim endVal As Boolean = True
Using FileInAlt As New cFile_V3
Dim vline(), Line() As String
' Output on the GUI
logme(5, False, "Read altitude file")
Dim i As Integer
Dim dist, altitude As Double
' Open the MSC spezification file
If Not FileInAlt.OpenRead(File) Then
' Error if the file is not available
logme(9, False, "Can´t find the altitude file: " & File)
Return False
End If
' Calculate the distance
dist = Math.Sqrt(Math.Pow(Altdata.UTM(0).Easting - Longi_root, 2) + Math.Pow(Altdata.UTM(0).Northing - Lati_root, 2))
' Read the file
Line = {0, 0}
vline = FileInAlt.ReadLine
' Error if distance is longer then altitude file (Should never happen)
If dist > Altdata.dist(Altdata.dist.Count - 1) Then
Throw New Exception(format("The actual distance ({0}) is higher than the range of the given altitude profile ({1}). Please check your altitude profile file!", dist, Altdata.dist(Altdata.dist.Count - 1)))
End If
If dist < vline(0) Then
logme(9, False, "The distance is lower then the minimum in the altitude file")
BWorker.CancelAsync()
fAltInterp = 0
' Find the right points for interpolation
For i = 1 To Altdata.dist.Count - 1
If dist < Altdata.dist(i) And dist >= Altdata.dist(i - 1) Then
altitude = InterpLinear(Altdata.dist(i - 1), Altdata.dist(i), Altdata.Altitude(i - 1), Altdata.Altitude(i), dist)
Exit For
End If
Next i
Do While Not FileInAlt.EndOfFile
Line = FileInAlt.ReadLine
' Find the right points
If dist >= vline(0) And dist < Line(0) Then
endVal = False
Exit Do
Else
vline = Line
End If
Loop
' Interpolate the value
If endVal Then
' Set on last value if dist > max altitude dist
fAltInterp = Line(1)
Else
fAltInterp = InterpLinear(vline(0), Line(0), vline(1), Line(1), dist)
End If
End Using
Return altitude
End Function
' Length calculation out of coordinates MM.MM (Not used at the moment)
Public Function distVincenty(ByVal lat1 As Double, ByVal lon1 As Double, ByVal lat2 As Double, ByVal lon2 As Double, Optional ByVal Dist As Boolean = False) As Double
' Function to find the position
Public Function fFindPos(ByVal FValue As Double, ByVal ArrayV As List(Of Double)) As Integer
' Declaration
Dim i As Integer
Dim L, C, U1, U2, sinU1, cosU1, sinU2, cosU2, lambda, lambdap, sinLambda, sinSigma, sinAlpha, cosLambda, cosSigma, cosSqAlpha, cos2SigmaM, sigma, deltaSigma As Double
Dim uSq, Ai, Bi, s, fwdAz, revAz As Double
' Constant declarations
Const a = 6378137.0 ' WGS-84 ellipsoid params (major axis of the ellipsoid)
Const b = 6356752.314245 ' WGS-84 ellipsoid params (minor axes of the ellipsoid)
Const f = 1 / 298.257223563 ' WGS-84 ellipsoid params (Falttening)
Const iMax = 100 ' Maximum of iterrations
Const toRad = Math.PI / 180
' Initialisation
L = (lon2 - lon1) * toRad
U1 = Math.Atan((1 - f) * Math.Tan(lat1 * toRad))
U2 = Math.Atan((1 - f) * Math.Tan(lat2 * toRad))
sinU1 = Math.Sin(U1)
cosU1 = Math.Cos(U1)
sinU2 = Math.Sin(U2)
cosU2 = Math.Cos(U2)
i = iMax
lambda = L
lambdap = lambda + 1
' Calculate lambda
Do Until (Math.Abs(lambda - lambdap) < 0.000000000001 Or i = 0)
sinLambda = Math.Sin(lambda)
cosLambda = Math.Cos(lambda)
sinSigma = Math.Sqrt((cosU2 * sinLambda) ^ 2 + (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda) ^ 2)
If (sinSigma = 0) Then Return 0 ' co-incident points
cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda
sigma = Math.Atan2(sinSigma, cosSigma)
sinAlpha = cosU1 * cosU2 * sinLambda / sinSigma
cosSqAlpha = 1 - sinAlpha * sinAlpha
cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cosSqAlpha
If (IsNothing(cos2SigmaM)) Then cos2SigmaM = 0 ' equatorial line: cosSqAlpha=0 (§6)
C = f / 16 * cosSqAlpha * (4 + f * (4 - 3 * cosSqAlpha))
lambdap = lambda
lambda = L + (1 - C) * f * sinAlpha * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)))
i -= 1
Loop
' Erreor message wehen lambda can not be calculated
If i = 0 Then
logme(9, False, "Was not able to calculate the distance and bearing between koordinates.")
BWorker.CancelAsync()
Return 0 ' formula failed to converge
End If
Dim pos As Integer
' Calculate the distance
If Dist Then
uSq = cosSqAlpha * (a ^ 2 - b ^ 2) / (b ^ 2)
Ai = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)))
Bi = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)))
deltaSigma = Bi * sinSigma * (cos2SigmaM + Bi / 4 * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - Bi / 6 * cos2SigmaM * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)))
s = b * Ai * (sigma - deltaSigma)
Return s
Else
' Calculate the bearings
fwdAz = Math.Atan2(cosU2 * sinLambda, cosU1 * sinU2 - sinU1 * cosU2 * cosLambda) * 1 / toRad ' Forward azimut
revAz = Math.Atan2(cosU1 * sinLambda, -sinU1 * cosU2 + cosU1 * sinU2 * cosLambda) * 1 / toRad ' Bering in direction P1--> P2
' Find the value
For pos = 1 To ArrayV.Count - 1
If FValue <= ArrayV(pos) And FValue > ArrayV(pos - 1) Then
Return pos
End If
Next
' Correct the Angle
If revAz < 0 Then revAz = 360 + revAz
Return revAz
End If
' Give false back if no value was found
Return -1
End Function
' Calculate the UTM coordinates
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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
......
' 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 cAlt
Public meID As Integer ' Measurement ID
Public dID As Integer ' Direction ID
Public KoordLat As List(Of Double) ' Latetude [mm.mm]
Public KoordLong As List(Of Double) ' Longitude [mm.mm]
Public Altitude As List(Of Double) ' Altitude [m]
Public UTM As List(Of cUTMCoord) ' UTM coords [m]
Public dist As List(Of Double) ' Distance from the begin of the altitude file
' Initialise the parameter
Public Sub New()
KoordLat = New List(Of Double)
KoordLong = New List(Of Double)
Altitude = New List(Of Double)
UTM = New List(Of cUTMCoord)
dist = New List(Of Double)
End Sub
End Class
' 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
......@@ -205,7 +216,7 @@ lb10:
Next
' Abfrage ob Datei blockiert
If IsNothing(StrWrter) Then
BWorker.CancelAsync()
BWorker.CancelAsync() ' TODO: Totaly unrelated here, file-io should not know anything about the worker-thread.
FileBlock = True
Exit Sub
End If
......@@ -216,7 +227,9 @@ lb10:
Public Sub WriteLine(ByVal x As String)
' Polling if the file is blocked
If IsNothing(StrWrter) Then
If BWorker IsNot Nothing Then BWorker.CancelAsync()
If BWorker IsNot Nothing Then
BWorker.CancelAsync() ' TODO: Totaly unrelated here, file-io should not know anything about the worker-thread.
End If
FileBlock = True
Exit Sub
End If
......
This diff is collapsed.
' 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 cHHF
Public KAap As Double ' Korrected angle from A-P
Public p As Double ' Distance from point A-Bhp (Bhp = Base point from P on route AE)
Public q As Double ' Distance from point E-Bhp (Bhp = Base point from P on route AE)
Public hp As Double ' Ortogonal distance from point P on route AE
End Class
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]
......
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
......
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
Public vVeh As List(Of Double) ' Average vehicle speed
' Initialise the parameter
Public Sub New()
NameSec = New List(Of String)
AnzSec = New List(Of Integer)
ValidSec = New List(Of Boolean)
vVeh = New List(Of Double)
End Sub
' calculate the average speed values
Public Sub calcAveSpeed()
' Declaration
Dim i As Integer
For i = 0 To AnzSec.Count - 1
If AnzSec(i) > 0 Then vVeh(i) /= AnzSec(i)
Next
End Sub
End Class