The online racing simulator
InSim Checkpoint discrepancies
(10 posts, started )
InSim Checkpoint discrepancies
After reading about, and getting involved in a post by scania regarding making a 2 way RoC course, I thought I'd try making my own autox layout with autox and InSim checkpoints.

If you complete a lap using the normal LFS start position, checkpoints and finish lines, it all works as normal.

However, I'm finding that when I start from a autox start position, cross the InSim checkpoints, then the InSim finish line, there are timing problems.

Issues that I'm having;

Firstly, spawning points from garage are different.

Secondly, there's a huge difference in time (approx 11+ secs) between the LFS timer, and the InSim timer.

Thirdly, in normal autox mode, a timed lap is from green light, to crossing finish line. In InSim timing mode, a timed lap is from green light to crossing normal finish line 2nd time.

My InSim start is half lap from normal start, so you have to do lap and a half to get a finish time.

Anyone else used the InSim checkpoints?

Did you note any discrepancies?

Is this an InSim issue, or an LFS autox issue?

I've loaded a lap on YouTube to show results.



InSim start line is half way round lap.

Used all 3 autox checkpoints and autox finish line, and all 3 InSim checkpoints and InSim finish line on the layout. For video, start position 1 in front of InSim finish line. Originally, I had start position 1 in front of autox finish line, and start postion 2 in front of InSim finish line, but as I'm testing alone, kept them in same position, but changed start position numbers round in edit mode.

I've broken down my observations, especially the timings.

LFS Route = standard checkpoints and finish line
- start position 1 in front of finish line, and start postion 2 in front of InSim finish line
- leave garage and spawn off track. Shift R to start race, spawn on start 1 position
- recorded lap time is from Green light to crossing finish line

InSim Route = InSim checkpoints and InSim finish line
- start position 1 in front of InSim finish line, and start postion 2 in front of autox finish line
- leave garage and spawn on start 1 position in front of InSim finish line
- recorded lap time is from green light at InSim start, crossing LFS start position, crossing InSim finish line, to crossing LFS finish line

Splits -
InSim split LFS split Difference Comment
0:13.74 0:02.18 0:11.56 standing start from green light to crossing start line
0:36.10 0:24.69 0:11.41 cross InSim checkpoint 1
0:59.28 0:47.88 0:12.40 cross InSim checkpoint 2
1:17.50 1:05.82 0:11.68 cross InSim checkpoint 3
1:42.90 1:30.76 0:11.43 cross InSim finish line
2:03.23 1:51.51 0:11.72 cross InSim checkpoint 1 (2nd time)
2:25.91 2:14.52 0:11.39 cross InSim checkpoint 2 (2nd time)

0:59.01 cross normal start line (after half lap)
1:18.37 from green light, crossing normal start line, to LFS checkpoint 1
1:37.80 from checkpoint 1 to crossing checkpoint 2
2:01.13 from checkpoint 2 to crossing checkpoint 3
2:25.32 from checkpoint 3 to crossing LFS finish line

InSim lap time => 1:42.90 - 0:13.74 = 1:29.16 from standing start
LFS lap time => 2:25.32 - 0:59.01 = 1:26.31 from rolling start (at full speed)
Had a thought about the timing, so checked.

I thought maybe the InSim timer starts when you spawn onto the start position, rather than when the green light comes on. Almost right. But time taken between spawning on start position to crossing checkpoint line takes about 11 seconds.

Still 2 seconds too short Frown
thx for your test Smile
Could it be that timer starts when you spawn to your start position and ends when you cross a checkpoint, where the extra 2 seconds are about the time it takes before the line goes green?
If I remember well, the starting lights have slightly different timeframe in which it operates.
I really don't know what's happening.

To make sure I wasn't doing anything silly, I made new layout and set checkpoints.



Then I did a couple of laps in UF1 to see what happens with times.



The top time that refers to the Finish Line, is me crossing it as a start line. Thing is, in a UF1, it takes over 2 seconds from green light, my reflexes, overcome inertia, move and cross line.

As you can see from Run 1 and Run 2, there are differences in the time recorded to cross checkpoint/finish line, and time recorded for Racetime. By that, I mean in 1st run, difference in Checkpoint 1 time is 0.04s, but 2nd run is 0.32s.

If anyone wants to test this, I have included copy of my layout.

The only code I've changed in the standard lfslapper file, is...

<?php 
Event OnCrossingChecker
($userName,$Flags,$Time,$Object,$UserSpeed,$CircleIndex)  # Player event

    
privmsg("^7Driver: ".getplayervar($userName,"NickName"));

     
privmsg("^7".$Object."^4 sector split: ^3".$Time);
   
  
$racetime GetLapperVar("racetime"); # Elapsed racetime (in Milliseconds) after the race has been started 
     
privmsg("^7Racetime: ^3".(NumToMSH($racetime)));
   
EndEvent
?>


I'm using very latest version of lapper, including new .exe file in previous posts.

Edit: Added video of 3rd run onto YouTube

Attached files
AU1_Pursuit.lyt - 6.8 KB - 278 views
I'm a bit tired and need a break, but I think that time that is reported is the time since the restart or race entry. I guess the same time you would see on the replay slider bar.

It is equivalent to the times reported by a SMALL_RTP packet. Also the same times are reported in ISP_CSC packets.

It's not relative to the time the lights went green. I think the idea is that the external program can take control of the lights.
#7 - Racon
I did a straight 2 lap race with a log for UCO, SPX and LAP if that's any help

UCO Raw: 28 59 0 1 0 2 0 0 154 3 0 0 255 255 9 1 35 2 196 205 28 2 196 205 0 40 252 128
UCO: Time = 9.22
UCO Raw: 28 59 0 1 0 2 0 0 137 12 0 0 0 2 25 1 196 253 160 205 56 254 160 205 0 41 252 128
UCO: Time = 32.09
UCO Raw: 28 59 0 1 0 2 0 0 53 19 0 0 122 119 36 1 136 3 194 205 90 3 200 205 0 42 252 0
UCO: Time = 49.17
SPX Raw: 16 25 0 1 144 241 0 0 144 241 0 0 1 0 0 0
SPX: STime = 01:01.84, ETime = 01:01.84
UCO Raw: 28 59 0 1 0 2 0 0 73 27 0 0 129 128 21 1 161 3 66 197 90 3 68 197 0 43 252 0
UCO: Time = 69.85
SPX Raw: 16 25 0 1 30 49 1 0 30 49 1 0 2 0 0 0
SPX: STime = 01:18.11, ETime = 01:18.11
UCO Raw: 28 59 0 1 0 2 0 0 163 33 0 0 249 250 37 1 53 2 196 205 28 2 196 205 0 40 252 128
UCO: Time = 86.11
SPX Raw: 16 25 0 1 144 130 1 0 144 130 1 0 3 0 0 0
SPX: STime = 01:38.96, ETime = 01:38.96
UCO Raw: 28 59 0 1 0 2 0 0 201 41 0 0 0 0 23 1 195 253 161 205 56 254 160 205 0 41 252 128
UCO: Time = 106.97
LAP Raw: 20 24 0 1 210 199 1 0 210 199 1 0 1 0 0 2 0 0 0 0
LAP: LTime = 01:56.69, ETime = 01:56.69
UCO Raw: 28 59 0 1 0 2 0 0 182 48 0 0 122 119 37 1 146 3 196 205 90 3 200 205 0 42 252 0
UCO: Time = 124.70
SPX Raw: 16 25 0 1 86 79 0 0 40 23 2 0 1 0 0 0
SPX: STime = 20.31, ETime = 02:17.00
UCO Raw: 28 59 0 1 0 2 0 0 165 56 0 0 131 130 22 1 162 3 65 197 90 3 68 197 0 43 252 0
UCO: Time = 145.01
SPX Raw: 16 25 0 1 210 145 0 0 164 89 2 0 2 0 0 0
SPX: STime = 37.33, ETime = 02:34.02
UCO Raw: 28 59 0 1 0 2 0 0 74 63 0 0 249 251 37 1 71 2 199 205 28 2 196 205 0 40 252 128
UCO: Time = 162.02
SPX Raw: 16 25 0 1 96 224 0 0 50 168 2 0 3 0 0 0
SPX: STime = 57.44, ETime = 02:54.13
UCO Raw: 28 59 0 1 0 2 0 0 38 71 0 0 1 1 23 1 212 253 163 205 56 254 160 205 0 41 252 128
UCO: Time = 182.14
LAP Raw: 20 24 0 1 236 38 1 0 190 238 2 0 2 0 0 2 0 0 0 0
LAP: LTime = 01:15.50, ETime = 03:12.19
UCO Raw: 28 59 0 1 0 2 0 0 51 78 0 0 121 118 36 1 141 3 198 205 90 3 200 205 0 42 252 0
UCO: Time = 200.19

Quote from Racon :I did a straight 2 lap race with a log for UCO, SPX and LAP if that's any help

Its probably going to take a programmer to work out what all that means, but thanks anyway - much appreciated. Thumbs up

However, didn't stop me trying to make sense of at least some of it, and I think I have.

The first 3 ETime's appear to show the sector times, and the next is the lap time. The next again 3 ETime's are the 2nd lap sector times, followed by the full race time.

In between we have LTimes - 1st lap time (= ETime) and 2nd lap time (with ETime = to lap1 + lap2).

UCO Raw, SPX Raw and Lap Raw numbers mean nothing to me.

UCO Time - is this the LFS checkpoints rather than the InSim checkpoints?
Attached files
Racons Lap Time Data.pdf - 424.2 KB - 317 views
#9 - Racon
Sorry, 'raw' is just a dump of the whole packet by byte. SPX is a split, LAP is the finsih, and UCO is an insim checkpoint. The lines directly below the raw are the timing information extracted from each packet.

I'm a bit confused as to what's supposed to happening where with that track, so I just dumped the lot in case you could figure it out just from the timings Smile

I'll try on a simple test track later on to get my head around it Thumbs up
Right, so, I made a simpler layout with 3 checkpoints and a finish, with an insim split over each one. I've added the replay and the layout if it's needed. I did two laps, and the log is below.

The good news is that the gap looks consistent Smile That was my big worry from earlier in the thread.

(The first UCO time is the time it takes from /restart to green lights + reactions + inertia)

UCO: Time = 9.31

UCO: Time = 12.10
SPX: STime = 04.11, ETime = 04.11

UCO: Time = 15.14
SPX: STime = 07.15, ETime = 07.15

SPX: STime = 10.56, ETime = 10.56
UCO: Time = 18.56

LAP: LTime = 13.27, ETime = 13.27
UCO: Time = 21.27

SPX: STime = 02.38, ETime = 15.65
UCO: Time = 23.65

UCO: Time = 26.95
SPX: STime = 05.69, ETime = 18.96

SPX: STime = 08.49, ETime = 21.76
UCO: Time = 29.76

LAP: LTime = 11.06, ETime = 24.33
UCO: Time = 32.33

Attached files
AU1_checkpointtest.lyt - 428 B - 306 views
Jam 616_AU1_RB4_FINISHED_4.spr - 19.1 KB - 288 views

InSim Checkpoint discrepancies
(10 posts, started )
FGED GREDG RDFGDR GSFDG