diff --git a/.editorconfig b/.editorconfig
index 89389c81f..59d9a3a3e 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,128 +1,16 @@
-[*.{cs,vb}]
-
-# IDE0003: Remove qualification
-dotnet_diagnostic.IDE0003.severity = silent
-
-# CS0659: Type overrides Object.Equals(object o) but does not override Object.GetHashCode()
-dotnet_diagnostic.CS0659.severity = none
-
-[*.{cs,vb}]
-#### Naming styles ####
-
-# Naming rules
-
-dotnet_naming_rule.interface_should_be_begins_with_i.severity = error
-dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
-dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
-
-dotnet_naming_rule.types_should_be_pascal_case.severity = error
-dotnet_naming_rule.types_should_be_pascal_case.symbols = types
-dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
-
-dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = error
-dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
-dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
-
-# Symbol specifications
-
-dotnet_naming_symbols.interface.applicable_kinds = interface
-dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.interface.required_modifiers =
-
-dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
-dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.types.required_modifiers =
-
-dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
-dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.non_field_members.required_modifiers =
-
-# Naming styles
-
-dotnet_naming_style.begins_with_i.required_prefix = I
-dotnet_naming_style.begins_with_i.required_suffix =
-dotnet_naming_style.begins_with_i.word_separator =
-dotnet_naming_style.begins_with_i.capitalization = pascal_case
-
-dotnet_naming_style.pascal_case.required_prefix =
-dotnet_naming_style.pascal_case.required_suffix =
-dotnet_naming_style.pascal_case.word_separator =
-dotnet_naming_style.pascal_case.capitalization = pascal_case
-
-dotnet_naming_style.pascal_case.required_prefix =
-dotnet_naming_style.pascal_case.required_suffix =
-dotnet_naming_style.pascal_case.word_separator =
-dotnet_naming_style.pascal_case.capitalization = pascal_case
-dotnet_style_coalesce_expression = true:suggestion
-dotnet_style_null_propagation = true:suggestion
-dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
-dotnet_style_prefer_auto_properties = true:silent
-dotnet_style_object_initializer = true:suggestion
-dotnet_style_operator_placement_when_wrapping = beginning_of_line
-tab_width = 4
-indent_size = 4
-end_of_line = crlf
-dotnet_style_collection_initializer = true:suggestion
-dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
-dotnet_style_prefer_conditional_expression_over_assignment = true:silent
-dotnet_style_explicit_tuple_names = true:suggestion
-dotnet_style_prefer_conditional_expression_over_return = true:silent
-dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
-dotnet_style_prefer_inferred_tuple_names = true:suggestion
-dotnet_style_prefer_compound_assignment = true:suggestion
-dotnet_style_prefer_simplified_interpolation = true:suggestion
-dotnet_style_namespace_match_folder = true:suggestion
-dotnet_style_readonly_field = true:suggestion
-dotnet_style_predefined_type_for_locals_parameters_members = true:silent
-dotnet_style_predefined_type_for_member_access = true:silent
-dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
-dotnet_style_allow_multiple_blank_lines_experimental = true:silent
-dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
-dotnet_code_quality_unused_parameters = all:warning
-dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
-dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
-dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
-dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
-
-# IDE0003: Remove qualification
-dotnet_style_qualification_for_field = false
-
-[*.cs]
-csharp_using_directive_placement = outside_namespace:silent
-csharp_prefer_simple_using_statement = true:suggestion
-csharp_prefer_braces = true:silent
-csharp_style_namespace_declarations = block_scoped:silent
-csharp_style_prefer_method_group_conversion = true:silent
-csharp_style_expression_bodied_methods = false:silent
-csharp_style_expression_bodied_constructors = false:silent
-csharp_style_expression_bodied_operators = false:silent
-csharp_style_expression_bodied_properties = true:silent
-csharp_style_expression_bodied_indexers = true:silent
-csharp_style_expression_bodied_accessors = true:silent
-csharp_style_expression_bodied_lambdas = true:silent
-csharp_style_expression_bodied_local_functions = false:silent
-csharp_indent_labels = one_less_than_current
-csharp_space_around_binary_operators = before_and_after
-csharp_style_throw_expression = true:suggestion
-csharp_style_prefer_null_check_over_type_check = true:suggestion
-csharp_prefer_simple_default_expression = true:suggestion
-csharp_style_prefer_local_over_anonymous_function = true:suggestion
-csharp_style_prefer_index_operator = true:suggestion
-csharp_style_prefer_range_operator = true:suggestion
-csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
-csharp_style_prefer_tuple_swap = true:suggestion
-csharp_style_inlined_variable_declaration = true:suggestion
-csharp_style_deconstructed_variable_declaration = true:suggestion
-csharp_style_unused_value_assignment_preference = discard_variable:suggestion
-csharp_style_unused_value_expression_statement_preference = discard_variable:silent
-csharp_prefer_static_local_function = true:suggestion
-csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
-csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
-csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
-csharp_style_conditional_delegate_call = true:suggestion
-csharp_style_prefer_parameter_null_checking = true:suggestion
-csharp_style_prefer_switch_expression = true:suggestion
-csharp_style_prefer_pattern_matching = true:silent
-csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
-csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
-csharp_style_prefer_not_pattern = true:suggestion
\ No newline at end of file
+# Editor configuration, see https://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.ts]
+quote_type = single
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index dfe077042..000000000
--- a/.gitattributes
+++ /dev/null
@@ -1,2 +0,0 @@
-# Auto detect text files and perform LF normalization
-* text=auto
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
index e75fc2e90..6f2921d27 100644
--- a/.github/workflows/pages.yml
+++ b/.github/workflows/pages.yml
@@ -1,24 +1,42 @@
-name: Deploy to Github Pages
+name: Deploy to Github Pages
on:
push:
branches:
- - dev
-# schedule:
-# - cron: '0 0 * * *'
+ - 'pages'
+
+env:
+ TARGET_DIR: dist/analog/public
jobs:
- github-pages:
+ build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - uses: actions/cache@v2
- with:
- path: vendor/bundle
- key: ${{ runner.os }}-gems-v2-${{ hashFiles('**/Gemfile') }}
- restore-keys: |
- ${{ runner.os }}-gems-v2
- - uses: helaili/jekyll-action@v2
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
with:
- token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- target_branch: gh-pages
+ node-version: '20.x'
+ - name: Set environment variable based on branch
+ run: |
+ if [[ $GITHUB_REF == refs/heads/pages ]]; then
+ echo "Branch is main or master. Setting DRY_RUN_OPTION to empty."
+ echo "DRY_RUN_OPTION=" >> $GITHUB_ENV
+ else
+ echo "Branch is not main or master. Setting DRY_RUN_OPTION to '--dry-run'."
+ echo "DRY_RUN_OPTION=--dry-run" >> $GITHUB_ENV
+ fi
+ - name: Install
+ run: npm ci
+ - name: Build
+ run: npm run build
+ - name: Deploy Website (gh-pages branch)
+ env:
+ GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} # A token must be created to be able to deploy on the gh-pages branch
+ CNAME_OPTION: --cname=race.elementfuture.com # omit if your not running it on a custom domain
+ run: |
+ echo "DRY_RUN_OPTION=$DRY_RUN_OPTION"
+ git config user.email "reinierklarenberg@gmail.com"
+ git config user.name "Reinier Klarenberg"
+ npx angular-cli-ghpages --no-silent --dir="${{env.TARGET_DIR}}" $CNAME_OPTION $DRY_RUN_OPTION
+
+
diff --git a/.gitignore b/.gitignore
index 426d76ddc..5c9de1e59 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,47 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# Compiled output
+/dist
+/tmp
+/out-tsc
+/bazel-out
+
+# Node
+/node_modules
+npm-debug.log
+yarn-error.log
+
+# IDEs and editors
+.idea/
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# Visual Studio Code
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+.history/*
+
+# Miscellaneous
+/.angular/cache
+/.nx/cache
+.sass-cache/
+/connect.lock
+/coverage
+/libpeerconnection.log
+testem.log
+/typings
+
+# System files
+.DS_Store
+Thumbs.db
+
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
@@ -97,302 +141,4 @@ StyleCopReport.xml
*.pidb
*.svclog
*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opendb
-*.opensdf
-*.sdf
-*.cachefile
-*.VC.db
-*.VC.VC.opendb
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-*.sap
-
-# Visual Studio Trace Files
-*.e2e
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# AxoCover is a Code Coverage Tool
-.axoCover/*
-!.axoCover/settings.json
-
-# Coverlet is a free, cross platform Code Coverage Tool
-coverage*.json
-coverage*.xml
-coverage*.info
-
-# Visual Studio code coverage results
-*.coverage
-*.coveragexml
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-nCrunchTemp_*
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# Note: Comment the next line if you want to checkin your web deploy settings,
-# but database connection strings (with potential passwords) will be unencrypted
-*.pubxml
-*.publishproj
-
-# Microsoft Azure Web App publish settings. Comment the next line if you want to
-# checkin your Azure Web App publish settings, but sensitive information contained
-# in these scripts will be unencrypted
-PublishScripts/
-
-# NuGet Packages
-*.nupkg
-# NuGet Symbol Packages
-*.snupkg
-# The packages folder can be ignored because of Package Restore
-**/[Pp]ackages/*
-# except build/, which is used as an MSBuild target.
-!**/[Pp]ackages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/[Pp]ackages/repositories.config
-# NuGet v3's project.json files produces more ignorable files
-*.nuget.props
-*.nuget.targets
-
-# Microsoft Azure Build Output
-csx/
-*.build.csdef
-
-# Microsoft Azure Emulator
-ecf/
-rcf/
-
-# Windows Store app package directories and files
-AppPackages/
-BundleArtifacts/
-Package.StoreAssociation.xml
-_pkginfo.txt
-*.appx
-*.appxbundle
-*.appxupload
-
-# Visual Studio cache files
-# files ending in .cache can be ignored
-*.[Cc]ache
-# but keep track of directories ending in .cache
-!?*.[Cc]ache/
-
-# Others
-ClientBin/
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.jfm
-*.pfx
-*.publishsettings
-orleans.codegen.cs
-
-# Including strong name files can present a security risk
-# (https://github.com/github/gitignore/pull/2483#issue-259490424)
-#*.snk
-
-# Since there are multiple workflows, uncomment next line to ignore bower_components
-# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
-#bower_components/
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-ServiceFabricBackup/
-*.rptproj.bak
-
-# SQL Server files
-*.mdf
-*.ldf
-*.ndf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-*.rptproj.rsuser
-*- [Bb]ackup.rdl
-*- [Bb]ackup ([0-9]).rdl
-*- [Bb]ackup ([0-9][0-9]).rdl
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# GhostDoc plugin setting file
-*.GhostDoc.xml
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-node_modules/
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
-
-# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
-*.vbw
-
-# Visual Studio 6 auto-generated project file (contains which files were open etc.)
-*.vbp
-
-# Visual Studio 6 workspace and project file (working project files containing files to include in project)
-*.dsw
-*.dsp
-
-# Visual Studio 6 technical files
-*.ncb
-*.aps
-
-# Visual Studio LightSwitch build output
-**/*.HTMLClient/GeneratedArtifacts
-**/*.DesktopClient/GeneratedArtifacts
-**/*.DesktopClient/ModelManifest.xml
-**/*.Server/GeneratedArtifacts
-**/*.Server/ModelManifest.xml
-_Pvt_Extensions
-
-# Paket dependency manager
-.paket/paket.exe
-paket-files/
-
-# FAKE - F# Make
-.fake/
-
-# CodeRush personal settings
-.cr/personal
-
-# Python Tools for Visual Studio (PTVS)
-__pycache__/
-*.pyc
-
-# Cake - Uncomment if you are using it
-# tools/**
-# !tools/packages.config
-
-# Tabs Studio
-*.tss
-
-# Telerik's JustMock configuration file
-*.jmconfig
-
-# BizTalk build output
-*.btp.cs
-*.btm.cs
-*.odx.cs
-*.xsd.cs
-
-# OpenCover UI analysis results
-OpenCover/
-
-# Azure Stream Analytics local run output
-ASALocalRun/
-
-# MSBuild Binary and Structured Log
-*.binlog
-
-# NVidia Nsight GPU debugger configuration file
-*.nvuser
-
-# MFractors (Xamarin productivity tool) working folder
-.mfractor/
-
-# Local History for Visual Studio
-.localhistory/
-
-# Visual Studio History (VSHistory) files
-.vshistory/
-
-# BeatPulse healthcheck temp database
-healthchecksdb
-
-# Backup folder for Package Reference Convert tool in Visual Studio 2017
-MigrationBackup/
-
-# Ionide (cross platform F# VS Code tools) working folder
-.ionide/
-
-# Fody - auto-generated XML schema
-FodyWeavers.xsd
-
-# VS Code files for those working on multiple tools
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
-*.code-workspace
-
-# Local History for Visual Studio Code
-.history/
-
-# Windows Installer files from build outputs
-*.cab
-*.msi
-*.msix
-*.msm
-*.msp
-
-# JetBrains Rider
-*.sln.iml
+/.nx
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 000000000..77b374577
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,4 @@
+{
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
+ "recommendations": ["angular.ng-template"]
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 000000000..57dbf761e
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,19 @@
+{
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "ng serve",
+ "type": "chrome",
+ "request": "launch",
+ "preLaunchTask": "npm: start",
+ "url": "http://localhost:5173/"
+ },
+ {
+ "name": "ng test",
+ "type": "chrome",
+ "request": "launch",
+ "preLaunchTask": "npm: test"
+ }
+ ]
+}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 000000000..a298b5bd8
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,42 @@
+{
+ // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "type": "npm",
+ "script": "start",
+ "isBackground": true,
+ "problemMatcher": {
+ "owner": "typescript",
+ "pattern": "$tsc",
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": {
+ "regexp": "(.*?)"
+ },
+ "endsPattern": {
+ "regexp": "bundle generation complete"
+ }
+ }
+ }
+ },
+ {
+ "type": "npm",
+ "script": "test",
+ "isBackground": true,
+ "problemMatcher": {
+ "owner": "typescript",
+ "pattern": "$tsc",
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": {
+ "regexp": "(.*?)"
+ },
+ "endsPattern": {
+ "regexp": "bundle generation complete"
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/Gemfile b/Gemfile
deleted file mode 100644
index 701e920cc..000000000
--- a/Gemfile
+++ /dev/null
@@ -1,6 +0,0 @@
-source 'https://rubygems.org'
-
-gem 'jekyll-dash', '~> 2.4'
-gem 'jekyll-sass-converter', '~> 2.0'
-gem 'liquid-md5'
-gem 'jekyll-tagging'
diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index 6a9f4fe47..000000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
diff --git a/README.md b/README.md
index b0daac3ee..684df4a42 100644
--- a/README.md
+++ b/README.md
@@ -1,25 +1,26 @@
-# 
+# Analog App
+This project was generated with [Analog](https://analogjs.org), the fullstack meta-framework for Angular.
-[](https://ci.appveyor.com/project/RiddleTime/race-element)
-[](https://discord.gg/26AAEW5mUq)
-[](https://hits.seeyoufarm.com)
+## Setup
-Provides tooling for Sim Racing
-- HUDs
-- Telemetry
-- Setups
-- Liveries
-- Racing Tools
+Run `npm install` to install the application dependencies.
-[Download Latest Release](https://github.com/RiddleTime/Race-Element/releases/latest)
+## Development
+Run `npm start` for a dev server. Navigate to `http://localhost:5173/`. The application automatically reloads if you change any of the source files.
-### Requires .NET Framework 4.8
-[https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48)
+## Build
-### Frameworks
-- WPF
-- [MaterialDesign In Xaml Toolkit](https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit)
-- [LiteDB](https://github.com/mbdavid/LiteDB)
-- [ScottPlot](https://github.com/scottplot/scottplot)
+Run `npm run build` to build the client/server project. The client build artifacts are located in the `dist/analog/public` directory. The server for the API build artifacts are located in the `dist/analog/server` directory.
+
+## Test
+
+Run `npm run test` to run unit tests with [Vitest](https://vitest.dev).
+
+## Community
+
+- Visit and Star the [GitHub Repo](https://github.com/analogjs/analog)
+- Join the [Discord](https://chat.analogjs.org)
+- Follow us on [Twitter](https://twitter.com/analogjs)
+- Become a [Sponsor](https://github.com/sponsors/brandonroberts)
diff --git a/Race Element.sln b/Race Element.sln
deleted file mode 100644
index 1e0ceed39..000000000
--- a/Race Element.sln
+++ /dev/null
@@ -1,191 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.1.32328.378
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Race Element", "Race_Element\Race Element.csproj", "{DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Race Element.HUD", "Race_Element.HUD\Race Element.HUD.csproj", "{3717A55E-4629-40ED-9C93-24058D9EF18C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Race Element.HUD.ACC", "Race_Element.HUD.ACC\Race Element.HUD.ACC.csproj", "{F1699F70-54A1-49F2-896D-B70B1EDABF74}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Race Element.SharedMemory", "Race_Element.SharedMemory\Race Element.SharedMemory.csproj", "{9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Race Element.Util", "Race_Element.Util\Race Element.Util.csproj", "{AAB23116-299B-415B-8305-96CB86148CE7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Race Element.Data.ACC", "Race_Element.Data.ACC\Race Element.Data.ACC.csproj", "{BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Race Element.Broadcast", "Race_Element.Broadcast\Race Element.Broadcast.csproj", "{840220BD-8469-4A04-A6EC-1ED2BC743EFB}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6CD0A8A8-EC7F-4626-AF60-EB41B5C990CE}"
- ProjectSection(SolutionItems) = preProject
- .editorconfig = .editorconfig
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Race Element.Hardware", "Race_Element.Hardware\Race Element.Hardware.csproj", "{8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug Minimized|Any CPU = Debug Minimized|Any CPU
- Debug Minimized|x64 = Debug Minimized|x64
- Debug Minimized|x86 = Debug Minimized|x86
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug Minimized|Any CPU.ActiveCfg = Debug Minimized|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug Minimized|Any CPU.Build.0 = Debug Minimized|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug Minimized|x64.ActiveCfg = Debug Minimized|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug Minimized|x64.Build.0 = Debug Minimized|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug Minimized|x86.ActiveCfg = Debug Minimized|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug Minimized|x86.Build.0 = Debug Minimized|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug|x64.ActiveCfg = Debug|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug|x64.Build.0 = Debug|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug|x86.ActiveCfg = Debug|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Debug|x86.Build.0 = Debug|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Release|Any CPU.Build.0 = Release|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Release|x64.ActiveCfg = Release|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Release|x64.Build.0 = Release|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Release|x86.ActiveCfg = Release|Any CPU
- {DEA7B2CA-611A-4CB8-BEDA-988F3EA11AF9}.Release|x86.Build.0 = Release|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug Minimized|Any CPU.ActiveCfg = Debug Minimized|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug Minimized|Any CPU.Build.0 = Debug Minimized|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug Minimized|x64.ActiveCfg = Debug Minimized|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug Minimized|x64.Build.0 = Debug Minimized|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug Minimized|x86.ActiveCfg = Debug Minimized|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug Minimized|x86.Build.0 = Debug Minimized|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug|x64.ActiveCfg = Debug|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug|x64.Build.0 = Debug|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug|x86.ActiveCfg = Debug|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Debug|x86.Build.0 = Debug|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Release|Any CPU.Build.0 = Release|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Release|x64.ActiveCfg = Release|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Release|x64.Build.0 = Release|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Release|x86.ActiveCfg = Release|Any CPU
- {3717A55E-4629-40ED-9C93-24058D9EF18C}.Release|x86.Build.0 = Release|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug Minimized|Any CPU.ActiveCfg = Debug Minimized|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug Minimized|Any CPU.Build.0 = Debug Minimized|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug Minimized|x64.ActiveCfg = Debug Minimized|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug Minimized|x64.Build.0 = Debug Minimized|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug Minimized|x86.ActiveCfg = Debug Minimized|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug Minimized|x86.Build.0 = Debug Minimized|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug|x64.ActiveCfg = Debug|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug|x64.Build.0 = Debug|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug|x86.ActiveCfg = Debug|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Debug|x86.Build.0 = Debug|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Release|Any CPU.Build.0 = Release|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Release|x64.ActiveCfg = Release|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Release|x64.Build.0 = Release|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Release|x86.ActiveCfg = Release|Any CPU
- {F1699F70-54A1-49F2-896D-B70B1EDABF74}.Release|x86.Build.0 = Release|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug Minimized|Any CPU.ActiveCfg = Debug Minimized|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug Minimized|Any CPU.Build.0 = Debug Minimized|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug Minimized|x64.ActiveCfg = Debug Minimized|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug Minimized|x64.Build.0 = Debug Minimized|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug Minimized|x86.ActiveCfg = Debug Minimized|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug Minimized|x86.Build.0 = Debug Minimized|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug|x64.ActiveCfg = Debug|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug|x64.Build.0 = Debug|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug|x86.ActiveCfg = Debug|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Debug|x86.Build.0 = Debug|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Release|Any CPU.Build.0 = Release|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Release|x64.ActiveCfg = Release|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Release|x64.Build.0 = Release|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Release|x86.ActiveCfg = Release|Any CPU
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}.Release|x86.Build.0 = Release|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug Minimized|Any CPU.ActiveCfg = Debug Minimized|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug Minimized|Any CPU.Build.0 = Debug Minimized|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug Minimized|x64.ActiveCfg = Debug Minimized|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug Minimized|x64.Build.0 = Debug Minimized|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug Minimized|x86.ActiveCfg = Debug Minimized|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug Minimized|x86.Build.0 = Debug Minimized|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug|x64.ActiveCfg = Debug|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug|x64.Build.0 = Debug|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug|x86.ActiveCfg = Debug|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Debug|x86.Build.0 = Debug|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Release|Any CPU.Build.0 = Release|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Release|x64.ActiveCfg = Release|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Release|x64.Build.0 = Release|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Release|x86.ActiveCfg = Release|Any CPU
- {AAB23116-299B-415B-8305-96CB86148CE7}.Release|x86.Build.0 = Release|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug Minimized|Any CPU.ActiveCfg = Debug Minimized|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug Minimized|Any CPU.Build.0 = Debug Minimized|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug Minimized|x64.ActiveCfg = Debug Minimized|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug Minimized|x64.Build.0 = Debug Minimized|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug Minimized|x86.ActiveCfg = Debug Minimized|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug Minimized|x86.Build.0 = Debug Minimized|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug|x64.ActiveCfg = Debug|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug|x64.Build.0 = Debug|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug|x86.ActiveCfg = Debug|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Debug|x86.Build.0 = Debug|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Release|Any CPU.Build.0 = Release|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Release|x64.ActiveCfg = Release|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Release|x64.Build.0 = Release|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Release|x86.ActiveCfg = Release|Any CPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}.Release|x86.Build.0 = Release|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug Minimized|Any CPU.ActiveCfg = Debug Minimized|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug Minimized|Any CPU.Build.0 = Debug Minimized|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug Minimized|x64.ActiveCfg = Debug Minimized|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug Minimized|x64.Build.0 = Debug Minimized|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug Minimized|x86.ActiveCfg = Debug Minimized|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug Minimized|x86.Build.0 = Debug Minimized|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug|x64.ActiveCfg = Debug|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug|x64.Build.0 = Debug|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug|x86.ActiveCfg = Debug|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Debug|x86.Build.0 = Debug|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Release|Any CPU.Build.0 = Release|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Release|x64.ActiveCfg = Release|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Release|x64.Build.0 = Release|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Release|x86.ActiveCfg = Release|Any CPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}.Release|x86.Build.0 = Release|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug Minimized|Any CPU.ActiveCfg = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug Minimized|Any CPU.Build.0 = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug Minimized|x64.ActiveCfg = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug Minimized|x64.Build.0 = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug Minimized|x86.ActiveCfg = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug Minimized|x86.Build.0 = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug|x64.ActiveCfg = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug|x64.Build.0 = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug|x86.ActiveCfg = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Debug|x86.Build.0 = Debug|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Release|Any CPU.Build.0 = Release|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Release|x64.ActiveCfg = Release|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Release|x64.Build.0 = Release|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Release|x86.ActiveCfg = Release|Any CPU
- {8A7A4857-2F0A-4E85-98C5-3EA1228A8CE2}.Release|x86.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {D4FB11E1-6550-4E3D-B2CE-4346D74712F8}
- EndGlobalSection
-EndGlobal
diff --git a/Race_Element.Broadcast/ACCUdpRemoteClient.cs b/Race_Element.Broadcast/ACCUdpRemoteClient.cs
deleted file mode 100644
index d655f1022..000000000
--- a/Race_Element.Broadcast/ACCUdpRemoteClient.cs
+++ /dev/null
@@ -1,145 +0,0 @@
-using System;
-using System.Linq;
-using System.Net;
-using System.Net.Sockets;
-using System.Threading.Tasks;
-
-namespace RaceElement.Broadcast
-{
- public class ACCUdpRemoteClient : IDisposable
- {
- private UdpClient _client;
- private Task _listenerTask;
- public BroadcastingNetworkProtocol MessageHandler { get; }
- public string IpPort { get; }
- public string DisplayName { get; }
- public string ConnectionPassword { get; }
- public string CommandPassword { get; }
- public int MsRealtimeUpdateInterval { get; }
-
- ///
- /// To get the events delivered inside the UI thread, just create this object from the UI thread/synchronization context.
- ///
- public ACCUdpRemoteClient(string ip, int port, string displayName, string connectionPassword, string commandPassword, int msRealtimeUpdateInterval)
- {
- IpPort = $"{ip}:{port}";
- MessageHandler = new BroadcastingNetworkProtocol(IpPort, Send);
- _client = new UdpClient(new IPEndPoint(IPAddress.Loopback, 0));
- _client.Connect(ip, port);
-
- DisplayName = displayName;
- ConnectionPassword = connectionPassword;
- CommandPassword = commandPassword;
- MsRealtimeUpdateInterval = msRealtimeUpdateInterval;
-
- _listenerTask = ConnectAndRun();
- }
-
- private void Send(byte[] payload)
- {
- if (_client != null)
- _client.Send(payload, payload.Length);
- }
-
- public void Shutdown()
- {
- ShutdownAsnyc().ContinueWith(t =>
- {
- if (t.Exception?.InnerExceptions?.Any() == true)
- System.Diagnostics.Debug.WriteLine($"Broadcast Client shut down with {t.Exception.InnerExceptions.Count} errors");
- //else
- //System.Diagnostics.Debug.WriteLine("Client shut down asynchronously");
-
- });
- }
-
- public async Task ShutdownAsnyc()
- {
- if (_client == null)
- return;
-
- if (_listenerTask != null && !_listenerTask.IsCompleted)
- {
- MessageHandler.Disconnect();
- _client.Close();
- _client = null;
- await _listenerTask;
- }
- }
-
- private async Task ConnectAndRun()
- {
- MessageHandler.RequestConnection(DisplayName, ConnectionPassword, MsRealtimeUpdateInterval, CommandPassword);
- while (_client != null)
- {
- try
- {
- var udpPacket = await _client.ReceiveAsync();
- using (var ms = new System.IO.MemoryStream(udpPacket.Buffer))
- using (var reader = new System.IO.BinaryReader(ms))
- {
- MessageHandler.ProcessMessage(reader);
- }
- }
- catch (ObjectDisposedException)
- {
- // Shutdown happened
- break;
- }
- catch (Exception)
- {
- // Other exceptions
- //System.Diagnostics.Debug.WriteLine(ex);
- }
- }
- }
-
- #region IDisposable Support
- private bool disposedValue = false; // To detect redundant calls
-
- protected virtual void Dispose(bool disposing)
- {
- if (!disposedValue)
- {
- if (disposing)
- {
- try
- {
- if (_client != null)
- {
- _client.Close();
- _client.Dispose();
- _client = null;
- }
-
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex);
- }
- }
-
- // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
- // TODO: set large fields to null.
-
- disposedValue = true;
- }
- }
-
- // TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources.
- // ~ACCUdpRemoteClient() {
- // // Do not change this code. Put cleanup code in Dispose(bool disposing) above.
- // Dispose(false);
- // }
-
- // This code added to correctly implement the disposable pattern.
- public void Dispose()
- {
- // Do not change this code. Put cleanup code in Dispose(bool disposing) above.
- Dispose(true);
- // TODO: uncomment the following line if the finalizer is overridden above.
- // GC.SuppressFinalize(this);
- }
- #endregion
- }
-}
diff --git a/Race_Element.Broadcast/BroadcastConfig.cs b/Race_Element.Broadcast/BroadcastConfig.cs
deleted file mode 100644
index bde306f44..000000000
--- a/Race_Element.Broadcast/BroadcastConfig.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-using RaceElement.Util;
-using Newtonsoft.Json;
-using System;
-using System.Diagnostics;
-using System.IO;
-
-namespace RaceElement.Broadcast
-{
- public class BroadcastConfig
- {
- public class Root
- {
- [JsonProperty("updListenerPort")]
- public int UpdListenerPort { get; set; }
- [JsonProperty("connectionPassword")]
- public string ConnectionPassword { get; set; }
- [JsonProperty("commandPassword")]
- public string CommandPassword { get; set; }
- }
-
- private static string _lock = String.Empty;
-
- public static Root GetConfiguration()
- {
- lock (_lock)
- {
- FileInfo broadcastingConfig = new FileInfo(FileUtil.AccConfigPath + "broadcasting.json");
-
- if (broadcastingConfig.Exists)
- {
- try
- {
- using (FileStream fileStream = broadcastingConfig.OpenRead())
- {
- Root config = GetConfiguration(fileStream);
-
- if (config.UpdListenerPort == 0)
- {
- config.UpdListenerPort = 9000;
- File.WriteAllText(broadcastingConfig.FullName, JsonConvert.SerializeObject(config, Formatting.Indented));
- LogWriter.WriteToLog($"Auto-Changed the port number in \"{FileUtil.AccConfigPath}broadcasting.json\" from 0 to 9000.");
- }
-
- return config;
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex);
- }
- }
- }
- return null;
- }
-
-
- private static Root GetConfiguration(Stream stream)
- {
- string jsonString = string.Empty;
- try
- {
- using (StreamReader reader = new StreamReader(stream))
- {
- jsonString = reader.ReadToEnd();
- jsonString = jsonString.Replace("\0", "");
- reader.Close();
- stream.Close();
- }
-
- return JsonConvert.DeserializeObject(jsonString);
- }
- catch (Exception e)
- {
- Debug.WriteLine(e);
- }
-
- return null;
- }
-
- }
-}
diff --git a/Race_Element.Broadcast/BroadcastingEnums.cs b/Race_Element.Broadcast/BroadcastingEnums.cs
deleted file mode 100644
index b934428af..000000000
--- a/Race_Element.Broadcast/BroadcastingEnums.cs
+++ /dev/null
@@ -1,153 +0,0 @@
-namespace RaceElement.Broadcast
-{
- public enum DriverCategory
- {
- Platinum = 3,
- Gold = 2,
- Silver = 1,
- Bronze = 0,
- Error = 255
- }
-
- public enum LapType
- {
- ERROR = 0,
- Outlap = 1,
- Regular = 2,
- Inlap = 3
- }
-
- public enum CarLocationEnum
- {
- NONE = 0,
- Track = 1,
- Pitlane = 2,
- PitEntry = 3,
- PitExit = 4
- }
-
- public enum SessionPhase
- {
- NONE = 0,
- Starting = 1,
- PreFormation = 2,
- FormationLap = 3,
- PreSession = 4,
- Session = 5,
- SessionOver = 6,
- PostSession = 7,
- ResultUI = 8
- };
- public enum RaceSessionType
- {
- Practice = 0,
- Qualifying = 4,
- Superpole = 9,
- Race = 10,
- Hotlap = 11,
- Hotstint = 12,
- HotlapSuperpole = 13,
- Replay = 14
- };
-
- public enum BroadcastingCarEventType
- {
- None = 0,
- GreenFlag = 1,
- SessionOver = 2,
- PenaltyCommMsg = 3,
- Accident = 4,
- LapCompleted = 5,
- BestSessionLap = 6,
- BestPersonalLap = 7
- };
-
- public enum NationalityEnum
- {
- Any = 0,
- Italy = 1,
- Germany = 2,
- France = 3,
- Spain = 4,
- GreatBritain = 5,
- Hungary = 6,
- Belgium = 7,
- Switzerland = 8,
- Austria = 9,
- Russia = 10,
- Thailand = 11,
- Netherlands = 12,
- Poland = 13,
- Argentina = 14,
- Monaco = 15,
- Ireland = 16,
- Brazil = 17,
- SouthAfrica = 18,
- PuertoRico = 19,
- Slovakia = 20,
- Oman = 21,
- Greece = 22,
- SaudiArabia = 23,
- Norway = 24,
- Turkey = 25,
- SouthKorea = 26,
- Lebanon = 27,
- Armenia = 28,
- Mexico = 29,
- Sweden = 30,
- Finland = 31,
- Denmark = 32,
- Croatia = 33,
- Canada = 34,
- China = 35,
- Portugal = 36,
- Singapore = 37,
- Indonesia = 38,
- USA = 39,
- NewZealand = 40,
- Australia = 41,
- SanMarino = 42,
- UAE = 43,
- Luxembourg = 44,
- Kuwait = 45,
- HongKong = 46,
- Colombia = 47,
- Japan = 48,
- Andorra = 49,
- Azerbaijan = 50,
- Bulgaria = 51,
- Cuba = 52,
- CzechRepublic = 53,
- Estonia = 54,
- Georgia = 55,
- India = 56,
- Israel = 57,
- Jamaica = 58,
- Latvia = 59,
- Lithuania = 60,
- Macau = 61,
- Malaysia = 62,
- Nepal = 63,
- NewCaledonia = 64,
- Nigeria = 65,
- NorthernIreland = 66,
- PapuaNewGuinea = 67,
- Philippines = 68,
- Qatar = 69,
- Romania = 70,
- Scotland = 71,
- Serbia = 72,
- Slovenia = 73,
- Taiwan = 74,
- Ukraine = 75,
- Venezuela = 76,
- Wales = 77,
- Iran = 78,
- Bahrain = 79,
- Zimbabwe = 80,
- ChineseTaipei = 81,
- Chile = 82,
- Uruguay = 83,
- Madagascar = 84
- };
-}
diff --git a/Race_Element.Broadcast/BroadcastingNetworkProtocol.cs b/Race_Element.Broadcast/BroadcastingNetworkProtocol.cs
deleted file mode 100644
index 6569b1d22..000000000
--- a/Race_Element.Broadcast/BroadcastingNetworkProtocol.cs
+++ /dev/null
@@ -1,524 +0,0 @@
-using RaceElement.Broadcast.Structs;
-using RaceElement.Util;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Text;
-
-namespace RaceElement.Broadcast
-{
- public enum OutboundMessageTypes : byte
- {
- REGISTER_COMMAND_APPLICATION = 1,
- UNREGISTER_COMMAND_APPLICATION = 9,
-
- REQUEST_ENTRY_LIST = 10,
- REQUEST_TRACK_DATA = 11,
-
- CHANGE_HUD_PAGE = 49,
- CHANGE_FOCUS = 50,
- INSTANT_REPLAY_REQUEST = 51,
-
- PLAY_MANUAL_REPLAY_HIGHLIGHT = 52, // TODO, but planned
- SAVE_MANUAL_REPLAY_HIGHLIGHT = 60 // TODO, but planned: saving manual replays gives distributed clients the possibility to see the play the same replay
- }
-
- public enum InboundMessageTypes : byte
- {
- REGISTRATION_RESULT = 1,
- REALTIME_UPDATE = 2,
- REALTIME_CAR_UPDATE = 3,
- ENTRY_LIST = 4,
- ENTRY_LIST_CAR = 6,
- TRACK_DATA = 5,
- BROADCASTING_EVENT = 7
- }
-
- public class BroadcastingNetworkProtocol
- {
- public const int BROADCASTING_PROTOCOL_VERSION = 4;
- private string ConnectionIdentifier { get; }
- private SendMessageDelegate Send { get; }
- public int ConnectionId { get; private set; }
- public float TrackMeters { get; private set; }
-
- internal delegate void SendMessageDelegate(byte[] payload);
-
- #region Events
-
- public delegate void ConnectionStateChangedDelegate(int connectionId, bool connectionSuccess, bool isReadonly, string error);
- public event ConnectionStateChangedDelegate OnConnectionStateChanged;
-
- public delegate void TrackDataUpdateDelegate(string sender, TrackData trackUpdate);
- public event TrackDataUpdateDelegate OnTrackDataUpdate;
-
- public delegate void EntryListUpdateDelegate(string sender, CarInfo car);
- public event EntryListUpdateDelegate OnEntrylistUpdate;
-
- public delegate void RealtimeUpdateDelegate(string sender, RealtimeUpdate update);
- public event RealtimeUpdateDelegate OnRealtimeUpdate;
-
- public delegate void RealtimeCarUpdateDelegate(string sender, RealtimeCarUpdate carUpdate);
- public event RealtimeCarUpdateDelegate OnRealtimeCarUpdate;
-
- public delegate void BroadcastingEventDelegate(string sender, BroadcastingEvent evt);
- public event BroadcastingEventDelegate OnBroadcastingEvent;
-
-
-
- #endregion
-
- #region EntryList handling
-
- // To avoid huge UDP pakets for longer entry lists, we will first receive the indexes of cars and drivers,
- // cache the entries and wait for the detailled updates
- List _entryListCars = new List();
-
- #endregion
-
- #region optional failsafety - detect when we have a desync and need a new entry list
-
- DateTime lastEntrylistRequest = DateTime.Now;
-
- #endregion
-
- internal BroadcastingNetworkProtocol(string connectionIdentifier, SendMessageDelegate sendMessageDelegate)
- {
- if (string.IsNullOrEmpty(connectionIdentifier))
- throw new ArgumentNullException(nameof(connectionIdentifier), $"No connection identifier set; we use this to distinguish different connections. Using the remote IP:Port is a good idea");
-
- if (sendMessageDelegate == null)
- throw new ArgumentNullException(nameof(sendMessageDelegate), $"The protocol class doesn't know anything about the network layer; please put a callback we can use to send data via UDP");
-
- ConnectionIdentifier = connectionIdentifier;
- Send = sendMessageDelegate;
- }
-
- internal void ProcessMessage(BinaryReader br)
- {
- try
- {
- // Any message starts with an 1-byte command type
- var messageType = (InboundMessageTypes)br.ReadByte();
- switch (messageType)
- {
- case InboundMessageTypes.REGISTRATION_RESULT:
- {
- ConnectionId = br.ReadInt32();
- var connectionSuccess = br.ReadByte() > 0;
- var isReadonly = br.ReadByte() == 0;
- var errMsg = ReadString(br);
-
- OnConnectionStateChanged?.Invoke(ConnectionId, connectionSuccess, isReadonly, errMsg);
-
- // In case this was successful, we will request the initial data
- RequestEntryList();
- RequestTrackData();
- }
- break;
- case InboundMessageTypes.ENTRY_LIST:
- {
- _entryListCars.Clear();
-
- var connectionId = br.ReadInt32();
- var carEntryCount = br.ReadUInt16();
- for (int i = 0; i < carEntryCount; i++)
- {
- _entryListCars.Add(new CarInfo(br.ReadUInt16()));
- }
- }
- break;
- case InboundMessageTypes.ENTRY_LIST_CAR:
- {
-
- var carId = br.ReadUInt16();
-
- var carInfo = _entryListCars.SingleOrDefault(x => x.CarIndex == carId);
- if (carInfo == null)
- {
- //System.Diagnostics.Debug.WriteLine($"Entry list update for unknown carIndex {carId}");
- break;
- }
-
- carInfo.CarModelType = br.ReadByte(); // Byte sized car model
- carInfo.TeamName = ReadString(br);
- carInfo.RaceNumber = br.ReadInt32();
- carInfo.CupCategory = br.ReadByte(); // Cup: Overall/Pro = 0, ProAm = 1, Am = 2, Silver = 3, National = 4
- carInfo.CurrentDriverIndex = br.ReadByte();
- carInfo.Nationality = (NationalityEnum)br.ReadUInt16();
-
- // Now the drivers on this car:
- var driversOnCarCount = br.ReadByte();
- for (int di = 0; di < driversOnCarCount; di++)
- {
- var driverInfo = new DriverInfo();
-
- driverInfo.FirstName = ReadString(br);
- driverInfo.LastName = ReadString(br);
- driverInfo.ShortName = ReadString(br);
- driverInfo.Category = (DriverCategory)br.ReadByte(); // Platinum = 3, Gold = 2, Silver = 1, Bronze = 0
-
- // new in 1.13.11:
- driverInfo.Nationality = (NationalityEnum)br.ReadUInt16();
-
- carInfo.AddDriver(driverInfo);
- }
-
- OnEntrylistUpdate?.Invoke(ConnectionIdentifier, carInfo);
- }
- break;
- case InboundMessageTypes.REALTIME_UPDATE:
- {
- RealtimeUpdate update = new RealtimeUpdate();
- update.EventIndex = (int)br.ReadUInt16();
- update.SessionIndex = (int)br.ReadUInt16();
- update.SessionType = (RaceSessionType)br.ReadByte();
- update.Phase = (SessionPhase)br.ReadByte();
- var sessionTime = br.ReadSingle();
- update.SessionTime = TimeSpan.FromMilliseconds(sessionTime);
- var sessionEndTime = br.ReadSingle();
- update.SessionEndTime = TimeSpan.FromMilliseconds(sessionEndTime);
-
- update.FocusedCarIndex = br.ReadInt32();
- update.ActiveCameraSet = ReadString(br);
- update.ActiveCamera = ReadString(br);
- update.CurrentHudPage = ReadString(br);
-
- update.IsReplayPlaying = br.ReadByte() > 0;
- if (update.IsReplayPlaying)
- {
- update.ReplaySessionTime = br.ReadSingle();
- update.ReplayRemainingTime = br.ReadSingle();
- }
-
- update.TimeOfDay = TimeSpan.FromMilliseconds(br.ReadSingle());
- update.AmbientTemp = br.ReadByte();
- update.TrackTemp = br.ReadByte();
- update.Clouds = br.ReadByte() / 10.0f;
- update.RainLevel = br.ReadByte() / 10.0f;
- update.Wetness = br.ReadByte() / 10.0f;
-
- update.BestSessionLap = ReadLap(br);
-
- OnRealtimeUpdate?.Invoke(ConnectionIdentifier, update);
- }
- break;
- case InboundMessageTypes.REALTIME_CAR_UPDATE:
- {
- RealtimeCarUpdate carUpdate = new RealtimeCarUpdate();
-
- carUpdate.CarIndex = br.ReadUInt16();
- carUpdate.DriverIndex = br.ReadUInt16(); // Driver swap will make this change
- carUpdate.DriverCount = br.ReadByte();
- carUpdate.Gear = br.ReadByte() - 2; // -2 makes the R -1, N 0 and the rest as-is
- carUpdate.Heading = br.ReadSingle();
- carUpdate.WorldPosX = br.ReadSingle();
- carUpdate.WorldPosY = br.ReadSingle();
- carUpdate.CarLocation = (CarLocationEnum)br.ReadByte(); // - , Track, Pitlane, PitEntry, PitExit = 4
- carUpdate.Kmh = br.ReadUInt16();
- carUpdate.Position = br.ReadUInt16(); // official P/Q/R position (1 based)
- carUpdate.CupPosition = br.ReadUInt16(); // official P/Q/R position (1 based)
- carUpdate.TrackPosition = br.ReadUInt16(); // position on track (1 based)
- carUpdate.SplinePosition = br.ReadSingle(); // track position between 0.0 and 1.0
- carUpdate.Laps = br.ReadUInt16();
-
- carUpdate.Delta = br.ReadInt32(); // Realtime delta to best session lap
- carUpdate.BestSessionLap = ReadLap(br);
- carUpdate.LastLap = ReadLap(br);
- carUpdate.CurrentLap = ReadLap(br);
-
- // the concept is: "don't know a car or driver? ask for an entry list update"
- var carEntry = _entryListCars.FirstOrDefault(x => x.CarIndex == carUpdate.CarIndex);
- if (carEntry == null || carEntry.Drivers.Count != carUpdate.DriverCount)
- {
- if ((DateTime.Now - lastEntrylistRequest).TotalSeconds > 1)
- {
- lastEntrylistRequest = DateTime.Now;
- RequestEntryList();
- //System.Diagnostics.Debug.WriteLine($"CarUpdate {carUpdate.CarIndex}|{carUpdate.DriverIndex} not know, will ask for new EntryList");
- }
- }
- else
- {
- OnRealtimeCarUpdate?.Invoke(ConnectionIdentifier, carUpdate);
- }
- }
- break;
- case InboundMessageTypes.TRACK_DATA:
- {
- var connectionId = br.ReadInt32();
- var trackData = new TrackData();
-
- trackData.TrackName = ReadString(br);
- trackData.TrackId = br.ReadInt32();
- trackData.TrackMeters = br.ReadInt32();
- TrackMeters = trackData.TrackMeters > 0 ? trackData.TrackMeters : -1;
-
- trackData.CameraSets = new Dictionary>();
-
- var cameraSetCount = br.ReadByte();
- for (int camSet = 0; camSet < cameraSetCount; camSet++)
- {
- var camSetName = ReadString(br);
- trackData.CameraSets.Add(camSetName, new List());
-
- var cameraCount = br.ReadByte();
- for (int cam = 0; cam < cameraCount; cam++)
- {
- var cameraName = ReadString(br);
- trackData.CameraSets[camSetName].Add(cameraName);
- }
- }
-
- var hudPages = new List();
- var hudPagesCount = br.ReadByte();
- for (int i = 0; i < hudPagesCount; i++)
- {
- hudPages.Add(ReadString(br));
- }
- trackData.HUDPages = hudPages;
-
- OnTrackDataUpdate?.Invoke(ConnectionIdentifier, trackData);
- }
- break;
- case InboundMessageTypes.BROADCASTING_EVENT:
- {
- BroadcastingEvent evt = new BroadcastingEvent()
- {
- Type = (BroadcastingCarEventType)br.ReadByte(),
- Msg = ReadString(br),
- TimeMs = br.ReadInt32(),
- CarId = br.ReadInt32(),
- };
-
- evt.CarData = _entryListCars.FirstOrDefault(x => x.CarIndex == evt.CarId);
- OnBroadcastingEvent?.Invoke(ConnectionIdentifier, evt);
- }
- break;
- default:
- break;
- }
- }
- catch (Exception ex)
- {
- LogWriter.WriteToLog(ex);
- Debug.WriteLine(ex);
- }
- }
-
- ///
- /// Laps are always sent in a common way, it makes sense to have a shared function to parse them
- ///
- private static LapInfo ReadLap(BinaryReader br)
- {
- var lap = new LapInfo();
- lap.LaptimeMS = br.ReadInt32();
-
- lap.CarIndex = br.ReadUInt16();
- lap.DriverIndex = br.ReadUInt16();
-
- var splitCount = br.ReadByte();
- for (int i = 0; i < splitCount; i++)
- lap.Splits.Add(br.ReadInt32());
-
- lap.IsInvalid = br.ReadByte() > 0;
- lap.IsValidForBest = br.ReadByte() > 0;
-
- var isOutlap = br.ReadByte() > 0;
- var isInlap = br.ReadByte() > 0;
-
- if (isOutlap)
- lap.Type = LapType.Outlap;
- else if (isInlap)
- lap.Type = LapType.Inlap;
- else
- lap.Type = LapType.Regular;
-
- // Now it's possible that this is "no" lap that doesn't even include a
- // first split, we can detect this by comparing with int32.Max
- while (lap.Splits.Count < 3)
- {
- lap.Splits.Add(null);
- }
-
- // "null" entries are Int32.Max, in the C# world we can replace this to null
- for (int i = 0; i < lap.Splits.Count; i++)
- if (lap.Splits[i] == Int32.MaxValue)
- lap.Splits[i] = null;
-
- if (lap.LaptimeMS == Int32.MaxValue)
- lap.LaptimeMS = null;
-
- return lap;
- }
-
- private static string ReadString(BinaryReader br)
- {
- var length = br.ReadUInt16();
- var bytes = br.ReadBytes(length);
- return Encoding.UTF8.GetString(bytes);
- }
-
- private static void WriteString(BinaryWriter bw, string s)
- {
- var bytes = Encoding.UTF8.GetBytes(s);
- bw.Write(Convert.ToUInt16(bytes.Length));
- bw.Write(bytes);
- }
-
- ///
- /// Will try to register this client in the targeted ACC instance.
- /// Needs to be called once, before anything else can happen.
- ///
- ///
- ///
- ///
- internal void RequestConnection(string displayName, string connectionPassword, int msRealtimeUpdateInterval, string commandPassword)
- {
- using (var ms = new MemoryStream())
- using (var br = new BinaryWriter(ms))
- {
- br.Write((byte)OutboundMessageTypes.REGISTER_COMMAND_APPLICATION); // First byte is always the command type
- br.Write((byte)BROADCASTING_PROTOCOL_VERSION);
-
- WriteString(br, displayName);
- WriteString(br, connectionPassword);
- br.Write(msRealtimeUpdateInterval);
- WriteString(br, commandPassword);
-
- Send(ms.ToArray());
- }
- }
-
- internal void Disconnect()
- {
- using (var ms = new MemoryStream())
- using (var br = new BinaryWriter(ms))
- {
- br.Write((byte)OutboundMessageTypes.UNREGISTER_COMMAND_APPLICATION); // First byte is always the command type
- Send(ms.ToArray());
- }
- }
-
-
- ///
- /// Will ask the ACC client for an updated entry list, containing all car and driver data.
- /// The client will send this automatically when something changes; however if you detect a carIndex or driverIndex, this may cure the
- /// problem for future updates
- ///
- private void RequestEntryList()
- {
- using (var ms = new MemoryStream())
- using (var br = new BinaryWriter(ms))
- {
- br.Write((byte)OutboundMessageTypes.REQUEST_ENTRY_LIST); // First byte is always the command type
- br.Write((int)ConnectionId);
-
- Send(ms.ToArray());
- }
- }
-
- private void RequestTrackData()
- {
- using (var ms = new MemoryStream())
- using (var br = new BinaryWriter(ms))
- {
- br.Write((byte)OutboundMessageTypes.REQUEST_TRACK_DATA); // First byte is always the command type
- br.Write((int)ConnectionId);
-
- Send(ms.ToArray());
- }
- }
-
- public void SetFocus(UInt16 carIndex)
- {
- SetFocusInternal(carIndex, null, null);
- }
-
- ///
- /// Always put both cam + cam set; even if it doesn't make sense
- ///
- public void SetCamera(string cameraSet, string camera)
- {
- SetFocusInternal(null, cameraSet, camera);
- }
-
- public void SetFocus(UInt16 carIndex, string cameraSet, string camera)
- {
- SetFocusInternal(carIndex, cameraSet, camera);
- }
-
- ///
- /// Sends the request to change the focused car and/or the camera used.
- /// The idea is that this often wants to be triggered together, so this is a all-in-one function.
- /// This way we can make sure the switch happens in the same frame, even in more complex scenarios
- ///
- private void SetFocusInternal(UInt16? carIndex, string cameraSet, string camera)
- {
- using (var ms = new MemoryStream())
- using (var bw = new BinaryWriter(ms))
- {
- bw.Write((byte)OutboundMessageTypes.CHANGE_FOCUS); // First byte is always the command type
- bw.Write((int)ConnectionId);
-
- if (!carIndex.HasValue)
- {
- bw.Write((byte)0); // No change of focused car
- }
- else
- {
- bw.Write((byte)1);
- bw.Write((UInt16)(carIndex.Value));
- }
-
- if (string.IsNullOrEmpty(cameraSet) || string.IsNullOrEmpty(camera))
- {
- bw.Write((byte)0); // No change of camera set or camera
- }
- else
- {
- bw.Write((byte)1);
- WriteString(bw, cameraSet);
- WriteString(bw, camera);
- }
-
- Send(ms.ToArray());
- }
- }
-
- public void RequestInstantReplay(float startSessionTime, float durationMS, int initialFocusedCarIndex = -1, string initialCameraSet = "", string initialCamera = "")
- {
- using (var ms = new MemoryStream())
- using (var bw = new BinaryWriter(ms))
- {
- bw.Write((byte)OutboundMessageTypes.INSTANT_REPLAY_REQUEST); // First byte is always the command type
- bw.Write((int)ConnectionId);
-
- bw.Write((float)startSessionTime);
- bw.Write((float)durationMS);
- bw.Write((int)initialFocusedCarIndex);
-
- WriteString(bw, initialCameraSet);
- WriteString(bw, initialCamera);
-
- Send(ms.ToArray());
- }
- }
-
- public void RequestHUDPage(string hudPage)
- {
- using (var ms = new MemoryStream())
- using (var bw = new BinaryWriter(ms))
- {
- bw.Write((byte)OutboundMessageTypes.CHANGE_HUD_PAGE); // First byte is always the command type
- bw.Write((int)ConnectionId);
-
- WriteString(bw, hudPage);
-
- Send(ms.ToArray());
- }
- }
- }
-}
diff --git a/Race_Element.Broadcast/Properties/AssemblyInfo.cs b/Race_Element.Broadcast/Properties/AssemblyInfo.cs
deleted file mode 100644
index 985ba540e..000000000
--- a/Race_Element.Broadcast/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("RaceElement.Broadcast")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("RaceElement.Broadcast")]
-[assembly: AssemblyCopyright("Copyright © 2022")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("840220bd-8469-4a04-a6ec-1ed2bc743efb")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Race_Element.Broadcast/Race Element.Broadcast.csproj b/Race_Element.Broadcast/Race Element.Broadcast.csproj
deleted file mode 100644
index 9555f184f..000000000
--- a/Race_Element.Broadcast/Race Element.Broadcast.csproj
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}
- Library
- Properties
- RaceElement.Broadcast
- RaceElement.Broadcast
- v4.8
- 512
- true
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- true
- bin\Debug Minimized\
- DEBUG;TRACE
- full
- AnyCPU
- 7.3
- prompt
-
-
-
- ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {AAB23116-299B-415B-8305-96CB86148CE7}
- Race Element.Util
-
-
-
-
\ No newline at end of file
diff --git a/Race_Element.Broadcast/Structs/BroadcastingEvent.cs b/Race_Element.Broadcast/Structs/BroadcastingEvent.cs
deleted file mode 100644
index 62980e2f8..000000000
--- a/Race_Element.Broadcast/Structs/BroadcastingEvent.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace RaceElement.Broadcast.Structs
-{
- public struct BroadcastingEvent
- {
- public BroadcastingCarEventType Type { get; internal set; }
- public string Msg { get; internal set; }
- public int TimeMs { get; internal set; }
- public int CarId { get; internal set; }
- public CarInfo CarData { get; internal set; }
- }
-}
diff --git a/Race_Element.Broadcast/Structs/CarInfo.cs b/Race_Element.Broadcast/Structs/CarInfo.cs
deleted file mode 100644
index 15016ef31..000000000
--- a/Race_Element.Broadcast/Structs/CarInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System.Collections.Generic;
-
-namespace RaceElement.Broadcast.Structs
-{
- public class CarInfo
- {
- public ushort CarIndex { get; }
- public byte CarModelType { get; protected internal set; }
- public string TeamName { get; protected internal set; }
- public int RaceNumber { get; protected internal set; }
- public byte CupCategory { get; protected internal set; }
- public int CurrentDriverIndex { get; protected internal set; }
- public IList Drivers { get; } = new List();
- public NationalityEnum Nationality { get; protected internal set; }
-
- public CarInfo(ushort carIndex)
- {
- CarIndex = carIndex;
- }
-
- internal void AddDriver(DriverInfo driverInfo)
- {
- Drivers.Add(driverInfo);
- }
-
- public string GetCurrentDriverName()
- {
- if (CurrentDriverIndex < Drivers.Count)
- return Drivers[CurrentDriverIndex].LastName;
- return "nobody(?)";
- }
- }
-}
diff --git a/Race_Element.Broadcast/Structs/ConnectionState.cs b/Race_Element.Broadcast/Structs/ConnectionState.cs
deleted file mode 100644
index c77f3776f..000000000
--- a/Race_Element.Broadcast/Structs/ConnectionState.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace RaceElement.Broadcast.Structs
-{
- public struct ConnectionState
- {
- public int ConnectionId { get; set; }
- public bool ConnectionSuccess { get; set; }
- public bool IsReadonly { get; set; }
- public string Error { get; set; }
- }
-}
diff --git a/Race_Element.Broadcast/Structs/DriverInfo.cs b/Race_Element.Broadcast/Structs/DriverInfo.cs
deleted file mode 100644
index 205daaa36..000000000
--- a/Race_Element.Broadcast/Structs/DriverInfo.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace RaceElement.Broadcast.Structs
-{
- public struct DriverInfo
- {
- public string FirstName { get; internal set; }
- public string LastName { get; internal set; }
- public string ShortName { get; internal set; }
- public DriverCategory Category { get; internal set; }
- public NationalityEnum Nationality { get; internal set; }
- }
-}
diff --git a/Race_Element.Broadcast/Structs/LapInfo.cs b/Race_Element.Broadcast/Structs/LapInfo.cs
deleted file mode 100644
index 809c6652a..000000000
--- a/Race_Element.Broadcast/Structs/LapInfo.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections.Generic;
-
-namespace RaceElement.Broadcast.Structs
-{
- public class LapInfo
- {
- public int? LaptimeMS { get; internal set; }
- public List Splits { get; } = new List();
- public ushort CarIndex { get; internal set; }
- public ushort DriverIndex { get; internal set; }
- public bool IsInvalid { get; internal set; }
- public bool IsValidForBest { get; internal set; }
- public LapType Type { get; internal set; }
-
- public override string ToString()
- {
- return $"{LaptimeMS, 5}|{string.Join("|", Splits)}";
- }
- }
-}
diff --git a/Race_Element.Broadcast/Structs/RealtimeCarUpdate.cs b/Race_Element.Broadcast/Structs/RealtimeCarUpdate.cs
deleted file mode 100644
index f084d602a..000000000
--- a/Race_Element.Broadcast/Structs/RealtimeCarUpdate.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-namespace RaceElement.Broadcast.Structs
-{
- public struct RealtimeCarUpdate
- {
- public int CarIndex { get; internal set; }
- public int DriverIndex { get; internal set; }
- public int Gear { get; internal set; }
- public float Heading { get; internal set; }
- public float WorldPosX { get; internal set; }
- public float WorldPosY { get; internal set; }
- public CarLocationEnum CarLocation { get; internal set; }
- public int Kmh { get; internal set; }
- public int Position { get; internal set; }
- public int TrackPosition { get; internal set; }
- public float SplinePosition { get; set; }
- public int Delta { get; internal set; }
- public LapInfo BestSessionLap { get; internal set; }
- public LapInfo LastLap { get; internal set; }
- public LapInfo CurrentLap { get; internal set; }
- public int Laps { get; internal set; }
- public ushort CupPosition { get; internal set; }
- public byte DriverCount { get; internal set; }
- }
-}
diff --git a/Race_Element.Broadcast/Structs/RealtimeUpdate.cs b/Race_Element.Broadcast/Structs/RealtimeUpdate.cs
deleted file mode 100644
index 13a6c8413..000000000
--- a/Race_Element.Broadcast/Structs/RealtimeUpdate.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System;
-
-namespace RaceElement.Broadcast.Structs
-{
- public struct RealtimeUpdate
- {
- public int EventIndex { get; internal set; }
- public int SessionIndex { get; internal set; }
- public SessionPhase Phase { get; internal set; }
- public TimeSpan SessionTime { get; internal set; }
- public TimeSpan RemainingTime { get; internal set; }
- public TimeSpan TimeOfDay { get; internal set; }
- public float RainLevel { get; internal set; }
- public float Clouds { get; internal set; }
- public float Wetness { get; internal set; }
- public LapInfo BestSessionLap { get; internal set; }
- public ushort BestLapCarIndex { get; internal set; }
- public ushort BestLapDriverIndex { get; internal set; }
- public int FocusedCarIndex { get; internal set; }
- public string ActiveCameraSet { get; internal set; }
- public string ActiveCamera { get; internal set; }
- public bool IsReplayPlaying { get; internal set; }
- public float ReplaySessionTime { get; internal set; }
- public float ReplayRemainingTime { get; internal set; }
- public TimeSpan SessionRemainingTime { get; internal set; }
- public TimeSpan SessionEndTime { get; internal set; }
- public RaceSessionType SessionType { get; internal set; }
- public byte AmbientTemp { get; internal set; }
- public byte TrackTemp { get; internal set; }
- public string CurrentHudPage { get; internal set; }
- }
-}
diff --git a/Race_Element.Broadcast/Structs/TrackData.cs b/Race_Element.Broadcast/Structs/TrackData.cs
deleted file mode 100644
index 4c2db6d3e..000000000
--- a/Race_Element.Broadcast/Structs/TrackData.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.Collections.Generic;
-
-namespace RaceElement.Broadcast.Structs
-{
- public struct TrackData
- {
- public string TrackName { get; internal set; }
- public int TrackId { get; internal set; }
- public float TrackMeters { get; internal set; }
- public Dictionary> CameraSets { get; internal set; }
- public IEnumerable HUDPages { get; internal set; }
- }
-}
diff --git a/Race_Element.Broadcast/packages.config b/Race_Element.Broadcast/packages.config
deleted file mode 100644
index 4de699c93..000000000
--- a/Race_Element.Broadcast/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Race_Element.Data.ACC/AccidentList/AccidentListTracker.cs b/Race_Element.Data.ACC/AccidentList/AccidentListTracker.cs
deleted file mode 100644
index 530508e7a..000000000
--- a/Race_Element.Data.ACC/AccidentList/AccidentListTracker.cs
+++ /dev/null
@@ -1,258 +0,0 @@
-using RaceElement.Broadcast;
-using RaceElement.Broadcast.Structs;
-using RaceElement.Data.ACC.Tracker;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-
-namespace RaceElement.Data.ACC.AccidentList
-{
- public sealed class AccidentListTracker
- {
-
- public event EventHandler OnAccident;
-
- private static AccidentListTracker _instance;
- private RealtimeUpdate _realtimeUpdate;
- private float _trackDistance;
- private DateTime _accidentTime = DateTime.MinValue;
-
- // History of realtime car updates
- // Maps session time to a map of carID and realTimeInfo
- private Dictionary> _realTimeCarHistory = new Dictionary>();
-
- // store all incoming broadcast accident events with the corresponding real time car update
- private List _unprocessedAccidents = new List();
-
- public static AccidentListTracker Instance
- {
- get
- {
- if (_instance == null) _instance = new AccidentListTracker();
- return _instance;
- }
- private set { _instance = value; }
- }
-
- internal void Start()
- {
- BroadcastTracker.Instance.OnRealTimeCarUpdate += RealTimeCarUpdate_EventHandler;
- BroadcastTracker.Instance.OnRealTimeUpdate += RealTimeUpdate_EventHandler;
- BroadcastTracker.Instance.OnBroadcastEvent += BroadcastEvent_EventHandler;
- BroadcastTracker.Instance.OnTrackDataUpdate += TrackDataUpdate_EventHandler;
- }
-
- internal void Stop()
- {
- BroadcastTracker.Instance.OnRealTimeCarUpdate -= RealTimeCarUpdate_EventHandler;
- BroadcastTracker.Instance.OnRealTimeUpdate -= RealTimeUpdate_EventHandler;
- BroadcastTracker.Instance.OnBroadcastEvent -= BroadcastEvent_EventHandler;
- BroadcastTracker.Instance.OnTrackDataUpdate -= TrackDataUpdate_EventHandler;
- }
-
- private void BroadcastEvent_EventHandler(object sender, BroadcastingEvent broadcastingEvent)
- {
- switch (broadcastingEvent.Type)
- {
- case BroadcastingCarEventType.Accident:
- {
- HandleAccidentEvent(broadcastingEvent);
- break;
- }
- }
- }
-
- private void HandleAccidentEvent(BroadcastingEvent broadcastingEvent)
- {
-
- if (broadcastingEvent.CarData == null) return;
-
- Debug.WriteLine($"#{broadcastingEvent.CarData.RaceNumber}|{broadcastingEvent.CarData.GetCurrentDriverName()} had an accident. {broadcastingEvent.Msg}");
-
- // accident events seems to be 5000 ms too late
- // with the corrected accident time get a valid key into the history data
- double key = GetValidHistoryKey(GetSessionTimeKey() - 5000);
-
- if (!_realTimeCarHistory.ContainsKey(key))
- {
- Debug.WriteLine($"! no history data for key=({key})");
- return;
- }
-
- //Debug.WriteLine($"session time {key} accident time {accidentTime}");
- // get real time car update data from history and add information to accident event
- CarInfoWithRealTime carInfoWithRealTime = new CarInfoWithRealTime(broadcastingEvent.CarData);
- carInfoWithRealTime.RealtimeCarUpdate = _realTimeCarHistory[key][broadcastingEvent.CarId];
- lock(_unprocessedAccidents)
- {
- _unprocessedAccidents.Add(carInfoWithRealTime);
- //Debug.WriteLine($"unprocessed accidents list size: {_unprocessedAccidents.Count}");
- }
-
-
- if (_accidentTime == DateTime.MinValue)
- {
- _accidentTime = DateTime.Now;
- //Debug.WriteLine($"set new accident timestamp: {_accidentTime}");
- }
-
-
- }
-
- private void ProcessAccidentData()
- {
- DateTime processTime = DateTime.Now;
-
- // process accidents older than 1 sec.
- TimeSpan timediff = processTime - _accidentTime;
- if (_accidentTime != DateTime.MinValue && timediff.TotalMilliseconds > 1000)
- {
- //Debug.WriteLine($"process old accident data list size {_unprocessedAccidents.Count} ...");
-
- if (_unprocessedAccidents.Count < 2)
- {
- Debug.WriteLine($"accident: #{_unprocessedAccidents[0].RaceNumber}|{_unprocessedAccidents[0].GetCurrentDriverName()}");
- }
-
- for (int i=0; i<_unprocessedAccidents.Count-1; i++)
- {
- float distance = Math.Abs((_unprocessedAccidents[i].RealtimeCarUpdate.SplinePosition - _unprocessedAccidents[i + 1].RealtimeCarUpdate.SplinePosition) * _trackDistance);
- Debug.WriteLine($"accident: #{_unprocessedAccidents[i].RaceNumber} vs #{_unprocessedAccidents[i+1].RaceNumber} distance {distance.ToString("0.##")}m");
-
- // TODO send out accident event
- OnAccident?.Invoke(this, new AccidentEvent());
- }
-
- lock(_unprocessedAccidents)
- {
- //Debug.WriteLine($"clear unprocessed accident list and reset accident timestamp");
- _accidentTime = DateTime.MinValue;
- _unprocessedAccidents.Clear();
- }
- }
-
-
- // double key = GetSessionTimeKey();
-
- }
-
- private void RealTimeCarUpdate_EventHandler(object sender, RealtimeCarUpdate realtimeCarUpdate)
- {
- AddCarUpdateToHistory(realtimeCarUpdate);
- RemoveOldHistoryData();
- ProcessAccidentData();
- }
-
- private void RemoveOldHistoryData()
- {
- double key = GetSessionTimeKey();
- foreach (var kv in _realTimeCarHistory.ToList())
- {
- if (key - kv.Key > 20000)
- {
- _realTimeCarHistory.Remove(kv.Key);
- }
- }
- }
-
- private void AddCarUpdateToHistory(RealtimeCarUpdate realtimeCarUpdate)
- {
- double key = GetSessionTimeKey();
- if (key == 0) return; // session not started
-
- if (_realTimeCarHistory.ContainsKey(key))
- {
- //Debug.WriteLine($"+ add to key {key} car index {realtimeCarUpdate.CarIndex}");
- var carUpdate = _realTimeCarHistory[key];
- if (carUpdate.ContainsKey(realtimeCarUpdate.CarIndex))
- {
- carUpdate[realtimeCarUpdate.CarIndex] = realtimeCarUpdate;
- }
- else
- {
- _realTimeCarHistory[key].Add(realtimeCarUpdate.CarIndex, realtimeCarUpdate);
- }
-
- }
- else
- {
- Dictionary carUpdate = new Dictionary();
- carUpdate[realtimeCarUpdate.CarIndex] = realtimeCarUpdate;
- //Debug.WriteLine($"# create key {key} car index {realtimeCarUpdate.CarIndex}");
- _realTimeCarHistory[key] = carUpdate;
- }
-
- }
-
- private double GetValidHistoryKey(double key)
- {
- if (_realTimeCarHistory.ContainsKey(key))
- {
- return key;
- }
-
- // find nearest history session key
- double nearest = 999999f;
- double nearestHistoryKey = 0f;
- foreach (var historyKey in _realTimeCarHistory.Keys)
- {
- double dt = Math.Abs(historyKey - key);
- if (dt < nearest)
- {
- nearest = dt;
- nearestHistoryKey = historyKey;
- }
- }
- return nearestHistoryKey;
- }
-
- private double GetSessionTimeKey()
- {
- return _realtimeUpdate.SessionTime.TotalMilliseconds;
- }
-
- private void RealTimeUpdate_EventHandler(object sender, RealtimeUpdate realtimeUpdate)
- {
- _realtimeUpdate = realtimeUpdate;
- }
-
- private void TrackDataUpdate_EventHandler(object sender, TrackData trackData)
- {
- Debug.WriteLine($"receive track data update, track id=({trackData.TrackId}) track distance=({trackData.TrackMeters})");
- _trackDistance = trackData.TrackMeters;
- }
-
- private class CarInfoWithRealTime : CarInfo
- {
- public RealtimeCarUpdate RealtimeCarUpdate { get; set; }
-
- public CarInfoWithRealTime(CarInfo carInfoIn) : base(carInfoIn.CarIndex)
- {
- CarModelType = carInfoIn.CarModelType;
- TeamName = carInfoIn.TeamName;
- RaceNumber = carInfoIn.RaceNumber;
- CupCategory = carInfoIn.CupCategory;
- CurrentDriverIndex = carInfoIn.CurrentDriverIndex;
- Nationality = carInfoIn.Nationality;
- }
-
- public CarInfoWithRealTime(ushort carIndex) : base(carIndex)
- {
- }
- }
-
- private class ContactData
- {
- public double SessionTime { get; set; }
- }
-
- // TODO define accident event with all neccessary data, or use existing CarInfo
- public class AccidentEvent
- {
- public double SessionTime { get; set; }
- public List CarIds { get; set; }
-
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Cars/Damage.cs b/Race_Element.Data.ACC/Cars/Damage.cs
deleted file mode 100644
index d1c2045fa..000000000
--- a/Race_Element.Data.ACC/Cars/Damage.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-using System;
-using static RaceElement.ACCSharedMemory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.ACC.Cars
-{
- public class Damage
- {
- private const float MagicDamageMultiplier = 0.282f;
-
- public static float GetTotalRepairTime(SPageFilePhysics pagePhysics)
- {
- float totalRepairTime = 0;
-
- totalRepairTime += GetBodyWorkDamage(pagePhysics, CarDamagePosition.Centre);
-
- foreach (Wheel wheel in Enum.GetValues(typeof(Wheel)))
- totalRepairTime += GetSuspensionDamage(pagePhysics, wheel);
-
- return totalRepairTime;
- }
-
- public static bool HasAnyDamage(SPageFilePhysics pagePhysics)
- {
- foreach (int i in Enum.GetValues(typeof(CarDamagePosition)))
- if (pagePhysics.CarDamage[i] > 0)
- return true;
-
- foreach (int i in Enum.GetValues(typeof(Wheel)))
- if (pagePhysics.SuspensionDamage[i] > 0)
- return true;
-
- return false;
- }
-
- ///
- /// Gets the amount of damage/repair-time for the given wheel
- ///
- ///
- ///
- public static float GetSuspensionDamage(SPageFilePhysics pagePhysics, Wheel wheel)
- {
- return pagePhysics.SuspensionDamage[(int)wheel] * 30;
- }
-
- ///
- /// Gets the amount of bodywork damage/repair-time for the given car damage position
- ///
- ///
- ///
- public static float GetBodyWorkDamage(SPageFilePhysics pagePhysics, CarDamagePosition position)
- {
- return pagePhysics.CarDamage[(int)position] * MagicDamageMultiplier;
- }
-
- public enum CarDamagePosition : int
- {
- Front,
- Rear,
- Left,
- Right,
- Centre
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Cars/SteeringLock.cs b/Race_Element.Data.ACC/Cars/SteeringLock.cs
deleted file mode 100644
index 06b3d96c9..000000000
--- a/Race_Element.Data.ACC/Cars/SteeringLock.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-using System.Collections.Generic;
-
-namespace RaceElement.Data.ACC.Cars
-{
- public class SteeringLock
- {
- private static readonly Dictionary _steeringLocks = new Dictionary()
- {
- // CUP
- {"porsche_991ii_gt3_cup", 800},
- {"porsche_992_gt3_cup", 540},
- // ST
- {"lamborghini_huracan_st", 620},
- {"lamborghini_huracan_st_evo2", 620},
- // CHL
- {"ferrari_488_challenge_evo", 480},
- // TCX
- {"bmw_m2_cs_racing", 360},
- // GT3
- {"amr_v12_vantage_gt3", 640},
- {"amr_v8_vantage_gt3", 640},
- {"audi_r8_lms", 720},
- {"audi_r8_lms_evo", 720},
- {"audi_r8_lms_evo_ii", 720},
- {"bentley_continental_gt3_2016", 640},
- {"bentley_continental_gt3_2018", 640},
- {"bmw_m4_gt3", 516},
- {"bmw_m6_gt3", 566},
- {"jaguar_g3", 720},
- {"ferrari_488_gt3", 480},
- {"ferrari_488_gt3_evo", 480},
- {"honda_nsx_gt3", 620},
- {"honda_nsx_gt3_evo", 436},
- {"lamborghini_huracan_gt3", 620},
- {"lamborghini_huracan_gt3_evo", 620},
- {"lexus_rc_f_gt3", 640},
- {"mclaren_650s_gt3", 480},
- {"mclaren_720s_gt3", 480},
- {"mercedes_amg_gt3", 640},
- {"mercedes_amg_gt3_evo", 640},
- {"nissan_gt_r_gt3_2017", 640},
- {"nissan_gt_r_gt3_2018", 640},
- {"porsche_991_gt3_r", 800},
- {"porsche_991ii_gt3_r", 800},
- {"lamborghini_gallardo_rex", 720},
- // GT4
- {"alpine_a110_gt4", 720},
- {"amr_v8_vantage_gt4", 640},
- {"audi_r8_gt4", 720},
- {"bmw_m4_gt4", 492},
- {"chevrolet_camaro_gt4r", 720},
- {"ginetta_g55_gt4", 720},
- {"ktm_xbow_gt4", 582},
- {"maserati_mc_gt4", 900},
- {"mclaren_570s_gt4", 480},
- {"mercedes_amg_gt4", 492},
- {"porsche_718_cayman_gt4_mr", 800},
- };
-
- ///
- /// Returns the steering lock for the given car model, if no car model has been found, returns 360
- ///
- ///
- ///
- public static int Get(string carModel)
- {
- if (_steeringLocks.TryGetValue(carModel, out int steeringLock))
- return steeringLock;
-
- return 360;
- }
-
- }
-}
diff --git a/Race_Element.Data.ACC/Core/AccProcess.cs b/Race_Element.Data.ACC/Core/AccProcess.cs
deleted file mode 100644
index 982660a63..000000000
--- a/Race_Element.Data.ACC/Core/AccProcess.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-using RaceElement.Util;
-using System;
-using System.Diagnostics;
-using System.Linq;
-using System.Threading;
-
-namespace RaceElement.Data.ACC.Core
-{
- public class AccProcess
- {
- private static ProcessTracker _handlerInstance;
- private static ProcessTracker Handler
- {
- get
- {
- if (_handlerInstance == null) _handlerInstance = new ProcessTracker("AC2-Win64-Shipping");
- return _handlerInstance;
- }
- }
-
- public static bool IsRunning { get => Handler.IsRunning; }
-
- private sealed class ProcessTracker : IDisposable
- {
- public bool IsRunning = false;
-
- public event EventHandler IsRunningChanged;
-
- private Process _acc;
-
- private readonly string _name;
-
- private bool _shouldTrack = true;
- private DateTime _lastCheck = DateTime.MinValue;
-
- public ProcessTracker(string name)
- {
- _name = name;
- FindProcess();
- TrackProcess();
- }
-
- private void TrackProcess()
- {
- new Thread(x =>
- {
- while (_shouldTrack)
- {
- Thread.Sleep(5000);
-
- try
- {
- if (!IsRunning || _acc == null)
- FindProcess();
- else if (_acc != null && _acc.Handle != IntPtr.Zero && _acc.HasExited)
- FindProcess();
- }
- catch (Exception e)
- {
- Debug.WriteLine(e);
- LogWriter.WriteToLog(e);
- }
- }
- }).Start();
- }
-
- private void FindProcess()
- {
- if (_lastCheck.AddSeconds(3) < DateTime.UtcNow)
- {
- if (!IsRunning || _acc == null || _acc.HasExited)
- {
- Process processes = Process.GetProcesses().FirstOrDefault(x => x.ProcessName == _name);
- if (processes != null)
- {
- IsRunning = true;
- IsRunningChanged?.Invoke(this, IsRunning);
- }
- else
- {
- IsRunning = false;
- IsRunningChanged?.Invoke(this, IsRunning);
- }
- }
-
- _lastCheck = DateTime.UtcNow;
- }
- }
-
- public void Dispose()
- {
- _acc?.Dispose();
- _acc = null;
- _shouldTrack = false;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Core/Config/ReplayJson.cs b/Race_Element.Data.ACC/Core/Config/ReplayJson.cs
deleted file mode 100644
index be79a70b1..000000000
--- a/Race_Element.Data.ACC/Core/Config/ReplayJson.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using RaceElement.Util;
-using Newtonsoft.Json;
-
-namespace RaceElement.Data.ACC.Core.Config
-{
- public class ReplaySettingsJson : IGenericSettingsJson
- {
- [JsonProperty("replayQuality")]
- public int ReplayQuality { get; set; }
-
- [JsonProperty("farAIReplayQuality")]
- public int FarAIReplayQuality { get; set; }
-
- [JsonProperty("automaticHiglightEnabled")]
- public int AutomaticHiglightEnabled { get; set; }
-
- [JsonProperty("useOnlyPlayerCarHighlights")]
- public int UseOnlyPlayerCarHighlights { get; set; }
-
- [JsonProperty("highlightsRecTimeBefore")]
- public int HighlightsRecTimeBefore { get; set; }
-
- [JsonProperty("highlightsRecTimeAfter")]
- public int HighlightsRecTimeAfter { get; set; }
-
- [JsonProperty("maxTimeReplaySeconds")]
- public int MaxTimeReplaySeconds { get; set; }
-
- [JsonProperty("autoSaveEnabled")]
- public int AutoSaveEnabled { get; set; }
-
- [JsonProperty("autoSaveRaceNumber")]
- public int AutoSaveRaceNumber { get; set; }
-
- [JsonProperty("autoSaveQualifyNumber")]
- public int AutoSaveQualifyNumber { get; set; }
-
- [JsonProperty("autoSaveOthersNumber")]
- public int AutoSaveOthersNumber { get; set; }
-
- [JsonProperty("autoSaveMinTimeSeconds")]
- public int AutoSaveMinTimeSeconds { get; set; }
- }
-
- public class ReplaySettings : AbstractSettingsJson
- {
- public override string Path => FileUtil.AccConfigPath;
-
- public override string FileName => "replay.json";
-
- public override ReplaySettingsJson Default()
- {
- return new ReplaySettingsJson();
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Core/Game/AccScheduler.cs b/Race_Element.Data.ACC/Core/Game/AccScheduler.cs
deleted file mode 100644
index c12e34a74..000000000
--- a/Race_Element.Data.ACC/Core/Game/AccScheduler.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using Quartz;
-using Quartz.Impl;
-using RaceElement.Data.ACC.Core.Game.Jobs;
-using RaceElement.Data.ACC.Tracker;
-
-namespace ACCManager.Data.ACC.Core.Game
-{
- public static class AccScheduler
- {
- public static IScheduler Scheduler;
-
- public static void RegisterJobs()
- {
- StdSchedulerFactory factory = new StdSchedulerFactory();
- Scheduler = factory.GetScheduler().Result;
- Scheduler.Start();
-
- //ReplaySaver.Schedule();
- PageStaticTracker.Schedule();
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Core/Game/Jobs/ReplaySaver.cs b/Race_Element.Data.ACC/Core/Game/Jobs/ReplaySaver.cs
deleted file mode 100644
index 1a69d85fd..000000000
--- a/Race_Element.Data.ACC/Core/Game/Jobs/ReplaySaver.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using ACCManager.Data.ACC.Core.Game;
-using Quartz;
-using RaceElement.Data.ACC.Core.Config;
-using RaceElement.Data.ACC.HotKey;
-using RaceElement.Util.Settings;
-using System;
-using System.Diagnostics;
-using System.Threading.Tasks;
-
-namespace RaceElement.Data.ACC.Core.Game.Jobs
-{
- public class ReplaySaver : IJob
- {
- public static readonly JobKey JobKey = new JobKey("replay-saver", "acc-jobs");
- public static readonly TriggerKey TriggerKey = new TriggerKey("replaySaverTrigger");
-
- private static DateTime LastReplaySave = DateTime.MinValue;
-
- public async Task Execute(IJobExecutionContext context)
- {
- if (AccProcess.IsRunning)
- {
- var replayJson = new ReplaySettings().Get();
- var accSettings = new AccSettings().Get();
-
- if (accSettings.AutoRecordReplay && replayJson.AutoSaveEnabled == 1)
- {
- if (ACCSharedMemory.Instance.ReadGraphicsPageFile().Status == ACCSharedMemory.AcStatus.AC_LIVE)
- {
- if (DateTime.UtcNow.Subtract(LastReplaySave) > new TimeSpan(0, 0, replayJson.MaxTimeReplaySeconds))
- {
- Debug.WriteLine("Auto save is enabled");
- LastReplaySave = AccHotkeys.SaveReplay();
-
- Debug.WriteLine(LastReplaySave);
- }
- }
- }
- else
- {
- await context.Scheduler.UnscheduleJob(TriggerKey);
- Debug.WriteLine("Auto save is not enabled, unscheduled replay saver");
- }
- }
- }
-
- public static void Schedule()
- {
- IJobDetail job = JobBuilder.Create().WithIdentity(JobKey).Build();
- if (!AccScheduler.Scheduler.CheckExists(JobKey).Result)
- AccScheduler.Scheduler.ScheduleJob(job, TriggerBuilder.Create()
- .WithIdentity(TriggerKey)
- .WithSimpleSchedule(x => x.WithInterval(new TimeSpan(0, 0, 15)).RepeatForever()).ForJob(JobKey).Build());
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Database/GameData/DbCarData.cs b/Race_Element.Data.ACC/Database/GameData/DbCarData.cs
deleted file mode 100644
index 3c61882e0..000000000
--- a/Race_Element.Data.ACC/Database/GameData/DbCarData.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-using LiteDB;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-
-namespace RaceElement.Data.ACC.Database.GameData
-{
- public class DbCarData
- {
- public Guid Id { get; set; }
-
- public string ParseName { get; set; }
- }
-
- public class CarDataCollection
- {
- private static ILiteCollection Collection
- {
- get
- {
- ILiteCollection _collection = RaceWeekendDatabase.Database.GetCollection();
-
- return _collection;
- }
- }
-
- public static ILiteCollection GetCollection(ILiteDatabase db)
- {
- return db.GetCollection();
- }
-
- public static List GetAll(LiteDatabase db)
- {
- return GetCollection(db).FindAll().OrderBy(x => x.ParseName).ToList();
- }
-
- public static List GetAll()
- {
- return Collection.FindAll().OrderBy(x => x.ParseName).ToList();
- }
-
- public static DbCarData GetCarData(ILiteDatabase db, Guid id)
- {
- return GetCollection(db).FindById(id);
- }
-
- public static DbCarData GetCarData(Guid id)
- {
- return Collection.FindById(id);
- }
-
- public static DbCarData GetCarData(string parseName)
- {
- var result = Collection.FindOne(x => x.ParseName == parseName);
-
- if (result == null)
- {
- Insert(new DbCarData() { ParseName = parseName });
- result = Collection.FindOne(x => x.ParseName == parseName);
- }
-
- return result;
- }
-
- public static void Insert(DbCarData car)
- {
- RaceWeekendDatabase.Database.BeginTrans();
- Collection.EnsureIndex(x => x.Id, true);
- Collection.Insert(car);
- RaceWeekendDatabase.Database.Commit();
-
- Debug.WriteLine($"Inserted new car data {car.Id} {car.ParseName}");
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Database/GameData/DbTrackData.cs b/Race_Element.Data.ACC/Database/GameData/DbTrackData.cs
deleted file mode 100644
index 7b2f8db55..000000000
--- a/Race_Element.Data.ACC/Database/GameData/DbTrackData.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-using RaceElement.Data.ACC.Tracks;
-using LiteDB;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using static RaceElement.Data.ACC.Tracks.TrackData;
-
-namespace RaceElement.Data.ACC.Database.GameData
-{
- public class DbTrackData
- {
- public Guid Id { get; set; }
-
- public string ParseName { get; set; }
- }
-
- public class TrackDataCollection
- {
- private static ILiteCollection Collection
- {
- get
- {
- ILiteCollection _collection = RaceWeekendDatabase.Database.GetCollection();
-
- return _collection;
- }
- }
-
- private static ILiteCollection GetCollection(ILiteDatabase db)
- {
- return db.GetCollection();
- }
-
-
- public static List GetAll(ILiteDatabase db)
- {
- var allTracks = GetCollection(db).FindAll();
- if (!allTracks.Any()) return new List();
-
- return allTracks.OrderBy(x => x.ParseName).ToList();
- }
-
- public static List GetAll()
- {
- var allTracks = Collection.FindAll();
- if (!allTracks.Any()) return new List();
-
- return allTracks.OrderBy(x => x.ParseName).ToList();
- }
-
- public static DbTrackData GetTrackData(Guid id)
- {
- return Collection.FindById(id);
- }
-
- public static DbTrackData GetTrackData(ILiteDatabase db, Guid id)
- {
- return GetCollection(db).FindById(id);
- }
-
- public static DbTrackData GetTrackData(string trackParseName)
- {
- var result = Collection.FindOne(x => x.ParseName == trackParseName);
- if (result == null)
- {
- TrackData.Tracks.TryGetValue(trackParseName, out AbstractTrackData trackData);
- Insert(new DbTrackData() { ParseName = trackParseName, Id = trackData.Guid });
- result = Collection.FindOne(x => x.ParseName == trackParseName);
- }
-
- return result;
- }
-
- public static void Insert(DbTrackData track)
- {
- RaceWeekendDatabase.Database.BeginTrans();
- Collection.EnsureIndex(x => x.Id, true);
- Collection.Insert(track);
- RaceWeekendDatabase.Database.Commit();
- Debug.WriteLine($"Inserted new track data {track.Id} {track.ParseName}");
-
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Database/LapDataDB/DbLapData.cs b/Race_Element.Data.ACC/Database/LapDataDB/DbLapData.cs
deleted file mode 100644
index ff799d21d..000000000
--- a/Race_Element.Data.ACC/Database/LapDataDB/DbLapData.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-using RaceElement.Broadcast;
-using LiteDB;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using static RaceElement.ACCSharedMemory;
-
-namespace RaceElement.Data.ACC.Database.LapDataDB
-{
- ///
- /// All data except for the Index must be divided by 1000 to get the actual value (floating point precision is annoying)
- ///
- public class DbLapData
- {
- public Guid Id { get; set; }
-
- public Guid RaceSessionId { get; set; } = Guid.NewGuid();
-
- ///
- /// The time when this lap was completed
- ///
- public DateTime UtcCompleted { get; set; }
-
- ///
- /// Lap Index
- ///
- public int Index { get; set; } = -1;
-
- ///
- /// Lap Time in milliseconds
- ///
- public int Time { get; set; } = -1;
- public int Sector1 { get; set; } = -1;
- public int Sector2 { get; set; } = -1;
- public int Sector3 { get; set; } = -1;
-
- public bool IsValid { get; set; } = true;
-
- public LapType LapType { get; set; } = LapType.ERROR;
-
- ///
- /// Milliliters of Fuel left at the end of the lap, divide by 1000...
- ///
- public int FuelUsage { get; set; } = -1;
- public float FuelInTank { get; set; } = -1;
-
- public float TempAmbient { get; set; } = -1;
- public float TempTrack { get; set; } = -1;
- public AcTrackGripStatus GripStatus { get; set; } = AcTrackGripStatus.Optimum;
-
- public override string ToString()
- {
- return $"Lap: {Index}, Time: {new TimeSpan(0, 0, 0, 0, Time):mm\\:ss\\:fff}, IsValid: {IsValid}, S1: {this.GetSector1():F3}, S2: {this.GetSector2():F3}, S3: {this.GetSector3():F3}, LapType: {this.LapType}";
- }
- }
-
- public class LapDataCollection
- {
- private static ILiteCollection Collection
- {
- get
- {
- ILiteCollection _collection = RaceWeekendDatabase.Database.GetCollection();
-
- return _collection;
- }
- }
-
- public static bool Any()
- {
- return Collection.Count() != 0;
- }
-
- public static void Insert(DbLapData lap)
- {
- RaceWeekendDatabase.Database.BeginTrans();
- Collection.EnsureIndex(x => x.Id, true);
- Collection.Insert(lap);
- RaceWeekendDatabase.Database.Commit();
- }
-
- public static Dictionary GetForSession(LiteDatabase db, Guid sessionId)
- {
- return db.GetCollection().Find(x => x.RaceSessionId == sessionId).ToDictionary(x => x.Index);
- }
-
- public static Dictionary GetForSession(Guid sessionId)
- {
- return Collection.Find(x => x.RaceSessionId == sessionId).ToDictionary(x => x.Index);
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Database/LapDataDB/LapDataExtensions.cs b/Race_Element.Data.ACC/Database/LapDataDB/LapDataExtensions.cs
deleted file mode 100644
index 34e619905..000000000
--- a/Race_Element.Data.ACC/Database/LapDataDB/LapDataExtensions.cs
+++ /dev/null
@@ -1,247 +0,0 @@
-using RaceElement.Util.SystemExtensions;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace RaceElement.Data.ACC.Database.LapDataDB
-{
- public static class LapDataExtensions
- {
- #region DbLapData Extensions
-
- public static float GetLapTime(this DbLapData lap)
- {
- return lap.Time / 1000f;
- }
-
- public static float GetSector1(this DbLapData lap)
- {
- return lap.Sector1 / 1000f;
- }
-
- public static float GetSector2(this DbLapData lap)
- {
- return lap.Sector2 / 1000f;
- }
-
- public static float GetSector3(this DbLapData lap)
- {
- return lap.Sector3 / 1000f;
- }
-
- public static float GetFuelUsage(this DbLapData lap)
- {
- return lap.FuelUsage / 1000f;
- }
-
- #endregion
-
- #region Dictionary Extensions
-
- public static int GetPotentialFastestLapTime(this Dictionary laps)
- {
- if (laps.Count == 0) return -1;
-
- int fastestSector1 = laps.GetFastestSector(1);
- if (fastestSector1 == int.MaxValue) return -1;
-
- int fastestSector2 = laps.GetFastestSector(2);
- if (fastestSector2 == int.MaxValue) return -1;
-
- int fastestSector3 = laps.GetFastestSector(3);
- if (fastestSector3 == int.MaxValue) return -1;
-
- return fastestSector1 + fastestSector2 + fastestSector3;
- }
-
- ///
- /// Finds the lap index of the fastest lap
- ///
- /// -1 if not fastest lap
- public static int GetFastestLapIndex(this Dictionary laps)
- {
- int fastestTime = int.MaxValue;
- int fastestLapIndex = -1;
-
- foreach (var key in laps.Keys)
- {
- DbLapData lap = laps[key];
- if (lap.Time < fastestTime && lap.IsValid)
- {
- fastestTime = lap.Time;
- fastestLapIndex = lap.Index;
- }
-
- }
-
- return fastestLapIndex;
- }
-
- public static int GetAverageFuelUsage(this Dictionary laps)
- {
- return laps.GetAverageFuelUsage(laps.Count);
- }
-
- public static int GetAverageFuelUsage(this Dictionary laps, int lapAmount)
- {
- lapAmount.ClipMax(laps.Count);
- if (lapAmount < 2)
- return -1;
-
- int total = 0;
- foreach (DbLapData lap in laps.Select(x => x.Value).OrderByDescending(x => x.Index).Take(lapAmount))
- total += lap.FuelUsage;
-
- return total / lapAmount;
- }
-
- public static int GetAverageLapTime(this Dictionary laps)
- {
- return laps.GetAverageLapTime(laps.Count);
- }
-
- public static int GetAverageLapTime(this Dictionary laps, bool onlyValidLaps)
- {
- return laps.GetAverageLapTime(laps.Count, onlyValidLaps);
- }
-
- public static int GetAverageLapTime(this Dictionary laps, int lapAmount)
- {
- return laps.GetAverageLapTime(lapAmount, false);
- }
-
- public static int GetAverageLapTime(this Dictionary laps, int lapAmount, bool onlyValidLaps)
- {
- lapAmount.ClipMax(laps.Count);
- if (lapAmount == 0)
- return 0;
-
- int total = 0;
- int validCount = 0;
-
- foreach (DbLapData lap in laps.Select(x => x.Value))
- {
- if (onlyValidLaps)
- {
- if (lap.IsValid)
- {
- validCount++;
- total += lap.Time;
- }
- }
- else
- total += lap.Time;
- }
-
- if (onlyValidLaps)
- return total / validCount;
- else
- return total / lapAmount;
- }
-
- ///
- ///
- ///
- /// 1, 2 or 3
- /// laptime as int
- /// true if the given sector time is faster than any others of that sector in these laps
- public static bool IsSectorFastest(this Dictionary laps, int sector, int time)
- {
- Dictionary data = laps;
-
- sector.Clip(1, 3);
-
- switch (sector)
- {
- case 1:
- foreach (DbLapData timing in data.Select(x => x.Value))
- if (timing.IsValid && timing.Sector1 < time)
- return false; break;
-
- case 2:
- foreach (DbLapData timing in data.Select(x => x.Value))
- if (timing.IsValid && timing.Sector2 < time)
- return false; break;
-
- case 3:
- foreach (DbLapData timing in data.Select(x => x.Value))
- if (timing.IsValid && timing.Sector3 < time)
- return false; break;
-
- default: return true;
- }
-
- return true;
- }
-
- ///
- /// Returns the fastest sector time, int.MaxValue if no valid fastest sector available
- ///
- ///
- ///
- ///
- public static int GetFastestSector(this Dictionary laps, int sector)
- {
- sector.Clip(1, 3);
- if (laps.Count == 0)
- return int.MaxValue;
-
- int fastest = int.MaxValue;
- switch (sector)
- {
- case 1:
- foreach (DbLapData lap in laps.Select(x => x.Value))
- if (lap.IsValid && (lap.Sector1 < fastest) && lap.Sector1 != -1)
- fastest = lap.Sector1; break;
-
- case 2:
- foreach (DbLapData lap in laps.Select(x => x.Value))
- if (lap.IsValid && (lap.Sector2 < fastest) && lap.Sector2 != -1)
- fastest = lap.Sector2; break;
-
- case 3:
- foreach (DbLapData lap in laps.Select(x => x.Value))
- if (lap.IsValid && (lap.Sector3 < fastest) && lap.Sector3 != -1)
- fastest = lap.Sector3; break;
-
- default: return fastest;
- }
-
- return fastest;
- }
-
- public static int GetLastLapTime(this Dictionary laps, bool onlyValidLaps = false)
- {
- if (laps.Count == 0) return -1;
-
- int lastLapIndex = -1;
-
- foreach (DbLapData lap in laps.Select(x => x.Value))
- {
- if (onlyValidLaps && !lap.IsValid)
- {
- continue;
- }
-
- if (lastLapIndex < lap.Index)
- lastLapIndex = lap.Index;
- }
-
- return laps[lastLapIndex].Time;
- }
-
- public static int GetBestLapTime(this Dictionary laps)
- {
- if (laps.Count == 0) return -1;
-
- int idx = GetFastestLapIndex(laps);
- laps.TryGetValue(idx, out DbLapData fastest);
-
- if (fastest == null)
- return -1;
-
- return fastest.Time;
- }
-
- #endregion
- }
-}
diff --git a/Race_Element.Data.ACC/Database/RaceWeekend/DbRaceWeekend.cs b/Race_Element.Data.ACC/Database/RaceWeekend/DbRaceWeekend.cs
deleted file mode 100644
index 51344622e..000000000
--- a/Race_Element.Data.ACC/Database/RaceWeekend/DbRaceWeekend.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using LiteDB;
-using System;
-using System.Diagnostics;
-using System.Linq;
-
-namespace RaceElement.Data.ACC.Database.RaceWeekend
-{
- public class DbRaceWeekend
- {
- public Guid Id { get; set; }
-
- public DateTime UtcStart { get; set; }
- public DateTime UtcEnd { get; set; }
- }
-
- public class RaceWeekendCollection
- {
- public static DbRaceWeekend Current { get; private set; }
-
- private static ILiteCollection Collection
- {
- get
- {
- ILiteCollection _collection = RaceWeekendDatabase.Database.GetCollection();
- _collection.EnsureIndex(x => x.Id, true);
- return _collection;
- }
- }
-
- public static void End()
- {
- try
- {
- var storedWeekend = Collection.FindOne(x => x.Id == Current.Id);
- if (storedWeekend != null)
- {
- storedWeekend.UtcEnd = DateTime.UtcNow;
- Collection.Update(storedWeekend);
- Debug.WriteLine($"Updated Race weekend {Current.Id}");
- RaceWeekendDatabase.Close();
- }
- }
- catch (Exception ex) { Debug.WriteLine(ex); }
- }
-
- public static void Insert(DbRaceWeekend raceWeekend)
- {
- RaceWeekendDatabase.Database.BeginTrans();
- Collection.Insert(raceWeekend);
- RaceWeekendDatabase.Database.Commit();
- Current = Collection.FindAll().First();
- Debug.WriteLine($"Inserted new race weekend {raceWeekend.Id}");
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Database/RaceWeekendDatabase.cs b/Race_Element.Data.ACC/Database/RaceWeekendDatabase.cs
deleted file mode 100644
index 9a6892def..000000000
--- a/Race_Element.Data.ACC/Database/RaceWeekendDatabase.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-using RaceElement.Data.ACC.Database.LapDataDB;
-using RaceElement.Util;
-using LiteDB;
-using System;
-using System.Diagnostics;
-using System.IO;
-
-namespace RaceElement.Data.ACC.Database
-{
- ///
- /// https://github.com/mbdavid/LiteDB
- ///
- public class RaceWeekendDatabase
- {
- private static string fileName;
-
- internal static LiteDatabase CreateDatabase(string trackParseName, string carParseName, DateTime startTime)
- {
- try
- {
- DirectoryInfo dataDir = new DirectoryInfo(FileUtil.RaceElementDataPath);
- if (!dataDir.Exists)
- dataDir.Create();
-
- fileName = FileUtil.RaceElementDataPath + $"{trackParseName}-{carParseName}-" + $"{startTime:G}".Replace(":", ".").Replace("/", ".").Replace(" ", "-") + ".rwdb";
-
-
- if (Database == null)
- Database = new LiteDatabase($"Filename={fileName}; Initial Size=16KB;");
-
- if (Database == null)
- Trace.WriteLine("Something went wrong initializing the LocalDatabase.Database");
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex);
- }
-
- return Database;
-
- }
-
- public static LiteDatabase OpenDatabase(string file)
- {
- try
- {
- LiteDatabase db = new LiteDatabase($"Filename={file}; Mode=ReadOnly;");
-
- if (db == null)
- Trace.WriteLine("Something went wrong initializing the LocalDatabase.Database");
- else
- return db;
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex);
- }
-
- return null;
- }
-
- public static LiteDatabase Database { get; private set; }
-
- public static void Close()
- {
- if (Database == null)
- return;
-
- bool anyLaps = LapDataCollection.Any();
- Database.Dispose();
- Database = null;
-
- if (!anyLaps)
- {
- try
- {
- new FileInfo(fileName).Delete();
- Debug.WriteLine("Deleted rwdb file, contains no laps.");
- }
- catch (Exception e)
- {
- LogWriter.WriteToLog(e);
- }
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Database/SessionData/DbRaceSession.cs b/Race_Element.Data.ACC/Database/SessionData/DbRaceSession.cs
deleted file mode 100644
index d746af6d7..000000000
--- a/Race_Element.Data.ACC/Database/SessionData/DbRaceSession.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-using LiteDB;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using static RaceElement.ACCSharedMemory;
-
-namespace RaceElement.Data.ACC.Database.SessionData
-{
- public class DbRaceSession
- {
- public Guid Id { get; set; }
-
- public Guid RaceWeekendId { get; set; }
- public Guid TrackId { get; set; }
- public Guid CarId { get; set; }
-
- public DateTime UtcStart { get; set; }
- public DateTime UtcEnd { get; set; }
- public AcSessionType SessionType { get; set; }
- public bool IsOnline { get; set; }
- public int SessionIndex { get; set; }
- }
-
- public class RaceSessionCollection
- {
- private static ILiteCollection Collection
- {
- get
- {
- ILiteCollection _collection = RaceWeekendDatabase.Database.GetCollection();
-
- return _collection;
- }
- }
-
- private static ILiteCollection GetCollection(ILiteDatabase db)
- {
- return db.GetCollection();
- }
-
- ///
- /// Returns all db Car Guids which exist with the given track guid
- ///
- ///
- ///
- public static List GetAllCarsForTrack(Guid trackId)
- {
- return Collection.Find(x => x.TrackId == trackId)
- .Select(x => x.CarId)
- .Distinct()
- .ToList();
- }
-
- ///
- /// Returns all db Car Guids which exist with the given track guid
- ///
- ///
- ///
- public static List GetAllCarsForTrack(ILiteDatabase db, Guid trackId)
- {
- return GetCollection(db).Find(x => x.TrackId == trackId)
- .Select(x => x.CarId)
- .Distinct()
- .ToList();
- }
-
- public static List GetAll(ILiteDatabase db)
- {
- return GetCollection(db).FindAll().OrderByDescending(x => x.UtcStart).ToList();
- }
-
- public static List GetAll()
- {
- return Collection.FindAll().OrderByDescending(x => x.UtcStart).ToList();
- }
-
- public static void Update(DbRaceSession raceSession)
- {
- try
- {
- var storedSession = Collection.FindOne(x => x.Id == raceSession.Id);
- if (storedSession != null)
- {
- storedSession = raceSession;
- Collection.Update(storedSession);
- Debug.WriteLine($"Updated Race session {raceSession.Id}");
- }
- }
- catch (Exception ex) { Debug.WriteLine(ex); }
- }
-
- public static void Insert(DbRaceSession raceSession)
- {
- RaceWeekendDatabase.Database.BeginTrans();
- Collection.EnsureIndex(x => x.Id, true);
- Collection.Insert(raceSession);
- RaceWeekendDatabase.Database.Commit();
- Debug.WriteLine($"Inserted new race session {raceSession.SessionIndex} {raceSession.SessionType} {raceSession.Id}");
- }
-
- public static void Delete(DbRaceSession raceSession)
- {
- RaceWeekendDatabase.Database.BeginTrans();
- Collection.Delete(raceSession.Id);
- RaceWeekendDatabase.Database.Commit();
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Database/Telemetry/DbLapTelemetry.cs b/Race_Element.Data.ACC/Database/Telemetry/DbLapTelemetry.cs
deleted file mode 100644
index 51328d3ea..000000000
--- a/Race_Element.Data.ACC/Database/Telemetry/DbLapTelemetry.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-using LiteDB;
-using System;
-
-namespace RaceElement.Data.ACC.Database.Telemetry
-{
- public class DbLapTelemetry
- {
- public Guid Id { get; set; }
- public Guid LapId { get; set; }
- public int Herz { get; set; }
- public byte[] LapData { get; set; }
- }
-
- [Serializable]
- public class TelemetryPoint
- {
- public float SplinePosition { get; set; }
- public InputsData InputsData { get; set; }
- public TyreData TyreData { get; set; }
- public BrakeData BrakeData { get; set; }
- public PhysicsData PhysicsData { get; set; }
- }
-
- [Serializable]
- public class InputsData
- {
- public float Gas { get; set; }
- public float Brake { get; set; }
- public float SteerAngle { get; set; }
- public int Gear { get; set; }
- }
-
- [Serializable]
- public class TyreData
- {
- public float[] TyreCoreTemperature { get; set; }
- public float[] TyrePressure { get; set; }
- }
-
- [Serializable]
- public class BrakeData
- {
- public float[] BrakeTemperature { get; set; }
- }
-
- [Serializable]
- public class PhysicsData
- {
- public float[] WheelSlip { get; set; }
- public float Speed { get; set; }
- public float X { get; set; }
- public float Y { get; set; }
- public float Heading { get; set; }
- }
-
- public class LapTelemetryCollection
- {
- private static ILiteCollection Collection
- {
- get
- {
- ILiteCollection _collection = RaceWeekendDatabase.Database.GetCollection();
-
- return _collection;
- }
- }
-
- private static ILiteCollection GetCollection(ILiteDatabase db)
- {
- return db.GetCollection();
- }
-
- public static DbLapTelemetry GetForLap(ILiteCollection collection, Guid lapId)
- {
- if (lapId == Guid.Empty) return null;
- try
- {
- return collection.FindOne(x => x.LapId == lapId);
- }
- catch (InvalidCastException)
- {
- //System.InvalidCastException: 'Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.String, LiteDB.BsonValue]' to type 'System.Byte[]'.'
- return null;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Database/Telemetry/DbLapTelemetryExtensions.cs b/Race_Element.Data.ACC/Database/Telemetry/DbLapTelemetryExtensions.cs
deleted file mode 100644
index c5c080a1f..000000000
--- a/Race_Element.Data.ACC/Database/Telemetry/DbLapTelemetryExtensions.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using RaceElement.Util;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Runtime.Serialization.Formatters.Binary;
-
-namespace RaceElement.Data.ACC.Database.Telemetry
-{
- public static class DbLapTelemetryExtensions
- {
- public static Dictionary DeserializeLapData(this DbLapTelemetry dbLapTelemetry)
- {
- Dictionary Data = new Dictionary();
-
- try
- {
- using (var ms = new MemoryStream(dbLapTelemetry.LapData))
- {
- var formatter = new BinaryFormatter();
- Data = (Dictionary)formatter.Deserialize(ms);
- ms.Close();
- }
- }
- catch (Exception ex)
- {
- LogWriter.WriteToLog(ex);
- }
-
- return Data;
- }
-
- public static byte[] SerializeLapData(this Dictionary dbLapTelemetry)
- {
- byte[] Data = new byte[0];
-
- try
- {
- using (var ms = new MemoryStream())
- {
- var formatter = new BinaryFormatter();
-
- formatter.Serialize(ms, dbLapTelemetry);
- Data = ms.ToArray();
- ms.Close();
- }
- }
- catch (Exception ex)
- {
- LogWriter.WriteToLog(ex);
- }
-
- return Data;
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Database/Telemetry/TelemetryRecorder.cs b/Race_Element.Data.ACC/Database/Telemetry/TelemetryRecorder.cs
deleted file mode 100644
index 748828f41..000000000
--- a/Race_Element.Data.ACC/Database/Telemetry/TelemetryRecorder.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-using RaceElement.Util.Settings;
-using RaceElement.Data.ACC.Session;
-using RaceElement.Data.ACC.Tracker;
-using RaceElement.Data.ACC.Tracker.Laps;
-using RaceElement.Util;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Threading;
-using static RaceElement.ACCSharedMemory;
-
-namespace RaceElement.Data.ACC.Database.Telemetry
-{
- internal class TelemetryRecorder
- {
- private static TelemetryRecorder _instance;
- public static TelemetryRecorder Instance
- {
- get
- {
- if (_instance == null)
- _instance = new TelemetryRecorder();
-
- return _instance;
- }
- }
-
- private readonly int IntervalMillis;
- private readonly TimeSpan _intervalTimeSpan;
-
- private bool _isRunning = false;
- private SPageFilePhysics _pagePhysics;
- private SPageFileGraphic _pageGraphics;
- private readonly Dictionary _lapData = new Dictionary();
-
- private TelemetryRecorder()
- {
- IntervalMillis = 1000 / new AccManagerSettings().Get().TelemetryDetailedHerz;
- _intervalTimeSpan = new TimeSpan(0, 0, 0, IntervalMillis);
-
- PagePhysicsTracker.Instance.Tracker += OnPagePhysicsUpdated;
- PageGraphicsTracker.Instance.Tracker += OnPageGraphicsUpdated;
- LapTracker.Instance.LapFinished += OnLapFinished;
- RaceSessionTracker.Instance.OnSessionFinished += OnSessionFinished;
-
- _pageGraphics = ACCSharedMemory.Instance.ReadGraphicsPageFile(true);
- _pagePhysics = ACCSharedMemory.Instance.ReadPhysicsPageFile(true);
- }
-
- private void OnSessionFinished(object sender, SessionData.DbRaceSession e)
- {
- Stop();
- }
-
- private void OnLapFinished(object sender, LapDataDB.DbLapData e)
- {
- if (_isRunning)
- {
- lock (_lapData)
- {
- LogWriter.WriteToLog($"TelemetryRecorder: Recorded {_lapData.Count} data points.");
- DbLapTelemetry lapTelemetry = new DbLapTelemetry()
- {
- Id = Guid.NewGuid(),
- LapId = e.Id,
- LapData = _lapData.SerializeLapData(),
- Herz = 1000 / this.IntervalMillis
- };
- _lapData.Clear();
- var collection = RaceWeekendDatabase.Database.GetCollection();
-
- var existing = collection.Find(x => x.LapId == e.Id);
- if (!existing.Any())
- {
- LogWriter.WriteToLog("TelemetryRecorder: Inserting LapTelemetry");
- RaceWeekendDatabase.Database.BeginTrans();
- collection.Insert(lapTelemetry);
- RaceWeekendDatabase.Database.Commit();
- }
- else
- {
- LogWriter.WriteToLog($"TelemetryRecorder: LapTelemetry already exists for lap id {e.Id}");
- }
- }
- }
- }
-
- private void OnPageGraphicsUpdated(object sender, SPageFileGraphic e) => _pageGraphics = e;
- private void OnPagePhysicsUpdated(object sender, SPageFilePhysics e) => _pagePhysics = e;
-
- public void Record()
- {
- if (_isRunning)
- {
- Debug.WriteLine("TelemetryRecorded: Already Recording");
- LogWriter.WriteToLog("TelemetryRecorded: Already Recording");
- return;
- }
-
- LogWriter.WriteToLog("TelemetryRecorder: Record()");
-
- if (!new AccManagerSettings().Get().TelemetryRecordDetailed)
- return;
-
- _isRunning = true;
- new Thread(x =>
- {
- LogWriter.WriteToLog("Starting recording loop");
- var nextTick = DateTime.UtcNow.AddMilliseconds(IntervalMillis);
- while (_isRunning)
- {
- try
- {
- while (DateTime.UtcNow < nextTick)
- Thread.Sleep(nextTick - DateTime.UtcNow);
- }
- catch { }
- nextTick = DateTime.UtcNow.AddMilliseconds(IntervalMillis);
- long ticks = DateTime.UtcNow.Ticks;
-
- try
- {
- lock (_lapData)
- {
- if (_pageGraphics.GlobalRed)
- continue;
-
- float currentSplinePositio = _pageGraphics.NormalizedCarPosition;
-
-
- bool hasLapData = _lapData.Any();
- bool isSamePoint = false;
-
- if (hasLapData)
- isSamePoint = _lapData.Last().Value.SplinePosition == currentSplinePositio;
-
-
- if (_pageGraphics.NormalizedCarPosition == 1)
- continue;
-
- if (!hasLapData || (hasLapData && !isSamePoint))
- {
- if (!_lapData.ContainsKey(ticks))
- {
- float xCoord = 0;
- float yCoord = 0;
- for (int i = 0; i < 4; i++)
- {
- xCoord += _pagePhysics.TyreContactPoint[i].X;
- yCoord += _pagePhysics.TyreContactPoint[i].Z;
- }
- xCoord /= 4;
- yCoord /= 4;
-
- if (xCoord == 0 || yCoord == 0)
- continue;
-
- _lapData.Add(ticks, new TelemetryPoint()
- {
- SplinePosition = _pageGraphics.NormalizedCarPosition,
- InputsData = new InputsData()
- {
- Gas = _pagePhysics.Gas,
- Brake = _pagePhysics.Brake,
- Gear = _pagePhysics.Gear,
- SteerAngle = _pagePhysics.SteerAngle
- },
- TyreData = new TyreData()
- {
- TyreCoreTemperature = _pagePhysics.TyreCoreTemperature,
- TyrePressure = _pagePhysics.WheelPressure,
- },
- BrakeData = new BrakeData()
- {
- BrakeTemperature = _pagePhysics.BrakeTemperature,
- },
- PhysicsData = new PhysicsData()
- {
- WheelSlip = _pagePhysics.WheelSlip,
- Speed = _pagePhysics.SpeedKmh,
- X = xCoord,
- Y = yCoord,
- Heading = _pagePhysics.Heading,
- }
- });
- }
- else
- {
- //LogWriter.WriteToLog("Telemetry Point for time tick already exists: " + ticks);
- }
- }
- else
- {
- //if (hasLapData)
- //{
- // LogWriter.WriteToLog($"lapdata.count: {_lapData.Count}, Current Spline: {_pageGraphics.NormalizedCarPosition:F4}, Last spline: {_lapData.Last().Value.SplinePosition:F4} ");
- //}
-
- }
- }
- }
- catch (Exception ex)
- {
- LogWriter.WriteToLog(ex);
- }
- }
- }).Start();
- }
-
- public void Stop()
- {
- _isRunning = false;
- LogWriter.WriteToLog("TelemetryRecorder: Stop()");
- Thread.Sleep(IntervalMillis * 3);
-
- //PagePhysicsTracker.Instance.Tracker -= OnPagePhysicsUpdated;
- //PageGraphicsTracker.Instance.Tracker -= OnPageGraphicsUpdated;
- //LapTracker.Instance.LapFinished -= OnLapFinished;
- //RaceSessionTracker.Instance.OnSessionFinished -= OnSessionFinished;
- }
- }
-}
diff --git a/Race_Element.Data.ACC/EntryList/EntryListTracker.cs b/Race_Element.Data.ACC/EntryList/EntryListTracker.cs
deleted file mode 100644
index ef7c61047..000000000
--- a/Race_Element.Data.ACC/EntryList/EntryListTracker.cs
+++ /dev/null
@@ -1,241 +0,0 @@
-using RaceElement.Broadcast;
-using RaceElement.Broadcast.Structs;
-using RaceElement.Data.ACC.EntryList.TrackPositionGraph;
-using RaceElement.Data.ACC.AccidentList;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-using RaceElement.Data.ACC.Tracker;
-
-namespace RaceElement.Data.ACC.EntryList
-{
- public class EntryListTracker
- {
- public class CarData
- {
- public CarInfo CarInfo { get; set; }
- public RealtimeCarUpdate RealtimeCarUpdate { get; set; }
- }
-
-
-
- private static EntryListTracker _instance;
- public static EntryListTracker Instance
- {
- get
- {
- if (_instance == null) _instance = new EntryListTracker();
- return _instance;
- }
- private set { _instance = value; }
- }
-
- internal Dictionary _entryListCars = new Dictionary();
- private static AccidentListTracker _accidentListTracker = AccidentListTracker.Instance;
-
- public List> Cars
- {
- get
- {
- lock (_entryListCars)
- {
- return _entryListCars.ToList();
- }
- }
- }
- private bool _isRunning = false;
-
- private EntryListTracker()
- {
-
- }
-
- internal void Start()
- {
-#if DEBUG
-
- _isRunning = true;
- BroadcastTracker.Instance.OnRealTimeCarUpdate += RealTimeCarUpdate_EventHandler;
- BroadcastTracker.Instance.OnEntryListUpdate += EntryListUpdate_EventHandler;
- BroadcastTracker.Instance.OnBroadcastEvent += Broadcast_EventHandler;
-
- _accidentListTracker.Start();
-
- StartEntryListCleanupTracker();
-#endif
- }
-
- internal void Stop()
- {
-#if DEBUG
- Debug.WriteLine("Stopping EntryListTracker");
- _isRunning = false;
- BroadcastTracker.Instance.OnRealTimeCarUpdate -= RealTimeCarUpdate_EventHandler;
- BroadcastTracker.Instance.OnEntryListUpdate -= EntryListUpdate_EventHandler;
- BroadcastTracker.Instance.OnBroadcastEvent -= Broadcast_EventHandler;
-
- _accidentListTracker.Stop();
-
- _entryListCars?.Clear();
-#endif
- }
-
- private void StartEntryListCleanupTracker()
- {
- new Task(() =>
- {
- try
- {
- while (_isRunning)
- {
- Thread.Sleep(100);
-
- int[] activeCarIds = ACCSharedMemory.Instance.ReadGraphicsPageFile().CarIds;
-
- List> datas = _entryListCars.ToList();
- foreach (var entryListCar in datas)
- {
- bool isInServer = activeCarIds.Contains(entryListCar.Key);
- if (!isInServer)
- lock (_entryListCars)
- _entryListCars.Remove(entryListCar.Key);
- }
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex);
- }
- }).Start();
- }
-
- private void Broadcast_EventHandler(object sender, BroadcastingEvent broadcastingEvent)
- {
- try
- {
- switch (broadcastingEvent.Type)
- {
- case BroadcastingCarEventType.LapCompleted:
- {
- if (broadcastingEvent.CarData == null)
- break;
- //lock (_entryListCars)
- //{
- // CarData carData;
- // if (_entryListCars.TryGetValue(broadcastingEvent.CarData.CarIndex, out carData))
- // {
- // carData.CarInfo = broadcastingEvent.CarData;
- // }
- // else
- // {
- // //Debug.WriteLine($"BroadcastingCarEventType.LapCompleted car index: {broadcastingEvent.CarData.CarIndex} not found in entry list");
- // carData = new CarData();
- // carData.CarInfo = broadcastingEvent.CarData;
- // _entryListCars.Add(broadcastingEvent.CarData.CarIndex, carData);
- // }
- //}
- break;
- }
- case BroadcastingCarEventType.Accident:
- {
- //Debug.WriteLine($"#{broadcastingEvent.CarData.RaceNumber}| {broadcastingEvent.CarData.GetCurrentDriverName()} had an accident. {broadcastingEvent.Msg}");
- break;
- }
-
- default:
- {
- if (broadcastingEvent.CarData == null)
- break;
-
- //Debug.WriteLine($"{broadcastingEvent.Type} - {broadcastingEvent.CarData.RaceNumber} - {broadcastingEvent.Msg}");
- break;
- }
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex);
- }
- }
-
- private void EntryListUpdate_EventHandler(object sender, CarInfo carInfo)
- {
- try
- {
- CarData carData;
- lock (_entryListCars)
- {
- if (_entryListCars.TryGetValue(carInfo.CarIndex, out carData))
- {
- carData.CarInfo = carInfo;
-
- //
- Car car = PositionGraph.Instance.GetCar(carInfo.CarIndex);
- if (car != null)
- car.UpdateLocation(carData.RealtimeCarUpdate.SplinePosition, carData.RealtimeCarUpdate.CarLocation);
- }
- else
- {
- carData = new CarData();
- carData.CarInfo = carInfo;
-
- _entryListCars.Add(carInfo.CarIndex, carData);
- PositionGraph.Instance.AddCar(carInfo.CarIndex);
- }
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex);
- }
- }
-
- private void RealTimeCarUpdate_EventHandler(object sender, RealtimeCarUpdate carUpdate)
- {
- try
- {
- CarData carData;
- lock (_entryListCars)
- {
- if (_entryListCars.TryGetValue(carUpdate.CarIndex, out carData))
- {
- carData.RealtimeCarUpdate = carUpdate;
-
- Car car = PositionGraph.Instance.GetCar(carUpdate.CarIndex);
- if (car != null)
- car.UpdateLocation(carUpdate.SplinePosition, carUpdate.CarLocation);
- }
- else
- {
- //Debug.WriteLine($"RealTimeCarUpdate_EventHandler car index: {carUpdate.CarIndex} not found in entry list");
- carData = new CarData();
- carData.RealtimeCarUpdate = carUpdate;
-
- _entryListCars.Add(carUpdate.CarIndex, carData);
-
- PositionGraph.Instance.AddCar(carUpdate.CarIndex);
- }
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex);
- }
-
- /*var accidentList = _accidentListTracker.GetNewAccidents();
- foreach (var broadcastEventList in accidentList)
- {
- if (broadcastEventList.Count == 0) continue;
-
- string carNumbers = string.Join(" ", broadcastEventList.Select(x => x.CarData.RaceNumber).ToArray());
- string accidentMessage = $"accident between [{carNumbers}]";
- Debug.WriteLine($"{accidentMessage}");
-
- }*/
-
- }
- }
-}
diff --git a/Race_Element.Data.ACC/EntryList/TrackPositionGraph/CarPosition.cs b/Race_Element.Data.ACC/EntryList/TrackPositionGraph/CarPosition.cs
deleted file mode 100644
index 176e23c84..000000000
--- a/Race_Element.Data.ACC/EntryList/TrackPositionGraph/CarPosition.cs
+++ /dev/null
@@ -1,187 +0,0 @@
-using RaceElement.Util.SystemExtensions;
-using RaceElement.Broadcast;
-using System.Diagnostics;
-
-namespace RaceElement.Data.ACC.EntryList.TrackPositionGraph
-{
- public class Car
- {
- public int CarIndex { get; set; }
- public int LapIndex { get; set; }
- public float SplinePosition { get; set; }
- public CarLocationEnum Location { get; set; }
- public CarLocationEnum PreviousLocation { get; set; }
-
- public override bool Equals(object obj)
- {
- return this.CarIndex == ((Car)obj).CarIndex;
- }
- }
-
- public static class CarPositionUpdater
- {
- public static void UpdateLocation(this Car car, float newSplinePosition, CarLocationEnum newLocation)
- {
- EntryListTracker.CarData carData = EntryListTracker.Instance._entryListCars[car.CarIndex];
- if (carData.CarInfo == null)
- return;
- string currentDriver = carData.CarInfo.Drivers[carData.CarInfo.CurrentDriverIndex].LastName;
-
-
- string carInfo = $"#{carData.CarInfo.RaceNumber}".FillEnd(5, ' ');
-
- if (newLocation != car.Location)
- {
- switch (newLocation)
- {
- case CarLocationEnum.PitEntry:
- {
- switch (car.Location)
- {
- case CarLocationEnum.Track:
- {
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
-
- break;
- }
-
- case CarLocationEnum.NONE:
- {
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
-
- Debug.WriteLine($"{carInfo} has come into the pit entry on the formation lap");
- break;
- }
- }
- break;
- }
- case CarLocationEnum.Pitlane:
- {
- switch (car.Location)
- {
- case CarLocationEnum.PitEntry:
- {
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
-
- break;
- }
- case CarLocationEnum.PitExit:
- {
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
-
- break;
- }
- case CarLocationEnum.Track:
- {
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
-
- break;
- }
- case CarLocationEnum.NONE:
- {
- Debug.WriteLine($"{carInfo} has joined the server");
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
-
- break;
- }
- }
- break;
- }
-
- case CarLocationEnum.PitExit:
- {
- switch (car.Location)
- {
- case CarLocationEnum.Pitlane:
- {
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
-
- break;
- }
- }
- break;
- }
- case CarLocationEnum.Track:
- {
- switch (car.Location)
- {
- case CarLocationEnum.PitEntry:
- {
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
-
- //Debug.WriteLine($"{carInfo} has cancelled his pit entry");
- break;
- }
- case CarLocationEnum.PitExit:
- {
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
-
- break;
- }
-
- case CarLocationEnum.NONE:
- {
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
-
- break;
- }
- }
- break;
- }
- }
-
- if (newLocation == CarLocationEnum.Track && car.Location == CarLocationEnum.Pitlane)
- {
-
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
- }
-
- if (car.PreviousLocation != car.Location)
- Debug.WriteLine($"{carInfo} | lap:{car.LapIndex} | {car.PreviousLocation}->{car.Location}");
- }
-
-
- if (car.SplinePosition > newSplinePosition && car.SplinePosition > 0.99)
- {
- if (newLocation == CarLocationEnum.Track && car.Location == CarLocationEnum.Track)
- {
- Debug.WriteLine($"{carInfo} has gained a lap on track");
- car.LapIndex++;
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
- }
-
- if (newLocation == CarLocationEnum.Pitlane && car.Location == CarLocationEnum.Pitlane && car.PreviousLocation == CarLocationEnum.PitEntry)
- {
- if (car.LapIndex > 0)
- {
- car.LapIndex++;
- Debug.WriteLine($"{carInfo} has gained a lap in the pitlane.");
- }
-
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
- }
-
- if (newLocation == CarLocationEnum.Track && car.Location == CarLocationEnum.NONE)
- {
- car.PreviousLocation = car.Location;
- car.Location = newLocation;
- }
- }
-
- car.SplinePosition = newSplinePosition;
- }
- }
-}
diff --git a/Race_Element.Data.ACC/EntryList/TrackPositionGraph/PositionGraph.cs b/Race_Element.Data.ACC/EntryList/TrackPositionGraph/PositionGraph.cs
deleted file mode 100644
index 7780d7123..000000000
--- a/Race_Element.Data.ACC/EntryList/TrackPositionGraph/PositionGraph.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-using RaceElement.Data.ACC.Session;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-namespace RaceElement.Data.ACC.EntryList.TrackPositionGraph
-{
- public class PositionGraph
- {
- private Dictionary _cars = new Dictionary();
-
- private static PositionGraph _instance;
- public static PositionGraph Instance
- {
- get
- {
- if (_instance == null) _instance = new PositionGraph();
- return _instance;
- }
- }
-
- private PositionGraph()
- {
- RaceSessionTracker.Instance.OnACSessionTypeChanged += (s, e) => ResetData();
- }
-
- public void AddCar(int carIndex)
- {
- Car newCar = new Car()
- {
- CarIndex = carIndex,
- Location = Broadcast.CarLocationEnum.NONE,
- LapIndex = 0,
- SplinePosition = 0,
- PreviousLocation = Broadcast.CarLocationEnum.NONE,
- };
-
- if (!_cars.TryGetValue(carIndex, out _))
- _cars.Add(carIndex, newCar);
- }
-
- public Car GetCar(int carIndex)
- {
- if (_cars.TryGetValue(carIndex, out Car car))
- {
- return car;
- }
-
- return null;
- }
-
- public void ResetData()
- {
- Debug.WriteLine("Reset Position Graph");
- //_cars.Clear();
-
- foreach (Car car in _cars.Values)
- {
- _cars[car.CarIndex].Location = Broadcast.CarLocationEnum.NONE;
- _cars[car.CarIndex].LapIndex = 0;
- _cars[car.CarIndex].SplinePosition = 0;
- _cars[car.CarIndex].PreviousLocation = Broadcast.CarLocationEnum.NONE;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/HotKey/AccHotkeys.cs b/Race_Element.Data.ACC/HotKey/AccHotkeys.cs
deleted file mode 100644
index 0d91dd43f..000000000
--- a/Race_Element.Data.ACC/HotKey/AccHotkeys.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Threading;
-using System.Windows.Forms;
-
-namespace RaceElement.Data.ACC.HotKey
-{
- public class AccHotkeys
- {
- ///
- /// Sends the M hotkey to the active application.
- /// Returns the UtcNow time w
- ///
- ///
- public static DateTime SaveReplay()
- {
- Thread.Sleep(1000);
- SendKeys.SendWait("m");
- return DateTime.UtcNow;
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Laps/LapTracker.cs b/Race_Element.Data.ACC/Laps/LapTracker.cs
deleted file mode 100644
index 04ed87c5a..000000000
--- a/Race_Element.Data.ACC/Laps/LapTracker.cs
+++ /dev/null
@@ -1,222 +0,0 @@
-using RaceElement.Broadcast.Structs;
-using RaceElement.Data.ACC.Core;
-using RaceElement.Data.ACC.Database.LapDataDB;
-using RaceElement.Data.ACC.Session;
-using RaceElement.Util;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Threading;
-
-namespace RaceElement.Data.ACC.Tracker.Laps
-{
- public class LapTracker
- {
- private static LapTracker _instance;
- public static LapTracker Instance
- {
- get
- {
- if (_instance == null) _instance = new LapTracker();
- return _instance;
- }
- }
-
- private bool IsTracking = false;
-
- private int CurrentSector = 0;
-
- public Dictionary Laps = new Dictionary();
- public DbLapData CurrentLap = new DbLapData();
-
- public event EventHandler LapFinished;
-
- private LapTracker()
- {
- if (!IsTracking)
- this.Start();
-
- BroadcastTracker.Instance.OnRealTimeLocalCarUpdate += Instance_OnRealTimeCarUpdate;
- RaceSessionTracker.Instance.OnACSessionTypeChanged += Instance_OnACSessionTypeChanged;
- RaceSessionTracker.Instance.OnNewSessionStarted += Instance_OnNewSessionStarted;
- }
-
- private void Instance_OnNewSessionStarted(object sender, Database.SessionData.DbRaceSession e)
- {
- Laps.Clear();
- CurrentLap = new DbLapData() { Index = ACCSharedMemory.Instance.ReadGraphicsPageFile(true).CompletedLaps + 1 };
- }
-
- private void Instance_OnACSessionTypeChanged(object sender, ACCSharedMemory.AcSessionType e)
- {
- var pageGraphics = ACCSharedMemory.Instance.ReadGraphicsPageFile(true);
-
- lock (Laps)
- Laps.Clear();
-
- lock (CurrentLap)
- {
- if (RaceSessionTracker.Instance.CurrentSession == null)
- Debug.WriteLine("Lap Tracker cannot record a new lap on session type change, current session is null");
- else
- CurrentLap = new DbLapData() { Index = pageGraphics.CompletedLaps + 1, RaceSessionId = RaceSessionTracker.Instance.CurrentSession.Id };
- }
- Debug.WriteLine("LapTracker: Resetted current lap and previous recorded laps.");
- }
-
- private LapInfo _lastLapInfo;
-
- private void Instance_OnRealTimeCarUpdate(object sender, RealtimeCarUpdate e)
- {
- if (e.LastLap != null)
- {
- _lastLapInfo = e.LastLap;
-
- FinalizeCurrentLapData();
- }
- }
-
- private void FinalizeCurrentLapData()
- {
- try
- {
- if (_lastLapInfo != null)
- if (_lastLapInfo.Splits != null && _lastLapInfo.Splits.Count == 3)
- {
- lock (Laps)
- if (Laps.Count != 0)
- {
- if (!Laps.TryGetValue(CurrentLap.Index - 1, out DbLapData lastData))
- return;
-
- if (_lastLapInfo.LaptimeMS == lastData.Time)
- {
- if (_lastLapInfo.Splits[2].HasValue)
- {
- if (Laps[CurrentLap.Index - 1].Sector3 != _lastLapInfo.Splits[2].Value)
- {
- Laps[CurrentLap.Index - 1].Sector3 = _lastLapInfo.Splits[2].Value;
- Laps[CurrentLap.Index - 1].IsValid = !_lastLapInfo.IsInvalid;
- Laps[CurrentLap.Index - 1].LapType = _lastLapInfo.Type;
-
- if (RaceSessionTracker.Instance.CurrentSession != null)
- {
- Laps[CurrentLap.Index - 1].Id = Guid.NewGuid();
- Laps[CurrentLap.Index - 1].RaceSessionId = RaceSessionTracker.Instance.CurrentSession.Id;
- Laps[CurrentLap.Index - 1].UtcCompleted = DateTime.UtcNow;
- Laps[CurrentLap.Index - 1].FuelInTank = ACCSharedMemory.Instance.ReadPhysicsPageFile().Fuel;
- Laps[CurrentLap.Index - 1].TempTrack = ACCSharedMemory.Instance.ReadPhysicsPageFile().RoadTemp;
- Laps[CurrentLap.Index - 1].TempAmbient = ACCSharedMemory.Instance.ReadPhysicsPageFile().AirTemp;
- Laps[CurrentLap.Index - 1].GripStatus = ACCSharedMemory.Instance.ReadGraphicsPageFile().trackGripStatus;
- LapDataCollection.Insert(Laps[CurrentLap.Index - 1]);
-
- Trace.WriteLine($"{Laps[CurrentLap.Index - 1]}");
-
- LapFinished?.Invoke(this, Laps[CurrentLap.Index - 1]);
- }
- }
- }
- }
- }
- }
- }
- catch (Exception e)
- {
- Debug.WriteLine(e);
- }
- }
-
- internal void Start()
- {
- if (IsTracking)
- return;
-
- IsTracking = true;
- new Thread(x =>
- {
- while (IsTracking)
- {
- try
- {
-
-
- if (AccProcess.IsRunning)
- {
- Thread.Sleep(1000 / 10);
-
- var pageGraphics = ACCSharedMemory.Instance.ReadGraphicsPageFile(true);
-
- if (pageGraphics.Status == ACCSharedMemory.AcStatus.AC_OFF)
- {
- Laps.Clear();
- CurrentLap = new DbLapData() { Index = pageGraphics.CompletedLaps + 1 };
- }
-
-
- // TOdo if current lap is inlap/outlap reset the lap data.
-
- // collect sector times.
- if (CurrentSector != pageGraphics.CurrentSectorIndex)
- {
- if (CurrentLap.Sector1 == -1 && CurrentSector != 0)
- {
- // simply don't collect, we're already into a lap and passed sector 1, can't properly calculate the sector times now.
- }
- else
- switch (pageGraphics.CurrentSectorIndex)
- {
- case 1: CurrentLap.Sector1 = pageGraphics.LastSectorTime; break;
- case 2: CurrentLap.Sector2 = pageGraphics.LastSectorTime - CurrentLap.Sector1; break;
-
- // this sector time is now finalized with the FinalizeCurrentLapData() function
- //case 0: CurrentLap.Sector3 = pageGraphics.LastTimeMs - CurrentLap.Sector2 - CurrentLap.Sector1; break;
- }
-
- CurrentSector = pageGraphics.CurrentSectorIndex;
- }
-
- // finalize lap time data and add it to history.
- if (CurrentLap.Index - 1 != pageGraphics.CompletedLaps && pageGraphics.LastTimeMs != int.MaxValue)
- {
- CurrentLap.Time = pageGraphics.LastTimeMs;
- CurrentLap.FuelUsage = (int)(ACCSharedMemory.Instance.ReadGraphicsPageFile().FuelXLap * 1000);
-
- if (CurrentLap.Sector1 != -1)
- {
- lock (Laps)
- {
- if (!Laps.ContainsKey(CurrentLap.Index))
- Laps.Add(CurrentLap.Index, CurrentLap);
- }
- }
-
- CurrentLap = new DbLapData() { Index = pageGraphics.CompletedLaps + 1 };
- }
- }
- else
- {
- Thread.Sleep(1000);
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex);
- LogWriter.WriteToLog(ex);
- }
- }
-
- _instance = null;
- IsTracking = false;
- }).Start();
- }
-
- internal void Stop()
- {
- RaceSessionTracker.Instance.OnACSessionTypeChanged -= Instance_OnACSessionTypeChanged;
- BroadcastTracker.Instance.OnRealTimeLocalCarUpdate -= Instance_OnRealTimeCarUpdate;
- IsTracking = false;
- }
- }
-
-
-}
diff --git a/Race_Element.Data.ACC/Properties/AssemblyInfo.cs b/Race_Element.Data.ACC/Properties/AssemblyInfo.cs
deleted file mode 100644
index 1d04f7305..000000000
--- a/Race_Element.Data.ACC/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("RaceElement.Data.ACC")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Element Future")]
-[assembly: AssemblyProduct("RaceElement.Data.ACC")]
-[assembly: AssemblyCopyright("Copyright 2022 © Reinier Klarenberg")]
-[assembly: AssemblyTrademark("Element Future")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("bb693ceb-cd96-4eb6-9f13-110d3ccecffe")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Race_Element.Data.ACC/Race Element.Data.ACC.csproj b/Race_Element.Data.ACC/Race Element.Data.ACC.csproj
deleted file mode 100644
index f7b6ae1e3..000000000
--- a/Race_Element.Data.ACC/Race Element.Data.ACC.csproj
+++ /dev/null
@@ -1,350 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {BB693CEB-CD96-4EB6-9F13-110D3CCECFFE}
- Library
- Properties
- RaceElement.Data.ACC
- RaceElement.Data.ACC
- v4.8
- 512
- true
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- true
- bin\Debug Minimized\
- DEBUG;TRACE
- full
- AnyCPU
- 7.3
- prompt
-
-
-
- ..\packages\AutoMapper.8.1.0\lib\net461\AutoMapper.dll
-
-
- ..\packages\LiteDB.5.0.15\lib\net45\LiteDB.dll
-
-
- ..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
-
-
- ..\packages\Microsoft.Extensions.Configuration.7.0.0\lib\net462\Microsoft.Extensions.Configuration.dll
-
-
- ..\packages\Microsoft.Extensions.Configuration.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Abstractions.dll
-
-
- ..\packages\Microsoft.Extensions.Configuration.Binder.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Binder.dll
-
-
- ..\packages\Microsoft.Extensions.Configuration.CommandLine.7.0.0\lib\net462\Microsoft.Extensions.Configuration.CommandLine.dll
-
-
- ..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.7.0.0\lib\net462\Microsoft.Extensions.Configuration.EnvironmentVariables.dll
-
-
- ..\packages\Microsoft.Extensions.Configuration.FileExtensions.7.0.0\lib\net462\Microsoft.Extensions.Configuration.FileExtensions.dll
-
-
- ..\packages\Microsoft.Extensions.Configuration.Json.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Json.dll
-
-
- ..\packages\Microsoft.Extensions.Configuration.UserSecrets.7.0.0\lib\net462\Microsoft.Extensions.Configuration.UserSecrets.dll
-
-
- ..\packages\Microsoft.Extensions.DependencyInjection.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll
-
-
- ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll
-
-
- ..\packages\Microsoft.Extensions.FileProviders.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.FileProviders.Abstractions.dll
-
-
- ..\packages\Microsoft.Extensions.FileProviders.Physical.7.0.0\lib\net462\Microsoft.Extensions.FileProviders.Physical.dll
-
-
- ..\packages\Microsoft.Extensions.FileSystemGlobbing.7.0.0\lib\net462\Microsoft.Extensions.FileSystemGlobbing.dll
-
-
- ..\packages\Microsoft.Extensions.Hosting.7.0.0\lib\net462\Microsoft.Extensions.Hosting.dll
-
-
- ..\packages\Microsoft.Extensions.Hosting.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Hosting.Abstractions.dll
-
-
- ..\packages\Microsoft.Extensions.Logging.7.0.0\lib\net462\Microsoft.Extensions.Logging.dll
-
-
- ..\packages\Microsoft.Extensions.Logging.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
-
-
- ..\packages\Microsoft.Extensions.Logging.Configuration.7.0.0\lib\net462\Microsoft.Extensions.Logging.Configuration.dll
-
-
- ..\packages\Microsoft.Extensions.Logging.Console.7.0.0\lib\net462\Microsoft.Extensions.Logging.Console.dll
-
-
- ..\packages\Microsoft.Extensions.Logging.Debug.7.0.0\lib\net462\Microsoft.Extensions.Logging.Debug.dll
-
-
- ..\packages\Microsoft.Extensions.Logging.EventLog.7.0.0\lib\net462\Microsoft.Extensions.Logging.EventLog.dll
-
-
- ..\packages\Microsoft.Extensions.Logging.EventSource.7.0.0\lib\net462\Microsoft.Extensions.Logging.EventSource.dll
-
-
- ..\packages\Microsoft.Extensions.Options.7.0.0\lib\net462\Microsoft.Extensions.Options.dll
-
-
- ..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.7.0.0\lib\net462\Microsoft.Extensions.Options.ConfigurationExtensions.dll
-
-
- ..\packages\Microsoft.Extensions.Primitives.7.0.0\lib\net462\Microsoft.Extensions.Primitives.dll
-
-
- ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll
-
-
- ..\packages\obs-websocket-dotnet.5.0.0.3\lib\netstandard2.0\obs-websocket-dotnet.dll
-
-
- ..\packages\Quartz.3.5.0\lib\net472\Quartz.dll
-
-
- ..\packages\Quartz.Extensions.DependencyInjection.3.5.0\lib\netstandard2.0\Quartz.Extensions.DependencyInjection.dll
-
-
- ..\packages\SLOBSharp.1.1.4\lib\netstandard2.0\SLOBSharp.dll
-
-
-
- ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
-
-
- ..\packages\System.Collections.Immutable.7.0.0\lib\net462\System.Collections.Immutable.dll
-
-
-
-
-
-
- ..\packages\System.Diagnostics.DiagnosticSource.7.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll
-
-
- ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll
- True
- True
-
-
- ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll
-
-
-
- ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
-
-
- ..\packages\System.Reactive.5.0.0\lib\net472\System.Reactive.dll
-
-
- ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll
- True
- True
-
-
- ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
-
-
- ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
- True
- True
-
-
-
- ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll
- True
- True
-
-
- ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll
- True
- True
-
-
- ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
- True
- True
-
-
- ..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll
-
-
- ..\packages\System.Text.Json.7.0.0\lib\net462\System.Text.Json.dll
-
-
- ..\packages\System.Threading.Channels.7.0.0\lib\net462\System.Threading.Channels.dll
-
-
- ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
-
-
- ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
-
-
-
-
- ..\packages\WebSocketSharp-netstandard.1.0.1\lib\net45\websocket-sharp.dll
-
-
- ..\packages\Websocket.Client.4.4.43\lib\netstandard2.0\Websocket.Client.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {840220BD-8469-4A04-A6EC-1ED2BC743EFB}
- Race Element.Broadcast
-
-
- {9F9BE520-14C4-4AB6-8119-5E14BCCA9A0F}
- Race Element.SharedMemory
-
-
- {AAB23116-299B-415B-8305-96CB86148CE7}
- Race Element.Util
-
-
-
-
\ No newline at end of file
diff --git a/Race_Element.Data.ACC/Session/RaceSessionState.cs b/Race_Element.Data.ACC/Session/RaceSessionState.cs
deleted file mode 100644
index e787d76c7..000000000
--- a/Race_Element.Data.ACC/Session/RaceSessionState.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using RaceElement.Broadcast;
-
-namespace RaceElement.Data.ACC.Session
-{
- public class RaceSessionState
- {
- public static bool IsFormationLap(bool globalRed, SessionPhase phase)
- {
- return globalRed && (phase == SessionPhase.PreSession || phase == SessionPhase.FormationLap);
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Session/RaceSessionTracker.cs b/Race_Element.Data.ACC/Session/RaceSessionTracker.cs
deleted file mode 100644
index 87bf5358e..000000000
--- a/Race_Element.Data.ACC/Session/RaceSessionTracker.cs
+++ /dev/null
@@ -1,258 +0,0 @@
-using RaceElement.Broadcast;
-using RaceElement.Data.ACC.Core;
-using RaceElement.Data.ACC.Core.Config;
-using RaceElement.Data.ACC.Database;
-using RaceElement.Data.ACC.Database.GameData;
-using RaceElement.Data.ACC.Database.LapDataDB;
-using RaceElement.Data.ACC.Database.RaceWeekend;
-using RaceElement.Data.ACC.Database.SessionData;
-using RaceElement.Data.ACC.Database.Telemetry;
-using RaceElement.Data.ACC.HotKey;
-using RaceElement.Data.ACC.Tracker;
-using RaceElement.Util;
-using System;
-using System.Diagnostics;
-using System.Linq;
-using System.Threading;
-using static RaceElement.ACCSharedMemory;
-
-namespace RaceElement.Data.ACC.Session
-{
- public class RaceSessionTracker
- {
- private bool _isTracking = false;
-
- private float _sessionTimeLeft;
-
- private AcSessionType _lastSessionType = AcSessionType.AC_UNKNOWN;
- public event EventHandler OnACSessionTypeChanged;
-
- private SessionPhase _lastSessionPhase = SessionPhase.NONE;
- public event EventHandler OnSessionPhaseChanged;
-
- private AcStatus _lastAcStatus = AcStatus.AC_OFF;
- public event EventHandler OnACStatusChanged;
-
- private int _lastSessionIndex = -1;
- public event EventHandler OnSessionIndexChanged;
-
- public event EventHandler OnNewSessionStarted;
- public event EventHandler OnSessionFinished;
- public event EventHandler OnRaceWeekendEnded;
-
- internal DbRaceSession CurrentSession { get; private set; }
-
- private DateTime _lastReplaySave;
-
- private static RaceSessionTracker _instance;
-
- private RaceSessionTracker()
- {
- Debug.WriteLine("Started race session tracker.");
-
- StartTracking();
- OnSessionIndexChanged += TryCreateNewSession;
- OnACSessionTypeChanged += TryCreateNewSession;
-
- ReplaySettings replaySettingsJson = new ReplaySettings();
- var json = replaySettingsJson.Get(false);
- Debug.WriteLine(json);
- }
-
- public static RaceSessionTracker Instance
- {
- get
- {
- if (_instance == null) _instance = new RaceSessionTracker();
- return _instance;
- }
- }
-
- private void TryCreateNewSession(object sender, AcSessionType index)
- {
- if (index != AcSessionType.AC_UNKNOWN)
- TryCreateNewSession(sender, _lastSessionIndex);
- }
-
- private void TryCreateNewSession(object sender, int sessionIndex)
- {
- if (_lastSessionType == AcSessionType.AC_UNKNOWN)
- return;
-
- if (_lastSessionIndex > -1)
- {
- if (CurrentSession != null)
- {
- if (_lastAcStatus != AcStatus.AC_OFF)
- if (_lastSessionIndex == CurrentSession.SessionIndex && _lastSessionType == CurrentSession.SessionType)
- return;
-
- CurrentSession.UtcEnd = DateTime.UtcNow;
- RaceSessionCollection.Update(CurrentSession);
- }
-
- var staticPageFile = ACCSharedMemory.Instance.ReadStaticPageFile();
- DbCarData carData = CarDataCollection.GetCarData(staticPageFile.CarModel);
- DbTrackData trackData = TrackDataCollection.GetTrackData(staticPageFile.Track);
- if (carData == null || trackData == null)
- return;
-
- CurrentSession = new DbRaceSession()
- {
- UtcStart = DateTime.UtcNow,
- RaceWeekendId = RaceWeekendCollection.Current.Id,
- SessionIndex = _lastSessionIndex,
- SessionType = _lastSessionType,
- CarId = carData.Id,
- TrackId = trackData.Id,
- IsOnline = staticPageFile.isOnline
- };
- _sessionTimeLeft = ACCSharedMemory.Instance.ReadGraphicsPageFile(true).SessionTimeLeft;
-
- _lastReplaySave = DateTime.UtcNow;
-
- RaceSessionCollection.Insert(CurrentSession);
- OnNewSessionStarted?.Invoke(this, CurrentSession);
-
- //TelemetryRecorder.Instance.Record();
- }
- }
-
- private void FinalizeCurrentSession()
- {
- if (CurrentSession != null)
- {
- _lastSessionIndex = -1;
- _lastSessionType = AcSessionType.AC_UNKNOWN;
- CurrentSession.UtcEnd = DateTime.UtcNow;
-
- var lapData = LapDataCollection.GetForSession(CurrentSession.Id);
- if (lapData.Any())
- RaceSessionCollection.Update(CurrentSession);
- else
- RaceSessionCollection.Delete(CurrentSession);
-
- OnSessionFinished?.Invoke(this, CurrentSession);
- Debug.WriteLine("RaceSessionTracker: Finalized Current Session");
- }
-
- CurrentSession = null;
- Debug.WriteLine("CurrentSession Reset to null");
- }
-
- private void FinalizeRaceWeekend()
- {
- RaceWeekendCollection.Current.UtcEnd = DateTime.UtcNow;
- OnRaceWeekendEnded?.Invoke(this, RaceWeekendCollection.Current);
- RaceWeekendCollection.End();
- }
-
- private void CreateNewRaceWeekend()
- {
- var pageStatic = ACCSharedMemory.Instance.ReadStaticPageFile();
- RaceWeekendDatabase.CreateDatabase(pageStatic.Track, pageStatic.CarModel, DateTime.UtcNow);
- RaceWeekendCollection.Insert(new DbRaceWeekend() { Id = Guid.NewGuid(), UtcStart = DateTime.UtcNow });
- }
-
- private void StartTracking()
- {
- _isTracking = true;
-
- new Thread(() =>
- {
- BroadcastTracker.Instance.OnRealTimeUpdate += Instance_OnRealTimeUpdate;
-
-
- while (_isTracking)
- {
- Thread.Sleep(100);
-
- if (AccProcess.IsRunning)
- {
- var pageGraphics = ACCSharedMemory.Instance.ReadGraphicsPageFile(true);
-
- if (pageGraphics.Status != _lastAcStatus)
- {
- Debug.WriteLine($"AcStatus: {_lastAcStatus} -> {pageGraphics.Status}");
-
- if (_lastAcStatus == AcStatus.AC_OFF)
- CreateNewRaceWeekend();
-
- _lastAcStatus = pageGraphics.Status;
-
- if (_lastAcStatus == AcStatus.AC_OFF)
- {
- FinalizeCurrentSession();
- FinalizeRaceWeekend();
- OnSessionIndexChanged?.Invoke(this, _lastSessionIndex);
- }
-
- OnACStatusChanged?.Invoke(this, _lastAcStatus);
- }
-
- bool sessionIndexChanged = false;
- if (pageGraphics.SessionIndex != _lastSessionIndex && _lastAcStatus != AcStatus.AC_OFF)
- {
- Debug.WriteLine($"SessionIndex: {_lastSessionIndex} -> {pageGraphics.SessionIndex}");
- _lastSessionIndex = pageGraphics.SessionIndex;
- sessionIndexChanged = true;
- }
-
- bool sessionTypeChanged = false;
- if (pageGraphics.SessionType != _lastSessionType && _lastAcStatus != AcStatus.AC_OFF)
- {
- Debug.WriteLine($"SessionType: {_lastSessionType} -> {pageGraphics.SessionType}");
- _lastSessionType = pageGraphics.SessionType;
- sessionTypeChanged = true;
- }
-
- if (pageGraphics.SessionTimeLeft > _sessionTimeLeft)
- {
- if (CurrentSession == null)
- _sessionTimeLeft = pageGraphics.SessionTimeLeft;
-
- Debug.WriteLine("Detected session restart.. finalizing current session");
- FinalizeCurrentSession();
- }
-
- if (sessionIndexChanged)
- OnSessionIndexChanged?.Invoke(this, _lastSessionIndex);
- if (sessionTypeChanged)
- OnACSessionTypeChanged?.Invoke(this, _lastSessionType);
-
- //HandleReplaySave();
-
- }
- }
-
- BroadcastTracker.Instance.OnRealTimeUpdate -= Instance_OnRealTimeUpdate;
- }).Start();
-
- }
-
- private void HandleReplaySave()
- {
- if (_lastReplaySave.AddHours(1) < DateTime.UtcNow)
- {
- LogWriter.WriteToLog($"Automatically Saving Replay after {_lastReplaySave.Subtract(DateTime.UtcNow)}");
- _lastReplaySave = AccHotkeys.SaveReplay();
- }
- }
-
- private void Instance_OnRealTimeUpdate(object sender, Broadcast.Structs.RealtimeUpdate e)
- {
- if (e.Phase != _lastSessionPhase)
- {
- Debug.WriteLine($"SessionPhase: {_lastSessionPhase} -> {e.Phase}");
-
- _lastSessionPhase = e.Phase;
- OnSessionPhaseChanged?.Invoke(this, e.Phase);
- }
- }
-
- internal void Stop()
- {
- _isTracking = false;
- }
- }
-}
diff --git a/Race_Element.Data.ACC/Session/SessionTimeTracker.cs b/Race_Element.Data.ACC/Session/SessionTimeTracker.cs
deleted file mode 100644
index b0a293059..000000000
--- a/Race_Element.Data.ACC/Session/SessionTimeTracker.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-using RaceElement.Data.ACC.Tracker;
-using System;
-using System.Diagnostics;
-using System.Threading;
-
-namespace RaceElement.Data.ACC.Session
-{
- public class SessionTimeTracker
- {
- private static SessionTimeTracker _instance;
- public static SessionTimeTracker Instance
- {
- get
- {
- if (_instance == null) _instance = new SessionTimeTracker();
- return _instance;
- }
- }
-
- private int _timeMultiplier = -1;
- private bool _isTracking = false;
-
- public event EventHandler OnMultiplierChanged;
-
- private SessionTimeTracker()
- {
- StartTracking();
- }
-
- private void StartTracking()
- {
- new Thread(() =>
- {
- _isTracking = true;
- BroadcastTracker.Instance.OnRealTimeUpdate += Instance_OnRealTimeUpdate;
- RaceSessionTracker.Instance.OnACSessionTypeChanged += Instance_OnACSessionTypeChanged;
- RaceSessionTracker.Instance.OnSessionPhaseChanged += Instance_OnSessionPhaseChanged;
- RaceSessionTracker.Instance.OnSessionIndexChanged += Instance_OnSessionIndexChanged;
-
- while (_isTracking)
- {
- Thread.Sleep(1000);
-
- }
-
- BroadcastTracker.Instance.OnRealTimeUpdate -= Instance_OnRealTimeUpdate;
- RaceSessionTracker.Instance.OnACSessionTypeChanged -= Instance_OnACSessionTypeChanged;
- RaceSessionTracker.Instance.OnSessionPhaseChanged -= Instance_OnSessionPhaseChanged;
- RaceSessionTracker.Instance.OnSessionIndexChanged -= Instance_OnSessionIndexChanged;
- _instance = null;
- }).Start();
- }
-
- private void Instance_OnSessionIndexChanged(object sender, int e)
- {
- ResetTimeTrackingData();
- }
-
- private void Instance_OnSessionPhaseChanged(object sender, Broadcast.SessionPhase e)
- {
- if (e == Broadcast.SessionPhase.NONE)
- ResetTimeTrackingData();
- }
-
- private void Instance_OnACSessionTypeChanged(object sender, ACCSharedMemory.AcSessionType e)
- {
- ResetTimeTrackingData();
- }
-
- private void ResetTimeTrackingData()
- {
- Debug.WriteLine("Reset time tracking data");
- _serverChanges = 0;
- _lastServerMilliseconds = -1;
- _timeMultiplier = -1;
- OnMultiplierChanged?.Invoke(_instance, _timeMultiplier);
- }
-
- private long _lastServerMilliseconds = -1;
- private int _serverChanges = 0;
- private void Instance_OnRealTimeUpdate(object sender, Broadcast.Structs.RealtimeUpdate e)
- {
- long newMilliseconds = (long)(e.TimeOfDay.TotalMilliseconds);
- if (newMilliseconds != _lastServerMilliseconds)
- {
- double serverTimeChange = newMilliseconds - _lastServerMilliseconds;
-
- if (serverTimeChange < 240000 && serverTimeChange >= 1)
- if (_lastServerMilliseconds != -1 && _serverChanges > 3)
- {
- serverTimeChange = Math.Ceiling(serverTimeChange);
- serverTimeChange = Math.Floor(serverTimeChange / 5) * 5;
- if (serverTimeChange > 0)
- {
- double possibleMultiplier = (int)Math.Ceiling(serverTimeChange / 5);
-
- if (possibleMultiplier > 0 && possibleMultiplier < 25)
- if (_timeMultiplier != possibleMultiplier)
- {
- _timeMultiplier = (int)Math.Floor(possibleMultiplier);
- OnMultiplierChanged?.Invoke(_instance, (int)Math.Floor(possibleMultiplier));
- }
- }
- }
-
- _lastServerMilliseconds = newMilliseconds;
- _serverChanges++;
- }
- }
-
- internal void Stop()
- {
- _isTracking = false;
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/AMRV12VantageGT3.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/AMRV12VantageGT3.cs
deleted file mode 100644
index 2f829632b..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/AMRV12VantageGT3.cs
+++ /dev/null
@@ -1,188 +0,0 @@
-using RaceElement.Data.SetupRanges;
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class AMRV12VantageGT3 : ICarSetupConversion, ISetupChanger
- {
- public CarModels CarModel => CarModels.Aston_Martin_Vantage_V12_GT3_2013;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- private static readonly double[] casters = new double[] { 8.3, 8.5, 8.7, 9.0, 9.2, 9.4, 9.6, 9.9, 10.1, 10.3, 10.5, 10.8, 11.0,
- 11.2, 11.4, 11.6, 11.9, 12.1, 12.3, 12.5, 12.7, 13.0, 13.2, 13.4, 13.6, 13.8, 14.0, 14.3, 14.5, 14.7, 14.9 };
- private static readonly int[] wheelRateFronts = new int[] { 115000, 120000, 125000, 130000, 135000, 140000, 145000, 150000,
- 155000, 160000, 165000, 170000, 175000, 180000, 185000 };
- private static readonly int[] wheelRateRears = new int[] { 95000, 100000, 105000, 110000, 115000, 120000, 125000, 130000, 135000, 140000, 145000, 150000,
- 155000, 160000, 165000, 170000, 175000, 180000, 185000, 190000, 195000};
-
- ITyreSetupChanger ISetupChanger.TyreSetupChanger => new TyreSetupChanger();
- IElectronicsSetupChanger ISetupChanger.ElectronicsSetupChanger => new ElectronicsSetupChanger();
- IMechanicalSetupChanger ISetupChanger.MechanicalSetupChanger => new MechSetupChanger();
- IAeroSetupChanger ISetupChanger.AeroSetupChanger => new AeroSetupChanger();
- IDamperSetupChanger ISetupChanger.DamperSetupChanger => new DamperSetupChanger();
-
- private class TyreSetupChanger : ITyreSetupChanger
- {
- public SetupDoubleRange TyrePressures => TyrePressuresGT3;
- public SetupDoubleRange CamberFront => CamberFrontGT3;
- public SetupDoubleRange CamberRear => CamberRearGT3;
- public SetupDoubleRange ToeFront => new SetupDoubleRange(-0.4, 0.4, 0.01);
- public SetupDoubleRange ToeRear => ToeFront;
- public SetupDoubleRange Caster => new SetupDoubleRange(casters);
- }
-
- private class ElectronicsSetupChanger : IElectronicsSetupChanger
- {
- public SetupIntRange TractionControl => new SetupIntRange(0, 11, 1);
- public SetupIntRange ABS => new SetupIntRange(0, 11, 1);
- public SetupIntRange EcuMap => new SetupIntRange(1, 8, 1);
- public SetupIntRange TractionControlCut => new SetupIntRange(0, 0, 1);
- }
-
- private class MechSetupChanger : IMechanicalSetupChanger
- {
- public SetupIntRange AntiRollBarFront => new SetupIntRange(0, 8, 1);
- public SetupIntRange AntiRollBarRear => AntiRollBarFront;
- public SetupDoubleRange BrakeBias => new SetupDoubleRange(57.0, 78.0, 0.2);
- public SetupIntRange PreloadDifferential => new SetupIntRange(20, 300, 10);
- public SetupIntRange BrakePower => new SetupIntRange(80, 100, 1);
- public SetupDoubleRange SteeringRatio => new SetupDoubleRange(14, 18, 1);
- public SetupIntRange WheelRateFronts => new SetupIntRange(wheelRateFronts);
- public SetupIntRange WheelRateRears => new SetupIntRange(wheelRateRears);
- public SetupIntRange BumpstopRate => new SetupIntRange(300, 2500, 100);
- public SetupIntRange BumpstopRangeFronts => new SetupIntRange(0, 22, 1);
- public SetupIntRange BumpstopRangeRears => new SetupIntRange(0, 68, 1);
- }
-
- private class AeroSetupChanger : IAeroSetupChanger
- {
- public SetupIntRange RideHeightFront => new SetupIntRange(55, 80, 1);
- public SetupIntRange RideHeightRear => new SetupIntRange(55, 90, 1);
- public SetupIntRange BrakeDucts => BrakeDuctsGT3;
- public SetupIntRange Splitter => new SetupIntRange(0, 0, 1);
- public SetupIntRange RearWing => new SetupIntRange(0, 10, 1);
- }
-
- private class DamperSetupChanger : IDamperSetupChanger
- {
- public SetupIntRange BumpSlow => new SetupIntRange(0, 40, 1);
- public SetupIntRange BumpFast => new SetupIntRange(0, 49, 1);
- public SetupIntRange ReboundSlow => BumpSlow;
- public SetupIntRange ReboundFast => BumpFast;
- }
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return 0 + rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return 0 + rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(57 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(14d + rawValue, 2);
- }
-
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return wheelRateFronts[rawValue[(int)wheel]];
- case Position.Rear: return wheelRateRears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 55 + rawValue[0];
- case Position.Rear: return 55 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/AMRV8VantageGT3.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/AMRV8VantageGT3.cs
deleted file mode 100644
index 293921de3..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/AMRV8VantageGT3.cs
+++ /dev/null
@@ -1,194 +0,0 @@
-using RaceElement.Data.SetupRanges;
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class AMRV8VantageGT3 : ICarSetupConversion, ISetupChanger
- {
- public CarModels CarModel => CarModels.Aston_Martin_V8_Vantage_GT3_2019;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- private static readonly double[] casters = new double[] { 10.7, 10.9, 11.1, 11.3, 11.5, 11.6, 11.8, 12.0, 12.2, 12.4, 12.5, 12.7, 12.9, 13.1, 13.3, 13.4,
- 13.6, 13.8, 14.0, 14.2, 14.3, 14.5, 14.7, 14.9, 15.0, 15.2, 15.4, 15.6, 15.7, 15.9, 16.1 };
- private static readonly int[] wheelRateFronts = new int[] { 115000, 125000, 135000, 145000, 155000, 165000, 175000, 185000 };
- private static readonly int[] wheelRateRears = new int[] { 105000, 115000, 125000, 135000, 145000, 155000, 165000, 175000, 185000, 195000 };
-
- ITyreSetupChanger ISetupChanger.TyreSetupChanger => new TyreSetupChanger();
- IElectronicsSetupChanger ISetupChanger.ElectronicsSetupChanger => new ElectronicsSetupChanger();
- IMechanicalSetupChanger ISetupChanger.MechanicalSetupChanger => new MechSetupChanger();
- IAeroSetupChanger ISetupChanger.AeroSetupChanger => new AeroSetupChanger();
- IDamperSetupChanger ISetupChanger.DamperSetupChanger => new DamperSetupChanger();
-
- private class TyreSetupChanger : ITyreSetupChanger
- {
- public SetupDoubleRange TyrePressures => TyrePressuresGT3;
- public SetupDoubleRange CamberFront => CamberFrontGT3;
- public SetupDoubleRange CamberRear => CamberRearGT3;
- public SetupDoubleRange ToeFront => new SetupDoubleRange(-0.4, 0.4, 0.01);
- public SetupDoubleRange ToeRear => ToeFront;
- public SetupDoubleRange Caster => new SetupDoubleRange(casters);
- }
-
- private class ElectronicsSetupChanger : IElectronicsSetupChanger
- {
- public SetupIntRange TractionControl => new SetupIntRange(0, 8, 1);
- public SetupIntRange ABS => new SetupIntRange(0, 8, 1);
- public SetupIntRange EcuMap => new SetupIntRange(1, 8, 1);
- public SetupIntRange TractionControlCut => new SetupIntRange(0, 8, 1);
- }
-
- private class MechSetupChanger : IMechanicalSetupChanger
- {
- public SetupIntRange AntiRollBarFront => new SetupIntRange(0, 8, 1);
- public SetupIntRange AntiRollBarRear => AntiRollBarFront;
- public SetupDoubleRange BrakeBias => new SetupDoubleRange(57.0, 78.0, 0.2);
- public SetupIntRange PreloadDifferential => new SetupIntRange(20, 300, 10);
- public SetupIntRange BrakePower => new SetupIntRange(80, 100, 1);
- public SetupDoubleRange SteeringRatio => new SetupDoubleRange(14, 18, 1);
- public SetupIntRange WheelRateFronts => new SetupIntRange(wheelRateFronts);
- public SetupIntRange WheelRateRears => new SetupIntRange(wheelRateRears);
- public SetupIntRange BumpstopRate => new SetupIntRange(300, 2500, 100);
- public SetupIntRange BumpstopRangeFronts => new SetupIntRange(0, 23, 1);
- public SetupIntRange BumpstopRangeRears => new SetupIntRange(0, 68, 1);
- }
-
- private class AeroSetupChanger : IAeroSetupChanger
- {
- public SetupIntRange RideHeightFront => new SetupIntRange(55, 80, 1);
- public SetupIntRange RideHeightRear => new SetupIntRange(55, 90, 1);
- public SetupIntRange BrakeDucts => BrakeDuctsGT3;
- public SetupIntRange Splitter => new SetupIntRange(0, 0, 1);
- public SetupIntRange RearWing => new SetupIntRange(0, 10, 1);
- }
-
- private class DamperSetupChanger : IDamperSetupChanger
- {
- public SetupIntRange BumpSlow => new SetupIntRange(0, 40, 1);
- public SetupIntRange BumpFast => new SetupIntRange(0, 49, 1);
- public SetupIntRange ReboundSlow => BumpSlow;
- public SetupIntRange ReboundFast => BumpFast;
- }
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] {
- 10.7, 10.9, 11.1, 11.3, 11.5, 11.6, 11.8, 12.0, 12.2, 12.4, 12.5, 12.7, 12.9, 13.1, 13.3, 13.4,
- 13.6, 13.8, 14.0, 14.2, 14.3, 14.5, 14.7, 14.9, 15.0, 15.2, 15.4, 15.6, 15.7, 15.9, 16.1
- };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return 0 + rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return 0 + rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(57 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(14d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 115000, 125000, 135000, 145000, 155000, 165000, 175000, 185000 };
- private readonly int[] rears = new int[] { 105000, 115000, 125000, 135000, 145000, 155000, 165000, 175000, 185000, 195000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
-
-
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 55 + rawValue[0];
- case Position.Rear: return 55 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/AudiR8LMS.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/AudiR8LMS.cs
deleted file mode 100644
index 3a8ad3c1c..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/AudiR8LMS.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class AudiR8LMS : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Audi_R8_LMS_2015;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 8.8, 9.1, 9.3, 9.6, 9.8, 10.0, 10.3, 10.5, 10.8, 11.0, 11.2,
- 11.5, 11.7, 11.9, 12.2, 12.4, 12.6, 12.9, 13.1, 13.3, 13.6, 13.8, 14.0, 14.3, 14.5, 14.7,
- 15.0, 15.2, 15.4, 15.7, 15.9, 16.1, 16.3, 16.6, 16.8 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return 0 + rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return 0 + rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(50 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(12d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 112000, 132000, 153000, 174000, 185000, 195000 };
- private readonly int[] rears = new int[] { 124000, 144000, 163000, 173000, 183000, 202000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 54 + rawValue[0];
- case Position.Rear: return 54 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/AudiR8LMSevo.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/AudiR8LMSevo.cs
deleted file mode 100644
index 8d7e1ca87..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/AudiR8LMSevo.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class AudiR8LMSevo : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Audi_R8_LMS_Evo_2019;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 8.8, 9.1, 9.3, 9.6, 9.8, 10.0, 10.3, 10.5, 10.8, 11.0, 11.2,
- 11.5, 11.7, 11.9, 12.2, 12.4, 12.6, 12.9, 13.1, 13.3, 13.6, 13.8, 14.0, 14.3, 14.5, 14.7,
- 15.0, 15.2, 15.4, 15.7, 15.9, 16.1, 16.3, 16.6, 16.8 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return 0 + rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return 0 + rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(50 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(12d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 112000, 132000, 153000, 174000, 185000, 195000 };
- private readonly int[] rears = new int[] { 124000, 144000, 163000, 173000, 183000, 202000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 54 + rawValue[0];
- case Position.Rear: return 54 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/AudiR8LMSevoII.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/AudiR8LMSevoII.cs
deleted file mode 100644
index 8ef8a796a..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/AudiR8LMSevoII.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class AudiR8LMSevoII : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Audi_R8_LMS_Evo_II_2022;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 8.8, 9.1, 9.3, 9.6, 9.8, 10.0, 10.3, 10.5, 10.8, 11.0, 11.2,
- 11.5, 11.7, 11.9, 12.2, 12.4, 12.6, 12.9, 13.1, 13.3, 13.6, 13.8, 14.0, 14.3, 14.5, 14.7,
- 15.0, 15.2, 15.4, 15.7, 15.9, 16.1, 16.3, 16.6, 16.8 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return 0 + rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return 0 + rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(50 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(12d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 112000, 132000, 153000, 174000, 185000, 195000 };
- private readonly int[] rears = new int[] { 124000, 144000, 163000, 173000, 183000, 202000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 54 + rawValue[0];
- case Position.Rear: return 54 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/BentleyContinentalGT3_2015.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/BentleyContinentalGT3_2015.cs
deleted file mode 100644
index 998e3294d..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/BentleyContinentalGT3_2015.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class BentleyContinentalGT3_2015 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Bentley_Continental_GT3_2015;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 8.3, 8.5, 8.8, 9.0, 9.2, 9.5, 9.7, 10.0,
- 10.2, 10.5, 10.7, 10.9, 11.2, 11.4, 11.7, 11.9, 12.1, 12.4, 12.6, 12.9, 13.1, 13.3, 13.6,
- 13.8, 14.0, 14.3, 14.5, 14.8, 15.0, 15.2, 15.5 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(57 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 115000, 120000, 125000, 130000,
- 135000, 140000, 145000, 150000, 155000, 160000, 165000, 170000, 175000,
- 180000, 185000 };
- private readonly int[] rears = new int[] { 95000, 100000, 105000, 110000, 115000,
- 120000,125000, 130000, 135000, 140000, 145000, 150000, 155000, 160000, 165000, 170000,
- 175000, 180000, 185000, 190000, 195000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 54 + rawValue[0];
- case Position.Rear: return 54 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/BentleyContinentalGT3_2018.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/BentleyContinentalGT3_2018.cs
deleted file mode 100644
index d62a60240..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/BentleyContinentalGT3_2018.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class BentleyContinentalGT3_2018 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Bentley_Continental_GT3_2018;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 8.3, 8.5, 8.8, 9.0, 9.2, 9.5, 9.7, 10.0,
- 10.2, 10.5, 10.7, 10.9, 11.2, 11.4, 11.7, 11.9, 12.1, 12.4, 12.6, 12.9, 13.1, 13.3, 13.6,
- 13.8, 14.0, 14.3, 14.5, 14.8, 15.0, 15.2, 15.5 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(57 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 115000, 120000, 125000, 130000,
- 135000, 140000, 145000, 150000, 155000, 160000, 165000, 170000, 175000,
- 180000, 185000 };
- private readonly int[] rears = new int[] { 95000, 100000, 105000, 110000, 115000,
- 120000,125000, 130000, 135000, 140000, 145000, 150000, 155000, 160000, 165000, 170000,
- 175000, 180000, 185000, 190000, 195000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 54 + rawValue[0];
- case Position.Rear: return 54 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/BmwM4GT3.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/BmwM4GT3.cs
deleted file mode 100644
index 7c97523f1..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/BmwM4GT3.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class BmwM4GT3 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.BMW_M4_GT3_2021;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 6.1, 6.3, 6.5, 6.7, 6.9,
- 7.1, 7.3, 7.5, 7.7, 7.9, 8.1, 8.3, 8.5, 8.7, 8.9, 9.1, 9.3, 9.5,
- 9.7, 9.9, 10.1, 10.3, 10.4, 10.6, 10.8, 11.0, 11.2, 11.4, 11.6, 11.8,
- 12.0, 12.2, 12.4, 12.6, 12.8, 13.0, 13.2, 13.4, 13.6, 13.7, 13.9 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.2 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(0.0 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(48.5 + 0.3 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 200 + 50 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 105000, 120000, 135000, 150000, 165000, 180000 };
- private readonly int[] rears = new int[] { 90000, 105000, 120000, 135000, 150000, 165000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 50 + rawValue[0];
- case Position.Rear: return 50 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/BmwM6GT3_2017.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/BmwM6GT3_2017.cs
deleted file mode 100644
index fbc9ce930..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/BmwM6GT3_2017.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class BmwM6GT3_2017 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.BMW_M6_GT3_2017;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 6.7, 6.9, 7.1, 7.4, 7.6, 7.8, 8.0,
- 8.2, 8.4, 8.6, 8.8, 9.0, 9.2, 9.4, 9.7, 9.9, 10.1, 10.3, 10.5, 10.7, 10.9, 11.1,
- 11.3, 11.5, 11.7, 11.9, 12.1, 12.3, 12.5, 12.7, 12.9, 13.1, 13.3, 13.5, 13.7,
- 13.9, 14.2, 14.4, 14.6, 14.8, 15.0, };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.2 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(0.0 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(47.5 + 0.3 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 136000, 146000, 156000, 166000, 176000, 186000 };
- private readonly int[] rears = new int[] { 96000, 106000, 116000, 126000, 136000, 146000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 52 + rawValue[0];
- case Position.Rear: return 52 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/Ferrari488GT3.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/Ferrari488GT3.cs
deleted file mode 100644
index 6d6fca129..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/Ferrari488GT3.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class Ferrari488GT3 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Ferrari_488_GT3_2018;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 5.0, 5.1, 5.3, 5.5, 5.6,
- 5.8, 6.0, 6.1, 6.3, 6.5, 6.6, 6.8, 7.0, 7.1, 7.3, 7.5, 7.6, 7.8,
- 8.0, 8.1, 8.3, 8.5, 8.6, 8.8, 9.0, 9.1, 9.3, 9.5, 9.6, 9.8, 9.9,
- 10.1, 10.3, 10.4, 10.6, 10.8, 10.9, 11.1, 11.2, 11.4, 11.6, 11.7, 11.9,
- 12.1, 12.2, 12.4, 12.5, 12.7, 12.9, 13.0, 13.2, 13.3, 13.5, 13.7, 13.8,
- 14.0, 14.1, 14.3, 14.4, 14.6, 14.8, 14.9, 15.1, 15.2, 15.4, 15.5, 15.7,
- 15.9, 16.0, 16.2, 16.3, 16.5, 16.6, 16.8, 16.9, 17.1, 17.3, 17.4, 17.6,
- 17.7, 17.9, 18.0, 18.2, 18.3, 18.5, 18.6, 18.8, 18.9, 19.1, 19.2, 19.4,
- 19.5, 19.7, 19.8, 20.0, 20.1, 20.3, 20.4, 20.6 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
-
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(47.0 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 94000, 101000, 107000, 113000, 120000, 126000, 138600, 151000, 163800, 176000, 189000 };
- private readonly int[] rears = new int[] { 106000, 113000, 120000, 127000, 134000, 141000, 155000, 169500, 183600, 198000, 212000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 55 + rawValue[0];
- case Position.Rear: return 55 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/Ferrari488GT3evo.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/Ferrari488GT3evo.cs
deleted file mode 100644
index f9ea60d34..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/Ferrari488GT3evo.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class Ferrari488GT3evo : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Ferrari_488_GT3_Evo_2020;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 5.0, 5.1, 5.3, 5.5, 5.6,
- 5.8, 6.0, 6.1, 6.3, 6.5, 6.6, 6.8, 7.0, 7.1, 7.3, 7.5, 7.6, 7.8,
- 8.0, 8.1, 8.3, 8.5, 8.6, 8.8, 9.0, 9.1, 9.3, 9.5, 9.6, 9.8, 9.9,
- 10.1, 10.3, 10.4, 10.6, 10.8, 10.9, 11.1, 11.2, 11.4, 11.6, 11.7, 11.9,
- 12.1, 12.2, 12.4, 12.5, 12.7, 12.9, 13.0, 13.2, 13.3, 13.5, 13.7, 13.8,
- 14.0, 14.1, 14.3, 14.4, 14.6, 14.8, 14.9, 15.1, 15.2, 15.4, 15.5, 15.7,
- 15.9, 16.0, 16.2, 16.3, 16.5, 16.6, 16.8, 16.9, 17.1, 17.3, 17.4, 17.6,
- 17.7, 17.9, 18.0, 18.2, 18.3, 18.5, 18.6, 18.8, 18.9, 19.1, 19.2, 19.4,
- 19.5, 19.7, 19.8, 20.0, 20.1, 20.3, 20.4, 20.6 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
-
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(47.0 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 94000, 101000, 107000, 113000, 120000, 126000, 138600, 151000, 163800, 176000, 189000 };
- private readonly int[] rears = new int[] { 106000, 113000, 120000, 127000, 134000, 141000, 155000, 169500, 183600, 198000, 212000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 55 + rawValue[0];
- case Position.Rear: return 55 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/HondaNsxGT3.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/HondaNsxGT3.cs
deleted file mode 100644
index 7a6b5c5c9..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/HondaNsxGT3.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class HondaNsxGT3 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Honda_NSX_GT3_2017;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 8.8, 9.0, 9.2, 9.4, 9.6, 9.8, 10.0, 10.2, 10.4, 10.6,
- 10.8, 10.9, 11.1, 11.3, 11.5, 11.7, 11.9, 12.1, 12.3, 12.4, 12.6, 12.8, 13.0, 13.2,
- 13.4, 13.6, 13.8, 13.9, 14.1, 14.3, 14.5, 14.7, 14.9, 15.0, 15.2 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(50 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 115000, 124000, 133000, 142000, 151000,
- 160000, 169000, 178000, 187000, 196000 };
- private readonly int[] rears = new int[] { 115000, 124000, 133000, 142000, 151000,
- 160000, 169000, 178000, 187000, 196000, 205000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 54 + rawValue[0];
- case Position.Rear: return 54 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/HondaNsxGT3Evo.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/HondaNsxGT3Evo.cs
deleted file mode 100644
index bcd27ed1e..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/HondaNsxGT3Evo.cs
+++ /dev/null
@@ -1,132 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class HondaNsxGT3Evo : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Honda_NSX_GT3_Evo_2019;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 7.2, 7.4, 7.6, 7.8, 8.0, 8.2, 8.4, 8.6, 8.8, 8.9, 9.1 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return 1 + rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return 1 + rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(44 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 200 + 50 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
-
- private readonly int[] fronts = new int[] { 73000, 79080, 85160, 91240,
- 97320, 103400, 109480, 115560, 121640, 127720, 133800, 139880, 145960,
- 152040, 158120, 164200, 170280 };
- private readonly int[] rears = new int[] { 126800, 134700, 142600, 150500,
- 158400, 166300, 174200, 182100, 190000, 197900, 205800, 213700,
- 221600, 229500, 237400, 245300, 253200 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue + 1;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 54 + rawValue[0];
- case Position.Rear: return 54 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/JaguarG3GT3.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/JaguarG3GT3.cs
deleted file mode 100644
index 5abeed079..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/JaguarG3GT3.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class JaguarG3GT3 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Emil_Frey_Jaguar_G3_2021;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 4.0, 4.1, 4.3, 4.5, 4.7, 4.9, 5.1,
- 5.3, 5.5, 5.6, 5.8, 6.0, 6.2, 6.4, 6.6, 6.8, 6.9, 7.1, 7.3, 7.5, 7.7, 7.9, 8.0,
- 8.2, 8.4, 8.6, 8.8, 9.0, 9.1, 9.3, 9.5, 9.7, 9.9, 10.1, 10.2, 10.4, 10.6, 10.8,
- 11.0, 11.2, 11.3 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(57 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 100000, 105000, 110000, 115000, 120000, 125000,
- 130000, 135000, 140000, 145000, 150000, 155000, 160000, 165000, 170000, 175000, 180000,
- 185000 };
- private readonly int[] rears = new int[] { 120000, 125000, 130000, 135000, 140000, 145000,
- 150000, 155000, 160000, 165000, 170000, 175000, 180000, 185000, 190000, 195000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 60 + rawValue[0];
- case Position.Rear: return 60 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/LamborghiniGallardoG3Reiter_2017.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/LamborghiniGallardoG3Reiter_2017.cs
deleted file mode 100644
index 5d3d52ba6..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/LamborghiniGallardoG3Reiter_2017.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class LamborghiniGallardoG3Reiter_2017 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Lamborghini_Gallardo_G3_Reiter_2017;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 4.9, 5.1, 5.3, 5.5, 5.8, 6.0, 6.2,
- 6.4, 6.6, 6.8, 7.0, 7.2, 7.4, 7.6, 7.9, 8.1, 8.3, 8.5, 8.7, 8.9, 9.1, 9.3, 9.5,
- 9.7, 9.9, 10.1, 10.3, 10.6, 10.8, 11.0, 11.2, 11.4, 11.6, 11.8, 12.0 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(50 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 121000, 126000, 131000, 136000,
- 141000, 146000, 151000, 156000, 161000, 166000, 171000, 176000, 181000,
- 186000, 191000, 196000, 201000, 206000, 211000 };
- private readonly int[] rears = new int[] { 117000, 122000, 127000, 132000,
- 137000, 142000, 147000, 152000, 157000, 162000, 167000, 172000, 177000,
- 182000, 187000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 54 + rawValue[0];
- case Position.Rear: return 54 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/LamborghiniHuracanGT3.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/LamborghiniHuracanGT3.cs
deleted file mode 100644
index 1e23b1af7..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/LamborghiniHuracanGT3.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class LamborghiniHuracanGT3 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Lamborghini_Huracan_GT3_2015;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 6.2, 6.5, 6.7, 7.0, 7.3, 7.5, 7.8, 8.1,
- 8.3, 8.6, 8.9, 9.1, 9.4, 9.6, 9.9, 10.2, 10.4, 10.7, 10.9, 11.2, 11.5, 11.7, 12.0, 12.2,
- 12.5, 12.8, 13.0, 13.3, 13.5, 13.8, 14.0, 14.3, 14.5, 14.8, 15.0 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(50 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 121000, 144000, 167000, 190000, 201000, 212000 };
- private readonly int[] rears = new int[] { 117000, 136000, 154000, 164000, 173000, 191000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 54 + rawValue[0];
- case Position.Rear: return 54 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/LamborghiniHuracanGT3evo.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/LamborghiniHuracanGT3evo.cs
deleted file mode 100644
index 6d72e803e..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/LamborghiniHuracanGT3evo.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class LamborghiniHuracanGT3evo : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Lamborghini_Huracan_GT3_Evo_2019;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 6.2, 6.5, 6.7, 7.0, 7.3, 7.5, 7.8, 8.1,
- 8.3, 8.6, 8.9, 9.1, 9.4, 9.6, 9.9, 10.2, 10.4, 10.7, 10.9, 11.2, 11.5, 11.7, 12.0, 12.2,
- 12.5, 12.8, 13.0, 13.3, 13.5, 13.8, 14.0, 14.3, 14.5, 14.8, 15.0 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(50 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(10d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 121000, 144000, 167000, 190000, 201000, 212000 };
- private readonly int[] rears = new int[] { 117000, 136000, 154000, 164000, 173000, 191000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 54 + rawValue[0];
- case Position.Rear: return 54 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/LexusRcfGT3.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/LexusRcfGT3.cs
deleted file mode 100644
index f1e50d392..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/LexusRcfGT3.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class LexusRcfGT3 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Lexus_RCF_GT3_2016;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
-
- private readonly double[] casters = new double[] { 7.9, 8.1, 8.3, 8.5, 8.7, 8.8, 9.0, 9.2,
- 9.4, 9.6, 9.8, 10.0, 10.2, 10.4, 10.6, 10.8, 10.9, 11.1, 11.3, 11.5, 11.7, 11.9, 12.1,
- 12.3, 12.5, 12.6, 12.8, 13.0, 13.2, 13.4, 13.6 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(50 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(11d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 96000, 115000, 134000, 154000, 173000, 192000 };
- private readonly int[] rears = new int[] { 87000, 112000, 136000, 154000, 175000, 210000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue + 1;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 50 + rawValue[0];
- case Position.Rear: return 65 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue + 1;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/Mclaren650sGT3_2015.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/Mclaren650sGT3_2015.cs
deleted file mode 100644
index 7d1c1ed90..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/Mclaren650sGT3_2015.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class Mclaren650sGT3_2015 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.McLaren_650S_GT3_2015;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 5.3, 5.6, 5.8, 6.0, 6.3, 6.5,
- 6.8, 7.0, 7.3, 7.5, 7.8, 8.0, 8.2, 8.5, 8.7, 9.0, 9.2, 9.4, 9.7, 9.9, 10.2,
- 10.4, 10.7, 10.9, 11.1, 11.4, 11.6, 11.8, 12.1, 12.3, 12.6, 12.8, 13.0, 13.3,
- 13.5, 13.7, 14.0, 14.2, 14.4, 14.7, 14.9};
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-0.4 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(47 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(11d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 126000, 136000, 146000, 156000, 166000, 176000 };
- private readonly int[] rears = new int[] { 126000, 136000, 146000, 156000, 166000, 176000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue + 1;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 56 + rawValue[0];
- case Position.Rear: return 56 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/Mclaren720sGT3.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/Mclaren720sGT3.cs
deleted file mode 100644
index be2d47885..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/Mclaren720sGT3.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class Mclaren720sGT3 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.McLaren_720S_GT3_2019;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 5.3, 5.6, 5.8, 6.0, 6.3, 6.5, 6.8, 7.0, 7.3, 7.5, 7.8, 8.0 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.48 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-0.1 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(47 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(11d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 118000, 134000, 150000, 166000, 182000, 198000, 214000, 230000 };
- private readonly int[] rears = new int[] { 114000, 128000, 142000, 156000, 170000, 184000, 198000, 212000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue + 1;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 50 + rawValue[0];
- case Position.Rear: return 64 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
-
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/MercedesAMGGT3_2015.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/MercedesAMGGT3_2015.cs
deleted file mode 100644
index d0a9e3353..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/MercedesAMGGT3_2015.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class MercedesAMGGT3_2015 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Mercedes_AMG_GT3_2015;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 6.0, 6.2, 6.4, 6.6, 6.7, 6.9, 7.1, 7.3, 7.5,
- 7.7, 7.9, 8.1, 8.2, 8.4, 8.6, 8.8, 9.0, 9.2, 9.4, 9.5, 9.7, 9.9, 10.1, 10.3, 10.5,
- 10.7, 10.8, 11.0, 11.2, 11.4, 11.6, 11.8, 11.9, 12.1, 12.3, 12.5, 12.7, 12.8, 13.0,
- 13.2, 13.4, 13.6, 13.7, 13.9, 14.1 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(50 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(11d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 130000, 143000, 155000, 171000, 187000, 202000 };
- private readonly int[] rears = new int[] { 71000, 83000, 95000, 107000, 119000, 131000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue + 1;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 42 + rawValue[0];
- case Position.Rear: return 67 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue + 1;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/MercedesAMGGT3evo.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/MercedesAMGGT3evo.cs
deleted file mode 100644
index 4075db91d..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/MercedesAMGGT3evo.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class MercedesAMGGT3evo : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Mercedes_AMG_GT3_Evo_2020;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
- private readonly double[] casters = new double[] { 6.0, 6.2, 6.4, 6.6, 6.7, 6.9, 7.1, 7.3, 7.5,
- 7.7, 7.9, 8.1, 8.2, 8.4, 8.6, 8.8, 9.0, 9.2, 9.4, 9.5, 9.7, 9.9, 10.1, 10.3, 10.5,
- 10.7, 10.8, 11.0, 11.2, 11.4, 11.6, 11.8, 11.9, 12.1, 12.3, 12.5, 12.7, 12.8, 13.0,
- 13.2, 13.4, 13.6, 13.7, 13.9, 14.1 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
- return Math.Round(-0.4 + 0.01 * rawValue[(int)wheel], 2);
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(50 + 0.2 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(11d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 130000, 143000, 155000, 171000, 187000, 202000 };
- private readonly int[] rears = new int[] { 71000, 83000, 95000, 107000, 119000, 131000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue + 1;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 42 + rawValue[0];
- case Position.Rear: return 67 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue + 1;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/NissanGtrGT3_2015.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/NissanGtrGT3_2015.cs
deleted file mode 100644
index 62781305c..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/NissanGtrGT3_2015.cs
+++ /dev/null
@@ -1,139 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class NissanGtrGT3_2015 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Nissan_GT_R_Nismo_GT3_2015;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
-
- private readonly double[] casters = new double[] { 6.0, 6.2, 6.4, 6.6, 6.8, 7.0, 7.2,
- 7.3, 7.5, 7.7, 7.9, 8.1, 8.3, 8.5, 8.7, 8.9, 9.1, 9.3, 9.5, 9.7, 9.8, 10.0, 10.2,
- 10.4, 10.6, 10.8, 11.0, 11.2, 11.4, 11.6, 11.7, 11.9, 12.1, 12.3, 12.5, 12.7, 12.9,
- 13.1, 13.2, 13.4, 13.6, 13.8, 14.0, 14.2, 14.4, 14.5, 14.7, 14.9, 15.1, 15.3, 15.5,
- 15.6, 15.8, 16.0, 16.2, 16.4, 16.5, 16.7, 16.9, 17.1, 17.3 };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.2 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(0.0 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(47.5 + 0.3 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(12d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 122000, 132000, 142000, 152000, 162000, 172000, 182000 };
- private readonly int[] rears = new int[] { 94000, 104000, 114000, 124000, 134000, 144000, 154000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List rawValue, Position position)
- {
- switch (position)
- {
- case Position.Front: return 55 + rawValue[0];
- case Position.Rear: return 55 + rawValue[2];
- default: return -1;
- }
- }
-
- public int Splitter(int rawValue)
- {
- return rawValue;
- }
- }
- }
-}
diff --git a/Race_Element.Data.ACC/SetupParser/Cars/GT3/NissanGtrGT3_2018.cs b/Race_Element.Data.ACC/SetupParser/Cars/GT3/NissanGtrGT3_2018.cs
deleted file mode 100644
index 0de8ecfd4..000000000
--- a/Race_Element.Data.ACC/SetupParser/Cars/GT3/NissanGtrGT3_2018.cs
+++ /dev/null
@@ -1,138 +0,0 @@
-using System;
-using System.Collections.Generic;
-using static RaceElement.Data.ConversionFactory;
-using static RaceElement.Data.SetupConverter;
-
-namespace RaceElement.Data.Cars.GT3
-{
- internal class NissanGtrGT3_2018 : ICarSetupConversion
- {
- public CarModels CarModel => CarModels.Nissan_GT_R_Nismo_GT3_2018;
-
- CarClasses ICarSetupConversion.CarClass => CarClasses.GT3;
- public DryTyreCompounds DryTyreCompound => DryTyreCompounds.DHE2020;
-
- AbstractTyresSetup ICarSetupConversion.TyresSetup => new TyreSetup();
- private class TyreSetup : AbstractTyresSetup
- {
- public override double Camber(Wheel wheel, List rawValue)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-4 + 0.1 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(-3.5 + 0.1 * rawValue[(int)wheel], 2);
- default: return -1;
- }
- }
-
-
- private readonly double[] casters = new double[] { 12.5, 12.6, 12.8, 13.0, 13.2, 13.4, 13.6,
- 13.8, 13.9, 14.1, 14.3, 14.5, 14.7, 14.9, 15.0, 15.2, 15.4, 15.6, 15.8, 16.0, 16.1, 16.3,
- 16.5, 16.7, 16.9, 17.0, 17.2, 17.4, 17.6, 17.8, 17.9, 18.1, 18.3, 18.5, 18.6, 18.8, 19.0,
- 19.2, 19.3, 19.5, 19.7, };
- public override double Caster(int rawValue)
- {
- return Math.Round(casters[rawValue], 2);
- }
-
- public override double Toe(Wheel wheel, List rawValue)
- {
-
- switch (GetPosition(wheel))
- {
- case Position.Front: return Math.Round(-0.2 + 0.01 * rawValue[(int)wheel], 2);
- case Position.Rear: return Math.Round(0.0 + 0.01 * rawValue[(int)wheel], 2);
- default: return -1;
- }
-
- }
- }
-
- IMechanicalSetup ICarSetupConversion.MechanicalSetup => new MechSetup();
- private class MechSetup : IMechanicalSetup
- {
- public int AntiRollBarFront(int rawValue)
- {
- return rawValue;
- }
-
- public int AntiRollBarRear(int rawValue)
- {
- return rawValue;
- }
-
- public double BrakeBias(int rawValue)
- {
- return Math.Round(47.5 + 0.3 * rawValue, 2);
- }
-
- public int BrakePower(int rawValue)
- {
- return 80 + rawValue;
- }
-
- public int BumpstopRange(List rawValue, Wheel wheel)
- {
- return rawValue[(int)wheel];
- }
-
- public int BumpstopRate(List rawValue, Wheel wheel)
- {
- return 300 + 100 * rawValue[(int)wheel];
- }
-
- public int PreloadDifferential(int rawValue)
- {
- return 20 + rawValue * 10;
- }
-
- public double SteeringRatio(int rawValue)
- {
- return Math.Round(12d + rawValue, 2);
- }
-
- private readonly int[] fronts = new int[] { 136000, 146000, 156000, 166000, 176000, 186000 };
- private readonly int[] rears = new int[] { 96000, 106000, 116000, 126000, 136000, 146000 };
- public int WheelRate(List rawValue, Wheel wheel)
- {
- switch (GetPosition(wheel))
- {
- case Position.Front: return fronts[rawValue[(int)wheel]];
- case Position.Rear: return rears[rawValue[(int)wheel]];
- default: return -1;
- }
- }
- }
-
- IDamperSetup ICarSetupConversion.DamperSetup => DefaultDamperSetup;
-
- IAeroBalance ICarSetupConversion.AeroBalance => new AeroSetup();
- private class AeroSetup : IAeroBalance
- {
- public int BrakeDucts(int rawValue)
- {
- return rawValue;
- }
-
- public int RearWing(int rawValue)
- {
- return rawValue;
- }
-
- public int RideHeight(List