RCS64 User Forum

Issues with RCS64 => Issues with version 4 => : MrFlippant December 08, 2014, 06:10:53 PM

: "stuck in pit lane"
: MrFlippant December 08, 2014, 06:10:53 PM
If a car is pushed out of the pit lane, and over the out sensor, RCS should kick them out of the pit lane menu and allow them to continue running around the track. While goofing around yesterday, we had that happen, and the car being pushed couldn't even try to get out of the way until he went through the pit menu exit procedure. For a newbie watching his car being pushed around, this can be harder than you think. I figure if RCS sees the car go over a sensor, and it was already in the pit lane, it should assume that it is exiting the pit lane forcibly, and kick them back into racing mode. Similarly, if the car crosses the S/F line in the same way, the same thing should happen, along with a lap count.
: Re: "stuck in pit lane"
: Vector December 08, 2014, 07:17:56 PM
Interesting and sounds a little comical :'(

I hope the person doing the pushing got a Stop&Go penalty ;D

: Re: "stuck in pit lane"
: MrFlippant December 08, 2014, 09:04:31 PM
We were just goofing around, but yes, I would imagine a penalty would be applied if that happened in a race.
: Re: "stuck in pit lane"
: GRUNZ December 09, 2014, 01:02:01 AM
Then it would be cool to have RCS to check the id of the pushing car and automatically assign the penalty...
: Re: "stuck in pit lane"
: MrFlippant December 09, 2014, 07:25:05 AM
Great idea!
: Re: "stuck in pit lane"
: martin December 09, 2014, 08:05:57 AM
Tell me how I should find out if you had a two lane pit?
: Re: "stuck in pit lane"
: GRUNZ December 09, 2014, 03:56:32 PM
You/RCS64 does not need to know if there is a single or double pit lane. When the car is in pit mode (pit menu open) and the program sees the ID of the car through the SS sensor (the one at the end of the pit lane) then close the pit mode and bring back the car in race mode.

the stuff that I suggested (give the penalty to the following car) is not very important but it could work. For instance, if the program sees the id of a car through the SS sensor at the end of the pit lane could be only for two reasons:
- a person is pushing the car around
- another car is pushing the car around

In the second case, the two cars should go over the pit out sensor in close succession: so when the program sees the id of the first car could start a short count down to look for an other id through the pit out sensor. If this happens assign a stop&go penalty to the second id. 

Anyway, I think that bringing the car in race mode if it goes over the pit out sensor makes a lot of sense to me. The second part (assigning the stop&go) is not important
: Re: "stuck in pit lane"
: MrFlippant December 09, 2014, 06:00:44 PM
Err... yeah. what does the number of pit lanes have to do with it?
: Re: "stuck in pit lane"
: martin December 09, 2014, 07:59:40 PM
What iff the car is in a middle off tyre change, repair or refueling?

I meant how could I detect what car push the other out if you have two lanes?


Martin
: Re: "stuck in pit lane"
: MrFlippant December 09, 2014, 08:41:34 PM
If possible, the refueling should be stopped at the point it was last at when crossing the sensor. Tire change and repair would be trickier, but would it be possible to keep the time spent so that the next time the car comes in to take care of those things, the remaining time is all it would take? So, if repair or tire change were set to 10 seconds, and the car was pushed out at 5s to go, when he comes in to repair or change tires, it only takes 5 seconds? I wouldn't want him to get a full repair or tire change by being pushed out, but I also wouldn't want him penalized by having to start from scratch.

As for detecting what car pushed the other out if you have two lanes... can you describe the sensor and track/pit layout that your question is based on? All the pit lanes I race on, whether one lane or two,  have a pit in sensor before the pit lane splits into two lanes, and the pit exit sensor is after the two lanes come down to one... you would know who pushed the car out of the pit by the ID of the car immediately following the one being pushed out. Or, to be more precise, the ID of the ACTIVE car (not in the pit menu) following any and all cars being pushed over the sensor that are still in the pit menu. This would allow for situations where a magnet racer is able to push multiple cars through the pit exit and back onto the track.

I need to know what kind of track and sensor arrangement you are basing your question on, because I still can't figure out why you're asking it.
: Re: "stuck in pit lane"
: Vector December 09, 2014, 09:06:48 PM
I believe that 'Raceros Manageicus Systemus Developacas' is on the Endangered Species list :(

Please treat with love and kindness :-*
: Re: "stuck in pit lane"
: MrFlippant December 09, 2014, 09:24:04 PM
I'm sorry if I caused any frustration or anything. I'm just trying to get onto the same page so that the discussion can progress.
It's clearly an issue of semantics that is causing this confusion, so maybe you can help, Vector. If you can gain an understanding of what Martin means, and convey that to me and Grunz, then I'm sure we can provide the answer he seeks.
: Re: "stuck in pit lane"
: martin December 10, 2014, 06:50:53 AM
When a car push the other out, youre sugest an auto penalty to the car that push. When you have a double lane pit, and three cars is in pit, what off the two other cars shall have penalty? I know I can see car two is getting out off the pit, but what iff that car stops before the sensor.. A lot off complicated code need to me made, to get this working smooth. I also have to think off the PC performance, Many slotcar users run on a very old second hand XP pc, and they all expect it to run smootly, so putin complex code will for sure be a little too much for those PC's.
I like the Idea about exit pit menu no doubt about that, but I am afraid there are too many relations that will mess up, because off all kind off calculations needed to be reset or paused. So sorry this will be a lower priority..
: Re: "stuck in pit lane"
: GRUNZ December 10, 2014, 03:49:36 PM
Just as I said in my previous post, the auto penalty is not that important.
About your comment for a feature that requires complex code that could slow down old PC, I would say that you could add this as an option feature that can be activate only in PC with decent performance (RCS could check the performance of the PC and disable some of the feature or give users feedback such as "RCS thinks that your PC is crap and you should not activate this feature").
I would say that keeping features on hold because of old PCs out there is not fare for the other users with decent machines...

As for the program logic how about this:

If (PitOut sees ID) and (ID.status is in PitMenuOpen) {
  startTimer();
  ID.status set Race;
  If (PitOut sees ID2) and (ID2.status is not in PitMenuOpen) and (Timer is not Up)
     ID2.status set STop&Go;
}

Basically, you will give automatically a penalty to car getting out of the pit only if:
 - the pitout sees an ID that should not be seen because the car is still with the pit menu open
 - if the pitout sees another ID within a short time then give this second car a penalty because chances are this car is pushing a car that was pitting.

Of course, if the second car pushes the first car and waits for timer to be up before passing over the pitout then it will not get the penalty.

Anyway, i do not see why having a second pit lane should cause any troubles. The auto penalty is activated only when the pit out sees a car that is still pitting going out.
: Re: "stuck in pit lane"
: martin December 10, 2014, 04:03:48 PM
Ok I can see the code in my head but I have hundred senarius/relations to handle at the same time so it sound easy but it isent, but I am not seeing what to do with the ongoing features in pit.

Fuel : stop
Tire :  thinks to be desided(Use from stock, what if its raining and your stoped while changing to wet tire.  )
Repair: ?
Stop&go:?

It almost sounds like I wont make it, but I will. I just have to figure out how to do, so you dont report it as a bug later:)
It just sound easy, but its not... a lot off senarios to figure out, so use this a brainstorm..
: Re: "stuck in pit lane"
: MrFlippant December 10, 2014, 06:20:58 PM
As a person using an older, underpowered laptop (cheapie from Wal-Mart that came with Vista and crapware, downgraded to XPXP3), I very much appreciate all the work you do to keep the software running smoothly on such computers. I also agree that it would be unfair to withhold features just because some people might not be able to use them without slowing things down too much. I try to make it clear that whenever I suggest a feature, I mean it should be optional, but if I forget, please assume that I mean for any feature to be optional, if possible. :)

I don't think you need to worry much about what other cars are doing in the pit lane. As Grunz said, if you see a car cross the sensor when it's still in the pit menu, start a timer (user configurable) and any car detected passing the sensor before that timer expires will get a penalty.

For what to do when that happens, if possible, make them optional, but if that's too complicated, I'd be fine with:
Fuel: stop at current tank level
Tire: Can it be treated like a tire wear level? If switching to different kind of tire, just give it to them. I would consider this part of the penalty to the driver that pushes the car. They just gave the other can an advantage by pushing them out of the pit lane. As pit lane strategy can mean a lot in a race, it rarely behooves the pushing driver to give the other car fresh tires without the necessary delay.
Repair: stop at current level of repair based on elapsed time. Maybe like Tires, give them full damage points back.
Stop&Go: cleared. Just like Tires, the pushing car is put at a disadvantage because he was impatient.

IMHO, giving the pushed car the benefit in such a situation will be a strong deterrent to those who would consider pushing them out of the way. While they might get out of the pit lane sooner, they'll just have given the other car the upper hand with no penalties or damage to clear, fresh tires, and heck, maybe even a full tank of fuel. :)

But, that's me. ;)
: Re: "stuck in pit lane"
: GRUNZ December 11, 2014, 02:01:51 AM
Martin
I am not saying that is easy, but I do not see what  the two pit lanes have to do with it. In the end all the cars go over one lane where the pit out sensor is. I have tried to put in pseudo code to try to clarify that.
But anyway, I think that this is a minor feature that would require a lot of coding. Still, I think that the closing of the pit menu when a car goes over the pit out should be implemented especially in tracks with single pit lanes.
: Re: "stuck in pit lane"
: MrFlippant December 11, 2014, 02:34:00 AM
Yes. The penalty for pushing stuff is a "would be cool" but definitely low priority.
Getting cars to kick back into racing mode when pushed out of the pit is the priority. Even if they get everything stopped and have to start from scratch after another lap.

Grunz, what are your thoughts on what happens to pit-related activity for the car that gets pushed?
: Re: "stuck in pit lane"
: martin December 11, 2014, 05:51:48 AM
When using a single lane pit-lane you know the order off the car entering into the pit, then I know what car pushing..
With a two lane pit, I have to make a timer. Today there is a timer running every 100 ms to handle all kinf off things like pitmenu functions, so when you press a butoon. but I am not sure 100 ms is fast enough for this so I have to turn down on this update rate, but then again it affect the gui update and also the throttle feelings. driver update rate. So I actually need to make another parallel loop for this running faster than 100ms. but if it was a single lane pit I know the order then i dont have to have another loop running..

Does it make any seense?
: Re: "stuck in pit lane"
: MrFlippant December 11, 2014, 06:55:34 AM
I forget, is 100ms equal to 1 second, or one TENTH of a second? If .10, then that's plenty fast enough.
1s would be a little long, but I wonder how a car could be pushed past the exit sensor at ALL if not by the car immediately following it at any point thereafter. Even if the pushing car stops before the sensor, he'll be the NEXT one over the sensor no matter what.

Unless you're proposing that a two lane pit has two exit sensors, one for each lane. Does anyone do that yet? Is it possible yet?
: Re: "stuck in pit lane"
: Minardi December 11, 2014, 08:51:57 AM
Ok, I understand what is going on here, my thoughts;

- No automatic penalty for the pusher. I believe we can still award this with the  keyboard.Who says the pusher isn't pushing 2 cars ?
And It would avoid the situation that a car on purpose is waiting to be pushed.

-When a car that crosses pit out is in pit menu, give the benefit of the doubt and make the value of the chosen pit activity at the moment of crossing pit out 100%.
Other values remain as they are.

 
I would hate to see put Martin a lot of effort in this while there are so many other (new features!) things we can do first.
: Re: "stuck in pit lane"
: MrFlippant December 11, 2014, 04:57:04 PM
That's a good point about a car possibly pushing out two cars, but it would be simple to determine that, because the second car would also still be in the pit menu. So, instead of "the car after the one that crosses in the pit menu" it would be "the first ACTIVE car following any number of cars still in the pit menu".

But, as Grunz and I have both said, it's less important to worry about this penalty stuff. Let's just get pit menu cancellation for any car that crosses the sensor for ANY reason in there. Give them full *whatever they were doing* when they cross, and worry about penalties for the pusher later.

I like that the marshal can apply a penalty, of course, but when the rest of us are racing, having something like that be automatic would be very nice. We almost never have a spare person, so unless someone activated a track call and remembered to indicate that someone gets a penalty for pushing a car in the pit lane, it probably would be forgotten by the next car crash.
: Re: "stuck in pit lane"
: GRUNZ December 11, 2014, 09:19:49 PM
I have thought about the second or third or whatever car being also in Pit Menu mode and being pushed. Basically the offending car is pushing a train of cars.
If you check I have put a condition in my pseudo code example that takes this scenario in to consideration:
 If (PitOut sees ID2) and (ID2.status is not in PitMenuOpen) and (Timer is not Up)
                                       ^here I am checking that the following car is not in PitMenuOpen mode.

I do not know how good LabView works in multi-threading. For sure there is a lot of synchronisation going on here.

As for the two-lane pit lane, it could be the case that there is a XLC in it, so the sequence of car entering might not be the same of the sequence in exit. As an example, let's take the 2-lane pit lane shown below (I hope that is clear enough):

Lane 1____________________________________________________________
Lane 2____________________________________________________________   
Pit Lane 1      \___SS-IN_______1______   ___3_______SS-OUT____/
Pit Lane 2                          \_____2______X___4_____/   
 

The numbers 1,2,3,and 4 represents the pit bays, SS-IN is the smartsensor in (SS-OUT is smartsensor out), and the X is the XLC placed in the middle of the pitlane.

Let assume car with ID 1 enters first and goes to bay 4 and open the pit menu. Car with ID 2 enters the pit lane and goes to bay 3.Car sequence so far is [2,1] (this is not a FIFO as I will show later on). Now, car ID 3 enters and goes to pit bay 2 (ID sequence is [3,2,1]). While car ID 1 is still in pit menu open (and car ID 2 is also still in the pit but does not matter if pit menu open or not), car ID 3 pushes car ID 1 out of the  pit lane. When a car ID goes over the SS-OUT the sequence is updated by removing the car ID from the list: in this case when car id1 goes over the SS-OUT it will be [3,2] and then when car id goes over SS-OUT the sequence will be [2].
As you can see in this simple example, the sequence in which the cars have entered the pit lane does not help for identifying the offending car. And one cannot even assume that the offending car has to enter the pit lane after the pushed car. Here is another example:

Car id 1 enters the pit lane, stops in bay 1 and goes in pit menu open (sequence is [1]). Car id 2 enters, goes to pit bay 3 (perfectly possible by going to pit lane 2 and then using the XCL to go back to pit lane 1), and opens the  pit menu (now the sequence is [2,1]). Now car id 1 close the pit menu and pushes car id 2 out of the pit lane while car ID 2 has still the pit menu open.

As for what happens to the pit activities of car being pushed, I would go for two options: either stops everything as it was when it was pushed over the sensor or give 100% on the activity in course.