SlotForum banner

1 - 14 of 14 Posts

·
Premium Member
Joined
·
4,882 Posts
I have been thinking about Pace Cars, both the algorithm to keep them on track and, as important, how best to set them up? A train of thought is to use the wireless throttle for the setup. Might go something like this.

1) Select the Practice Screen

2) Set 0 - 0 on the Brake & Curve knobs and then BK, LC & pull throttle (as if to set ID) this then puts the throttle into Pace Car Mode.

3) Now the Brake knob becomes the minimum / start throttle position. So you wind it up / play with it until you are comfortable with the speed you want cars to start at.

4) Next you start winding up the curve control, this then reduces the base Target Lap Time established in step 3. Play with this until you are happy that the car is going to reliably stay on track. Try a deslot / artificial slowing of the car etc to check it's going to be reliable etc.

5) Press the brake button to lock in the settings which will be remembered by Display-Pro.

Display-Pro would then need some code to control the Pace Cars. Any controller port without a wired or wireless throttle connected would automatically output the Pace Car data.

So then the tricky bit, the algorithm that reliably keeps the cars on the target lap time without messing up too often. My gut feeling on this is to be conservative rather than aggressive. A slow pace car is better than a deslotted pace car.

So DP will have been passed three parameters from the setup procedure. A starting throttle position, a consequent base lap time, a target lap time.

So the first bit is easy, the starting throttle position is applied and you wait for a couple of consecutive flying laps within a say 5% of eachother.
If these lap times are within 10% of the base lap time (i.e things are as expected) then an increment is applied to the throttle position.
This is continued until the target lap time is reached, then adjusted up / down as needed.

So thats the easy bit, the tricky bit is coping with things that go wrong. I guess the two most obvious are a deslot or a nudge that artificially speeds up or slows the lap?

A deslot is probably going to add a few seconds to the lap time, so ought to be identifyable. The problem is, was it caused by being nerfed or because the PC tyres are gripping less well?

So I guess the conservative approch is knock the throttle back a couple of notches and then wait for a couple of consecutive laps within 5% of eachother. If ok start incrementing up again, if not notch back another couple. A more conservative approach would be to knock right back to the starting throttle position? Only testing will tell?

The trickier one is coping with the effects of a nerf that might have speeded up or slowed the lap time slightly. I wonder if a simple approch could be taken, that of doing nothing untill two consecutive laps are again seen within 5% of eachother? It is just possible that this simple approch could cope with a lot of eventualities?

So some initial thoughts, please feel free to make suggestions on how you think Pace Cars, either for Display-Pro or generally, might be made to work?

Rich
 

·
Registered
Joined
·
2,879 Posts
I think this post from another thread, ties in with the above ideas in using average laptimes, which seems as good as any to me, and having an option to disable speeding up. One question is over how many laps to do the average. Mr F's suggestion was to allow this to be user-configurable from 2 to 10:

QUOTE (thoefnagel @ 24 May 2012, 15:32) <{POST_SNAPBACK}>If target laptime is 10.0 and a pacer has 20 laps of 10.0 and suddenly has a lap of 8.7 seconds, SSDC can know this is not due to a motor that is warming up. But apparently something else happened like a pile up. In this case a pacer should not speed up.

Maybe a good way is calculate average laptime over a couple of laps (let's say 5).
If the average is 9.2 (not within +/- 5% of target) then the pacer should speed up.
Then calculate average over the next 5 laps. If this is 9.8 then it's ok (because it's within +/-5% of target laptime)
If average is 9.4 now (still not within +/- 5% of target) then the pacer should speed up.

Laps with a track call in it should not be taken into account for average calculation.
Laps outside a reasonable margin from target laptime (laps with laptimes like 8.3) should not be taken into account for average calculation.

This way the pacer correction works more subtly.

Other nice things would be:
- a checkbox to disable speeding up
- a setting for maximum speed up%
 

·
Registered
Joined
·
3,057 Posts
The trick is to use a moving or progressive average where the 5 laps constantly add a new one and drop the oldest one so the adjustments are not sharp but gradual.
Great idea!
Cheers!
 

·
Premium Member
Joined
·
4,882 Posts
This is just a train of thought at the moment. I like to have a new area to think about while working on another, which for a while will be sorting the wireless throttles. Also as with the rest of the Display-Pro project I am trying to both minimise the setup needed, think about the way in which functions are setup, as well as the function itself

I am going to start as simple as possible, so where there are options I will at first just choose one, only having setup where absolutely necessary, then after some feedback from use consider putting the options in.

So yes a lane change or not option will be necessary, probably use the LC button on the controller to toggle it on & off during setup, but initially I will have no lane change.


Rolling 5 lap average could be a good idea or it could end up masking something you should have reacted to? I will first put together the simplest algorithm that might work, so that will probably be looking at the last two laps and if they are within a certain % of eachother then speed up or slow down trying to achieve the Target laptime established during the setup phase.

If the last 2 laps are not within a given % then nothing will be done. If there is greater than another preset % difference, the assume there has been a deslot and back off two counts. Just need to try and aviod any algorithm that resusts in a continual increase or decline when that is not what is required.

I just need a start point for the code that is easily understood, then get testing and work up some improvments based on real use feedback.

Rich
 

·
Registered
Joined
·
462 Posts
Counting the laps that are slower or faster than target laptime +/- x% is the most straightforward option that should give acceptable results I think. An average calculation maybe more complicated but tests should prove what works best. An opion to toggle this functionality on and off would be good. Good luck!
 

·
Registered
Joined
·
331 Posts
Come on Rich, just whip us up some sector timing track parts so the pacers can be super accurate
 

·
Premium Member
Joined
·
4,882 Posts
Yes I think no point in anything other than a target lap time without some sector feedback. It's on the possible list for when I do the Powerbase version of Display-Pro. Could be done as a separate item, would be tempting to pick off the ID signal from all the lane changers as a starter? However probably an easier install if it was separate ID detectors that could be put at strategic points round the track?

However this is a don't hold your breath item.


Rich
 

·
Premium Member
Joined
·
142 Posts
Phew glad about that still waiting for the RichG Lap tower compatibility seems to be slipping down the list.



Brian
 

·
Registered
Joined
·
3,057 Posts
Still waiting for RichG lap tower?
Check out SSDC - support for RichG lap tower now included.
Or did I miss something?
Cheers!
 

·
Registered
Joined
·
3,057 Posts
Still waiting for RichG lap tower?
Check out SSDC - support for RichG lap tower now included.
Or did I miss something?
Cheers!
 

·
Premium Member
Joined
·
4,882 Posts
Brian I did take a look at the Lap Display interface and got some of the basics working, however as I progressed it became clear that not only did the data have to be correct but also the timing. So at that point I decided it was going to be a big job (Probably a full Weeks work) so put it to one side so that I could get on with other aspects of Display-Pro and the Wireless Throttles.

I also decided not to give it too high a priority because Display-Pro is really all about being a Lap Display replacement.
I will however return to it one Day.

Yes SDSDC does now have support for the Lap Display, that unfortunately does not help in this instance as Display-Pro is running without SSDC. It is however another option if the Lap Display is important to you.

Rich
 

·
Premium Member
Joined
·
142 Posts
Thanks Rich

I don't like such a good product going to waiste, thats why I have mentioned it a few times, but yes you are right display pro is a bigger version of it I will get off the soap box now.

Thanks Sealevel I was not aware that this was now supported in SSDC as I have been using alternative software.

Brian
 

·
Registered
Joined
·
2,879 Posts
Taking Rich's simple idea in post#5, I've played with some numbers and simulated 30 laps assuming the user has input a start speed of 30 and a target lap time of 7 seconds. I assumed the first lap takes 8 secs & I've added a couple of slow laps for crash deslots/slow traffic: spreadsheet link.

For starters, relatively arbitrarily, I have used 2.5% as the threshold for the acceptable difference in the last 2 lap times (about 0.18 secs on a 7 sec lap), 2% (about 0.14secs) for the acceptable distance from the target time (not sure this matters but maybe saves some processing time), and incrementing/decrementing the speed by a maximum of the equivalent of 3% (0.21 secs) on the lap time on any one lap if the first 2 conditions are satisfied.

As you say, testing will tell what the best figures are but they feel in the right ball park?

I have ignored the 'reducing 2 counts' for a slow time as you don't know if it's a deslot or a crash. So I would keep the speed the same in this case and leave the user to lower the target lap time if necessary otherwise the program will just build back up to the deslot speed again?

As mentioned before, an option to turn of this automatic speed incrementing would be useful (or a pace car knob like on the SCP1)

Chris

Fwiw, as a pic is worth a 1000 words:
 
1 - 14 of 14 Posts
Top