Skip to content
  • There are no suggestions because the search field is empty.

Car Data Service

This article explains the configuration of the car data service.

Summary

The car data serivce configuration is used to configure the car data service. Navigating to System -> Agents -> Car Data Service will present a list of all existing configurations.

When editing a configuration the configuration page is shown. It is divided into five tabs:

- Base Configuration:  (typically changed settings between events)

- Channel Map: (define the parameters, aliases and conversions which should be read from car data)

- KPI: (define which KPI should be calculated per parameter)

- Processing Config: (defining the processing pipeline)

- ORH Calculations: (select which calculations should be used by the car data service)

Base Configuration

This page shows the values which need to be changed from event to event:

- Event: Select the current event in the dropdown

- Output File Prefix: Set the prefix of the output .json files

All folders are specified relative to the processing machine which is running the car data service. All folders can be network folders as long as they are reachable from the processing machine.

- Offload Folder: Specify the folder where the car data can be found

- Processed Folder: Specify the folder where the processed data should be saved

- Results Folder: Specify the folder where the result files (e.g. the output .json file) should be saved

Channel Map

The channel map section shows a list of parameters which should be loaded during post-processing. For speed reasons it is advisable to keep this list as small as possible.

Adding a new parameter to this list is done by entering the parameter name into the Add parameter box at the bottom of the page and clicking "Add". Once the parameter is added to the list, aliases can be defined by entering the alias name, a gain and an offset into the respecive input fields and clicking "Add". Please note that an alias needs to be spelled exactly as it is spelled in the data system. For ATLAS it is good practice to not resolve parameters without app name and adding the app to the parameter alias (example vCar:APP1).

KPI

Once a parameter is selected in the channel map, it can be added to the KPI processing. Selecting the parameter from the dropdown at the bottom and clicking "Add" will show the parameter in the KPI list and individual KPI can be selected. The following timebases are available:

- Run: the total run, meaning the full logger file

- Stint: partial of the logger file if a pitstop was detected

- Lap: one lap

The following KPI options are available:

- Min, Max, Mean, StdDev, Median, Start, End, Integral: these metrics are self explanatory

- Standard metrics followed by 0 will calcluate the metric but will exclude 0 values

- Standard metrics followed by Nan will calculate the metric but will exclude Nan values (this is useful for gated channels)

- Diff: End - Start value of a given timebase

Preconditions:

A precondition can be added to exclude files from analysis. A typical example is vCar.Run.Max > 50 which will be excluding all files where the vehicle velocity was not higher than 50 kph (which is a typical value for paddock-to-grid runs). For efficiency reasons diligence on this setting is recommended.

Processing Config

The processing configuration is defining the way the car data service is running. IT contains the following sub-sections

- Event Configuration

- Session Manager Configuration

- Session Types Configuration

- Queue Manager Configuration

- Application Settings Configuration

- Processing Engines Configuration

Event Configuration:

Select the event and the output file prefix as explained in the section "base"

Session Manager Configuration:

Set the offload folder and define the session type which is associated to this offload folder. The car data service can collate as many sources with as many session types as desired.

Session Type Configuration

A session type is the configuration of "how a racecar has been run on track in a session". The configuration defines the data file type(s) and information to be read out of the data file name. ONE RACEHUB uses regular expressions to do this.
The information is required for the system to understand which car is analysed and where the data needs to be pushed to. The minimum required information is:
- Start Number (Contestant)
- Run number (NRun)
without this information the car data service will not be able to identify the correct runs in ONE RACEHUB. Examples of file names and regular expressions are at the bottom of this page.
. Use this button to add a new session type which can be used in the car data service
2. Enter a name
3. This identifies what part of the full file name the car data service is using to apply the regular expression. In most cases this will be 0 to only use the file name itself.
4. Enter the regular expression
5. You can enter a filename here to test what information the regular expression will produce
6. You can use more than one regular expression to gather information. Car-data-service will use them all on each file. Click here to add another one
7. Car-data-service allows for multiple file extensions to be used (example ATLAS has .ssn and .ssv). Please note that all extensions will be opened with the same data API. If you want to use data from different loggers you need to add different session types.
8. Ignore literals are used as part of the filename. In this example any file which has the string "FireUp" in it will not be opened for analysis for efficiency reasons.

Regular Expression Buildup

Let's assume the data file name is called 2024-01-01_TRK_Car09_HAM_Run04.ext. The following will show you how to configure your regular expression.

An easy way to build your regular expression is by starting with
(?<misc>.*)_Run(?<NRun>.*)
This will put the whole file name under "misc" as a variable. The .\* tells the regular expression to use any character. For our example we now have:
misc: 2024-01-01_TRK_Car09_HAM_Run04
We split the run number and change the regular expression to:
(?<misc>.*)_Run(?<NRun>.*)
misc: 2024-01-01_TRK_Car09_HAM

NRun: 4
We split another two variables:
(?<misc>.*)_Car(?<Contestant>.*)_(?<Driver>.*)_Run(?<NRun>.*)
and we get:
misc: 2024-01-01_TRK

Contestant: 09

Driver: HAM

NRun: 4
Assuming our contestant is 09 we have all the information required for the car-data-service to find the runs in ONE RACEHUB.

A special case is WinTax where the data file is always called "cableData.ztx" and the information about the files is stored as folder names in the levels above. This is where the "folder up level" setting is used. Assuming we have:
C:\data\231124_TRK_SES_CAR09_HAM\ASAS_451\Run_01\cableData.ztx
The folder up level will be 3 to use everything after C:\data. The following regular expression can be used:
(?<EventCode>[a-zA-Z0-9]+)_CAR(?<Contestant>[a-zA-Z0-9]+)_(?<Driver>[a-zA-Z0-9]+)\\(?<LoggerInfo>.*)\\Run_(?<NRun>[a-zA-Z0-9]+)
And will result in:
EventCode: 231124_TRK_SES

Contestant: 09

Driver: HAM

LoggerInfo: ASAS_451

NRun: 1
Note the double backslashes denoting a folder level change. They need to be double in order for car-data-service to understand the folder level change.
 

Queue Manager Configuration

Define the name of the analysis queue and the corresponding session types
 

Application Settings Configuration

- Processed Folder: Specify the folder where the processed data should be saved

- Results Folder: Specify the folder where the result files (e.g. the output .json file) should be saved

- Functions Folder: Specify the folder where the calculation functions should be saved

- Runsheet Matching: Specify the method the car data service should be using to find the corresponding runsheets for a given run.

Standard: will use a timestamp approach and will sanitize the runs using a laptime profile

Timestamp: will use a timestamp apporach only

- Driver contestant lookup: Define the mapping between the ONE RACEHUB contestant number and the driver info found in the data file name

If data file names contain the driver name and not the contestant start number, this information can be mapped. Also multiple drivers in the same car can be mapped to the same contestant.

- Pitstop triggers: define the parameter ID, the value and the value type to understand when a pitstop is happening in a given data file

Using FIA loops for Fomula E the parameter should be NLoopID, the value = 42 and the type = value.

For pitstop trigger using the driver button on the steering wheel, the parameter could be BPitstop, the value = 1 and the type = Edge

Processing Engines Configuration

The final step is to define the processing engine configuration. 

- Importers Folder: this should be Importers

- ParameterMapFile: specify the .json file the parameter map will be downloaded to on the processing machine

- InternalCalculationsFolder: this should be Calculations

- UserCalculationsFolder: specify the folder where used defined .dlls can be found to be used in the car data service

- ExportersFolder: this should be Exporters

Configuring the processing engine will combine all the settings to a pipeline which is used to analyse the files.

- Name: a user defined name for the processing engine

- QueueName: select a queue to be used

- Instances: select the amount of cores the processing can use on the processing machine. This depends on the analysis software. Using ATLAS, 2 cores were tested sucessfully, while using Bosch Darab only 1 core was reliably used

- Importer: select the importer the queue should use

- Calculations: add the calculations which should be used during processing

- Exporters: add the exporters which should be used during processing

JSONFILE_EXPORTER: this exporter will save the calculated kpi to the "Results Folder"

ONERACEHUB_EXPORTER: this exporter will save the KPI to ONE RACEHUB

ATLAS_EXPORTER: this exporter will generate an augmented data file (.ssv) with calculated channels

ORH Calculations

Select the calculations which should be used during processing.