Hello! here is my current traffic light status with some problems
The problem is that I defined a loop of 90" but in AC the loop takes 141,5" and I dont understand why. The time of the green and yellow matches with my calculation but the red light spend much more time but matches with the start of the loop correctly...
I can change the FLASHING_FREQUENCY (in my case is: 1/90 = 0,0111) and
and approach the real time of 90" in AC but the green and yellow correct times I would waste and would be a mess recalculate at a guess.
Below I explain my calculations (if I get everything working I will make a tutorial on YouTube explaining everything step by step):
This is my loop. Traffic lights A+B are those on the main road, C and D are on the secondary one that cross and operate one after the other.
In Asseto Corsa I have only tried the AB timeline so we discard the rest for the moment
The green traffic light starts at 0 and ends at 23" then amber lasts 3" and red from second 29 to second 90
1/90= 0,0111 is the frequency. To calculate the LUT I divide each on/off time by 90 and these are the values: 23"/90=0.255; 26"/90=0.288 so the LUT looks like this:
AB_GREEN
FLASHING_LUT= (|0=1|0.25=1|0.25=0|1=0|)
AB_YELLOW
FLASHING_LUT= (|0=0|0.25=0|0.25=1|0.28=1|0.28=0|1=0|)
AB_RED
FLASHING_LUT= (|0=0|0.28=0|0.28=1|1=1|)
But the problem is that the loop lasts much longer than I calculated and I don't understand why.
Below I leave all the traffic light configuration:
----------------------------------------------------------------------------------------------------------------------------
[MATERIAL_ADJUSTMENT_...]
ACTIVE=1
DESCRIPTION = Green AB Traffic Light
MATERIALS= Disco_Verde
KEY_0=ksEmissive
VALUE_0=0,150,0,1.09
VALUE_0_OFF=0, 0, 0
KEY_1= ksAlphaRef
VALUE_1=0
VALUE_1_OFF=100
RANGE=25
CONDITION= BLINKGREEN
[MATERIAL_ADJUSTMENT_...]
ACTIVE=1
DESCRIPTION = Amber AB Traffic Light
MATERIALS= Disco_naranja
KEY_0=ksEmissive
VALUE_0=255,150,0,5.09
VALUE_0_OFF=0, 0, 0
KEY_1= ksAlphaRef
VALUE_1=0
VALUE_1_OFF=100
RANGE=25
CONDITION= BLINKYELLOW
[MATERIAL_ADJUSTMENT_...]
ACTIVE=1
DESCRIPTION = Red AB Traffic Light
MATERIALS= Disco_Rojo
KEY_0=ksEmissive
VALUE_0=255,0,0,1.09
VALUE_0_OFF=0, 0, 0
KEY_1= ksAlphaRef
VALUE_1=0
VALUE_1_OFF=100
RANGE=25
CONDITION= BLINKRED
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CONDITIONS
[CONDITION_5]
NAME=BLINKRED ;
INPUT=ONE
FLASHING_LUT=(|0=0|0.28=0|0.28=1|1=1|)
FLASHING_FREQUENCY=0.0111 ; loop 90 seconds
FLASHING_SKIP_OFF_STATE=1
FLASHING_SKIP_DOWNHILL_STATE=1
FLASHING_SMOOTHNESS=1
[CONDITION_6]
NAME=BLINKYELLOW ;
INPUT=ONE
FLASHING_LUT=(|0=0|0.25=0|0.25=1|0.28=1|0.28=0|1=0|)
FLASHING_FREQUENCY=0.0111 ; loop 90 seconds
FLASHING_SKIP_OFF_STATE=1
FLASHING_SKIP_DOWNHILL_STATE=1
FLASHING_SMOOTHNESS=1
[CONDITION_7]
NAME=BLINKGREEN ;
INPUT=ONE
FLASHING_LUT=(|0=1|0.25=1|0.25=0|1=0|)
FLASHING_FREQUENCY=0.0111 ; loop 90 seconds
FLASHING_SKIP_OFF_STATE=1
FLASHING_SKIP_DOWNHILL_STATE=1
FLASHING_SMOOTHNESS=1
----------------------------------------------------------------------------------------------------------------------------
On the other hand, I don't know what these values mean and if they affect the loop (I copied them from your first example):
FLASHING_SKIP_OFF_STATE=1
FLASHING_SKIP_DOWNHILL_STATE=1
FLASHING_SMOOTHNESS=1
Afterwards I tried to set these values of
fughettaboutit excel and the loop when stopping stays static at the red light and does not start again, perhaps the problem is in these lines, I don't know...
FLASHING_SYNCED = 1
If it occurs to you what the problem could be, it would be of great help to continue. I haven't yet tested if the traffic lights work with traffic planer, during the week I don't have much time to experiment.
Thank you very much in advance