PiBoSo Official Forum

GP Bikes => Mods => Plugins => Topic started by: HornetMaX on March 29, 2014, 02:22:46 PM

Title: Lap beacon to plugin ?
Post by: HornetMaX on March 29, 2014, 02:22:46 PM
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 ?
Title: Re: Lap beacon to plugin ?
Post by: PiBoSo on March 29, 2014, 07:24:43 PM
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.
Title: Re: Lap beacon to plugin ?
Post by: HornetMaX on March 29, 2014, 09:01:59 PM
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.
Title: Re: Lap beacon to plugin ?
Post by: HornetMaX on March 29, 2014, 11:23:22 PM
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.