• Welcome to PiBoSo Official Forum. Please login or sign up.
 
April 19, 2024, 10:51:37 PM

News:

GP Bikes beta21c available! :)


Lap beacon to plugin ?

Started by HornetMaX, March 29, 2014, 02:22:46 PM

Previous topic - Next topic

HornetMaX

March 29, 2014, 02:22:46 PM Last Edit: March 29, 2014, 08:38:36 PM by HornetMaX
Hi Piboso,

I'm working on a telemetry software for GPB/WRS. The GUI part is mostly nailed: initially I went with wxWidgets but after a while I realized that the features I needed in terms of plotting graphs were simply not available and creating them would be too much for me. So I switched to Qt where a nice plotting package (QCustomPlot) seems just OK for my needs.

One thing is bothering me though: an output plugin is in charge to dump the telemetry data. That's not hard, except trying to slice all the data into laps.
The hard part is to slice in the same way as GPB/WRS do it, i.e. in such a way that the lap times recorded by GPB/WRS do match the ones in the telemetry data.

I've seen in the output of GPB default telemetry plugin that there's a bit of information that I do not have in the plugin interface: the beacon markers.

"Beacon Markers","106.444, 183.347, 268.056, 347.946, 485.568, 567.314"

These indicate the exact time at which a finish line crossing was recorded by GPB/WRS, leading to a lap being completed.

Is there a way to obtain this info ?

Because if I have to compute it from the telemetry data it's a bit of a mess: detection of finish line crossing can't be done properly without the finish line end points, some logic has to be implemented to handle multiple crossings in case of fall, etc...

MaX.

P.S.
Bonus question: how many splits are we supposed to have on a GPB/WRS track ? I was under the impression we had 3 splits for GPB and 2 for WRS (leading to 3 4 sectors for GPB and 3 for WRS), but I think I've seen a GPB track with only 3 sectors ... is this number fixed or not ?

PiBoSo

To calculate beacon markers, a good estimate ( used in the default telemetry plugin ) is:
1) check if _fPos of the current frame is slightly above 0, while it was close to 1 in the previous frame. This means the vehicle crossed the start / finish line
2) calculate the frame split
3) add it to _fTime of the previous frame to get the beacon marker

GPB tracks MUST have at least 3 splits, and WRS at least 2.
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

HornetMaX

Quote from: PiBoSo on March 29, 2014, 07:24:43 PM
To calculate beacon markers, a good estimate ( used in the default telemetry plugin ) is:

Thanks, that's what I use too. But in GPB one can cross the line while crashed and then re-cross it again a few seconds after (as GPB sends you back where the crash started).
This is a bit messy to handle properly.

MaX.

HornetMaX

Quote from: PiBoSo on March 29, 2014, 07:24:43 PM
GPB tracks MUST have at least 3 splits, and WRS at least 2.

Would probably be a good thing if the actual number of splits of a track was added to the "event" data structure in the plugin interface then.

MaX.