The online racing simulator
Laptimes
(7 posts, started )
Laptimes
In my first thread to this question (http://www.lfsforum.net/showthread.php?t=49590) I got the advice to ask here for help. So here I am.

I am a guy who has a passion for figures and statistics. Therefore it would be very useful to me to have records of all my laps done in LFS. In the long run it should be able to show how I'm improving (or not :schwitz.

So what I would need is a tool that extracts the following data from the game (insim when I understood that right) and puts it into a textfile. The data-needed should be:
  • Date/Time
  • Track
  • Car
  • Sectornumber
  • Sectortime
An alternative would be:
  • Date/Time
  • Track
  • Car
  • Laptime (can be omitted, as it should be redundant to sectortimes)
  • Sectortime 1
  • Sectortime 2
  • ...
  • Sectortime n
Is there anything already available that does the job (I haven't seen the right tool so far). LFSStats does something similar as I understand, but the needed data is pretty tough to extract (at least for me, as I am not a programmer).

I'm a good enough user of the Office-applications to be able to make my statistics from this point, so it wouldn't be necessary to have a toolset available for interpretation of the data, but I'm not able to catch the original data.

For me the task sounds pretty easy, but then for the ignoramus the unknown seems to be easy.
I don't have time to write you a full program, but I have a small Python script which does this. I modded it a little so it produces a CSV file with the output you requested.

# DATE, TRACK, CAR, SPLIT1, SPLIT2, SPLIT3, LAP
2008.10.23 13:23:06,AS1,FBM,0:33.830,0:00.000,0:00.000,0:59.200
2008.10.23 13:24:05,AS1,FBM,0:33.170,0:00.000,0:00.000,0:59.030

You'll need to install the Python interpreter and the Pyinsim module in order to use it, but I wrote a tutorial for how to do that.

You can download the program below. Set your InSim info in the Config.ini file, open the command line and browse to the folder you unzipped it to, and start it with the command:

python LapTimeStats.py

I hope this helps, although hopefully someone will write you a better version.

Edited: Removed buggy version, can get new version in post below.
Thanks a lot. I'll try at the weekend. Great! That's all I needed.
Hello, i don't have exactly what you are looking for, but i show you what i've done maybe can help

here is where all start:
http://www.lfsforum.net/showthread.php?t=48948

I wanted to make a Ranking system , to class driver by the Skill and not by the time played or win count.

So i gathered EACH lap from ALL driver and ALL server , that mean i have all the DATA you are requesting for.

For multiple reason i have Classed all this data into a MySQL database.

With some simple query i am able to reach only the data i need to build stats from it.

Me i have build some private formula , to build up a ranking skill system.

If you wan to take a Look at the ranking system Result, just connect on "Aleajecta Demo" and type !rank , there is a search section so you can find your self, by Track/car.

there is 4 Stats:

Best, Avg, Sta, Win, Total

Best is on 5000 == Current World Record Time.
Avg is on 5000 == Current Average from ALL Server and Driver.
Avg is on 2500 if you never played on Aleajecta.
Sta is on 5000 == You always Run at your PB time.
Win, Really depend on the RaceLapAvg, LapsCount and Driver Count And Elo rank from Other Driver.


Very Soon, i will do similar job but with Time Display and not Rank Skill.

I know you did not ask for this, but you say: "your a Stats freak" and this system is very good to know with who you can race to have good challenge or to know on what you need to work to become better.

Example:

I have a Best of 4768 and a Stability of 4000, you have a best of 4500 and a Stability of 4700 , you are slower then me, but you will probably win all race again me, since i am running for the best lap and not the for a clean race.

Ho! if i show your Data into "Yellow" mean your Better then Before, "Blue" mean your worst, "White" mean your event.
Quote from DarkTimes :I don't have time to write you a full program, but I have a small Python script which does this. I modded it a little so it produces a CSV file with the output you requested.

Hi just tested it. It works wonderful, when in singleplayer mode. But as soon as I use it in multiplayer it produces an error:

Quote from DOS-box output :LapStats connected! Go drive some laps and check the file Laps.txt for the outpu
t.
Unhandled exception in thread started by
Traceback (most recent call last):
File "C:\Programme\Python\Lib\site-packages\Pyinsim.py", line 1281, in __ReceiveThread
self.__RaisePacketEvent(packet)
File "C:\Programme\Python\Lib\site-packages\Pyinsim.py", line 1307, in __RaisePacketEvent
self.__callbacks[type_](packet)
File "C:\Programme\Python\LapTimeStats.py", line 142, in SplitCompleted
player = GetPlayer(spx['PLID'])
File "C:\Programme\Python\LapTimeStats.py", line 79, in GetPlayer
return players[plid]
KeyError: 41

No idea what this means. Is this a problem in my setup, or is this a problem of the code? Thanks in adavance.
Sorry, about that, it's a bug in my code.

Please try a slightly modified version and see if that fixes the bug.
Attached files
LapTimesStats_v2.zip - 2.5 KB - 276 views
Tried it again. Works great. Thanks a lot. May you be a second faster than usual in your next race.

Laptimes
(7 posts, started )
FGED GREDG RDFGDR GSFDG