The online racing simulator
Searching in All forums
(117 results)
jason_lfs
S2 licensed
Hi. This is a small script I did to parse PTH files on Python. It's based on Dygear's PHP implementation (http://www.lfsforum.net/showth ... t=71343&highlight=pth).


<?php 
import struct

def parse_pth
(file):
    print 
"Parsing ",file
    f
=open(file,"rb")
    
    
f.seek(6)
    
version,rev=struct.unpack('bb',f.read(2))
    
f.seek(8)
    
total_nodes,finish_line=struct.unpack('ll',f.read(8))
    print 
"Version: ",version" Revision: ",rev"Total nodes: ",total_nodes" Finish line:"finish_line
    nodes
=[]

    for 
i in range(0,total_nodes):
        
f.seek(16+40*i)
        
bn=f.read(40)
        
nodes.append({"center"struct.unpack('lll',bn[0:12]),"direction"struct.unpack('fff',bn[12:24]),"limit":struct.unpack('ff',bn[24:32]),"road"struct.unpack('ff',bn[32:40])})
    
    
f.close()
    return (
nodes,total_nodes,finish_line,version,rev)

#Example Usage
(nodes,total_nodes,finish_line,version,rev)=parse_pth("./pth/BL1.pth")

for 
id,node in enumerate(nodes):
    print 
"Node:",id", center (x,y,z):"node["center"], ", direction (x,y,z):",node["direction"], ", limits: ",node["limit"], ", road limit: ",node["road"

?>

jason_lfs
S2 licensed
Full Benzina Racers, 92, Dairon, Dayro Navarro, Colombia
Full Benzina Racers, 93, jason_lfs, Jason Molina, Colombia
jason_lfs
S2 licensed
Team Name: Full Benzina Racers
Number of Cars Entered: 2
Car Numbers Requested: 92, 93
Team Manager: Jason Molina, jason_lfs
Drivers :
Dayro Navarro, Dairon, Colombia
Jason Molina, jason_lfs, Colombia

jason_lfs
S2 licensed
Hi. First thank you for all your efforts, Pyinsim is a great tool. Regarding pyinsim 3.0 and the automatic encoding. I often work with playernames that have latin characters like "ñ", "á", "é", etc. so I wonder if this automatic encode will affect me in any way.

The timer is a cool feature as well. Currently I use a class that inherits Thread to create several objects than run processes as daemon threads. I found that I needed to be able to run once or repeat the process, pause it, kill it, pass arguments to the referred function (as a list), etc.

It's nice to see that pyinsim development is active. I'll do some testings on this new version. Cheers.
jason_lfs
S2 licensed
Custom Launcher V0.4.
Minor bug fixes and a couple of new configurable parameters.
RELEASE NOTES
DOWNLOAD

That's all for now. Cheers.
jason_lfs
S2 licensed
Very useful thanks!
jason_lfs
S2 licensed
Thanks for your suggestions.

DOWNLOAD V0.3

NEW: Added more customizable options (number of lights, colors, time delays) in config.cfg. Check comments there.
NEW: Added a log system. Important events are stored in log_CUSTOM LAUNCHER.txt. Each event is stored with date and elapsed time since program start (ET) in seconds.
OTHER: /i reload_config (reload config params without restarting app)

Please let me know if you need another change/feature.
Last edited by jason_lfs, . Reason : blah
jason_lfs
S2 licensed
I got a pair of socks and bought a midi controller that still hasn't arrived .
jason_lfs
S2 licensed
Quote from Impreza09 : but at least we know you didnt die in the kitchen or something...

You know, that was one of my greatest fears this year.
There's nothing we can do but wait.... more.
jason_lfs
S2 licensed
Check all things you could change to make the champ more attractive. Perhaps the race dates are not the best ones, or the car/track is hard or boring. Analyze past champs (successful and failed). What really keeps drivers motivated is fun and clean races and winning something each race (at least a few points) that encourages them to come back next round. Eradicate crashers and "kid" drivers, the kind of driver that spectate and leave race in the first lap after a crash.

Anyway don't give up, there are always bad times in everything.


PD: Sorry for my bad English.:dunce:
jason_lfs
S2 licensed
Thanks for the good race and administration. Please push back tomorrow's race, little participation today and tomorrow will be worse and I have NDR Kyoto 150 :P at that time.
jason_lfs
S2 licensed
HERE:
DOWNLOAD V0.2

Feel free to suggest if need an improvement or if there are errors. Bye.
jason_lfs
S2 licensed
Sure. Thanks for your suggestions., I'll work on that and hope to have next version soon.
jason_lfs
S2 licensed
Very crazy race for me with a good result at the end (5th). Thanks pfH daf for helping me at qualy with draft and Provost for a good race. I was hit by safety car (teppo) on T1 , that was a very wtf? moment for me.
Thanks teppo but seriously, you need help with administration. And several drivers need more practice in oval racing. See you next race. Bye.
Last edited by jason_lfs, .
jason_lfs
S2 licensed
but you'll get some false alarms when, under yellow flag, any car goes into pits or is not able to continue forcing other cars to overtake.
jason_lfs
S2 licensed
HERE:
HOW TO USE

DOWNLOAD

Hope this helps. Bye.
jason_lfs
S2 licensed
I'll try
jason_lfs
S2 licensed
Username: jason_lfs
Real name: Jason Molina
Country: Colombia
Team: Full Benzina Racers
jason_lfs
S2 licensed
Hi. Thanks for this great tool. I have a question, Does VHPA have an open source version? I think very good applications can be created from this software. Thanks.
Problem with Time in IS_CON
jason_lfs
S2 licensed
Hi. I'm trying to store car contacts made in a race but I'm not getting the right values for variable "Time" if the race is long. Here is the packet specification from InSim.txt:

struct IS_CON // CONtact - between two cars (A and B are sorted by PLID)
{
byte Size; // 40
byte Type; // ISP_CON
byte ReqI; // 0
byte Zero;

word SpClose; // high 4 bits : reserved / low 12 bits : closing speed (10 = 1 m/s)
word Time; // looping time stamp (hundredths - time since reset - like TINY_GTH)

CarContact A;
CarContact B;
};

The packet size is 40 bytes. The first 4 bytes are for Size, Type,Reql and Zero. CarContact A and B are 16 bytes each one and SpClose and Time are 2 bytes integers each. According to Wikipedia for a 2 bytes unsigned integer the range is 0 to 65535. So, for Time, it can't have values larger than 65535 and in real time measure (100 = 1 second) that is like 655 seconds or so. If the race length is longer than that the Time value will not be correct.
For tests I've used Pyinsim library.

I wonder if this is a Insim or Pyinsim bug, or perhaps I'm doing something wrong. Thanks.
jason_lfs
S2 licensed
Hi. Thanks for the library. Just to report a small bug regarding CarContact packet. In insim.py at line 1161:

pack_s = struct.Struct('3Bb6b2B2H')

should be
pack_s = struct.Struct('3Bb6b2B2h')

that's because X and Y coordinates might have negative values and 'H' is for unsigned shorts only.
Setup question. Added mass
jason_lfs
S2 licensed
Hi. when the car has some added mass you need to adjust your setup in order to compensate substeer or oversteer that may occur adjusting the mass position, downforce, suspension, etc. But I'm not pretty sure what to do to compensate the loss in speed and acceleration, particularly with the gear ratios and differential. Any tips will be appreciated. Thanks in advance.

PD: The car I'm using is the FOX
jason_lfs
S2 licensed
Quote from UnknownMaster21 :And the acc name is?

stolen
jason_lfs
S2 licensed
I suppose Hamilton's penalty was for this http://www.youtube.com/watch?v=L61_AevsjMs
jason_lfs
S2 licensed
no hubo carrera?
FGED GREDG RDFGDR GSFDG