The online racing simulator
Searching in All forums
(191 results)
avetere
S3 licensed
Quote from JackCY :just don't use PHP for desktop applications

Who said, it was for a desktop app?
avetere
S3 licensed
Yeah, that was it, thanks! ... A little to obvious to see it ...
avetere
S3 licensed
Quote from yankman :The values, you have been posted, are wrong, the manual is right.

Well, I don't claim to be right ... I'd just like to know, where the difference comes from

Quote :Edit: What happens if you replace 65535 with 65535.0 ?

same thing, no differences (apart from the fact, that I divide by 65536 --> (1 metre = 65536)) I tried 65535 though, with no relevant diffs ...
Quote :Edit: I think I see the problem ... you applied the converion to meter (/655535) very early, which causes the difference in values, apply the conversion as last operation to the overall length and you get the same values as written in the manual.

nope ... tried that before, makes no difference ...


the overall technique can't be to wrong though, as results for FE6 are exactly the same
avetere
S3 licensed
Quote from CasseBent :There's no mustang in LFS, as such I seriously doubt you've seen it.

Might have been good old XRG ... http://www.lfsforum.net/showthread.php?t=25992
avetere
S3 licensed
:haha: ... well, I'm quite sure, that's not the most elegant way to do it ...
avetere
S3 licensed
That's been also my first guess, so I double-checked that.
Well ... here's the code I used:

<?php 
foreach($pthdata as $id => $point) {
    if(isset(
$pthdata[$id+1])) {
        
$dx2 pow(($pthdata[$id+1][centreX] - $pthdata[$id][centreX])/65536,2);
        
$dy2 pow(($pthdata[$id+1][centreY] - $pthdata[$id][centreY])/65536,2);
        
$ds += sqrt($dx2 $dy2);
    }
    elseif(!isset(
$pthdata[$id+1])) {
    
$dx2 pow(($pthdata[0][centreX] - $pthdata[$id][centreX])/65536,2);
    
$dy2 pow(($pthdata[0][centreY] - $pthdata[$id][centreY])/65536,2);
    
$ds += sqrt($dx2 $dy2);
    }
}
?>

Where obviously $pthdata is the array containing all nodes ... and $ds is the total distance
avetere
S3 licensed
Well, that's exactly, what I did ... perhaps those 2m-differences are due to some minor track-updates!?!

Now the interesting question is:
What is the best way to calculate it? Ideal-line or middle of track?
Any ideas, how this is done in real life?

Well, here's a small comparison between your data and mine (bold) ... as stated above, the maximum diff is 6m ... maybe we should nevertheless consider ekich are the better values and keep the manual up to date

BL1 3.307 km (2.055 mi) 3.305 km (2.054 mi)
BL2 1.839 km (1.143mi) 1.836 km (1.141 mi)
SO1 2.033 km (1.263 mi) 2.031 km (1.262 mi)
SO2 2.048 km (1.273 mi) 2.047 km (1.272 mi)
SO3 1.334 km (0.829 mi) 1.334 km (0.828 mi)
SO4 4.029 km (2.504 mi) 4.027 km (2.502 mi)
SO5 3.146 km (1.955 mi) 3.143 km (1.953 mi)
SO6 2.917 km (1.813 mi) 2.915 km (1.811 mi)

FE1 1.584 km (0.984 mi) 1.583 km (0.984 mi)
FE2 3.086 km (1.918 mi) 3.086 km (1.917 mi)
FE3 3.514 km (2.183 mi) 3.513 km (2.183 mi)
FE4 6.559 km (4.076 mi) 6.557 km (4.075 mi)
FE5 2.018 km (1.254 mi) 2.017 km (1.253 mi)
FE6 0.745 km (0.463 mi) 0.745 km (0.463 mi)

KY1 2.980 km (1.852 mi) 2.979 km (1.851 mi)
KY2 5.138 km (3.193 mi) 5.137 km (3.192 mi)
KY3 7.377 km (4.584 mi) 7.376 km (4.583 mi)

WE1 5.180 km (3.219 mi) 5.178 km (3.218 mi)

AS1 1.870 km (1.162 mi) 1.868 km (1.161 mi)
AS2 3.077 km (1.912 mi) 3.076 km (1.912 mi)
AS3 5.602 km (3.481 mi) 5.599 km (3.479 mi)
AS4 8.089 km (5.026 mi) 8.083 km (5.023 mi)
AS5 8.802 km (5.469 mi) 8.798 km (5.467 mi)
AS6 8.002 km (4.972 mi) 7.998 km (4.970 mi)
AS7 5.168 km (3.211 mi) 5.164 km (3.209 mi)
Last edited by avetere, . Reason : just added some data :)
avetere
S3 licensed
Quote from Aid :Hi
I wonder if somebody has some experience with MPR file. What i need is location of currenty used tire type of user. What i would like to do is to check how many laps driver did on certain tire compound. In game we can check what tire driver uses so this info is in MPR but i can't find it. Does somebody know where such data is kept?

You cannot get the info, which type a car began racing, so the aproach from reading a mpr-file will not succeed, thus you'll have to do it via insim, I'm afraid.
But there is info as of which tyre-type was changed to (if changed) during a pitstop ... if that's of any use to you ... you find that info inside the pitstop-event (where the work which is done is given) ... tyretypes are the same as stated in INSIM.txt there ...
A little question on track-lengths
avetere
S3 licensed
Hi there!

I'm currently doing some experiments with pth-fileformat.
Doing so I came along one fact, that is quite ... irritating ...
I calculated the tracklength given in pth-files by simply adding up distances between the single points (which - if I'm not wrong - should be some sort of ideal-line).
This result differs from the tracklengths given in the english manual (the only one that seems to have values in metres) (http://en.lfsmanual.net/wiki/Tracks) by something between 2 and 4 metres, where "my" result seems to be always the smaller one.
Whereas, if I calculate the length using the middle of the track, I get values which are way to high.
Example: FE4:
idleal-line: 6557.3m
middle of track: 6622.0m
manual: 6559m

So ... the following questions should be obvious:
Where do the values in the manual come from?
How where they calculated?
Which ones are correct?
What values are used ingame/at lfsw?
avetere
S3 licensed
Quote from filur :
I wanted to get the color from the array directly in the regex, not using "col(n);", but i can't make PHP like back references as array keys.

Just gave it a try ... and it works when you change " an ' in the replace-part, thus giving:

<?php 
$name 
"^1(E^7AGL^4E)^7Dygear";
$colors = array('000000','ff0000','05fd05','ffff00','0000ff','ff00ff','00ffff','ffffff','cccccc');
echo 
preg_replace("/\^([0-8])(.[^\^]*)/e",'"<font color=\"#".$colors[\\1]."\">\\2</font>"',$name);
?>

(Just included #000000 as color 0 and #cccccc as default ...)
Last edited by avetere, .
Possible issue with pb/pst-stats from lfsw?
avetere
S3 licensed
Hi there!

I'm currently working on a little script, providing information on track/car usage of a racer. Quite similar to Laps Chart at Online Racer Stats on lfsw but ... well ... a little different.

So far, so good ... everything works fine exept for travelled distance ...
As you can see on the image attached, lapcount of either track (yellow) and total lapcount (green) are correct.
But there are differences in the total travelled distance (red). These value are always much larges, looking at pst-stats (or lfsw as done here).
By the time I figuered out, that for total travelled distance (as obviously for fuel consumption) even unfinished laps are added. Be that good or bad, there doesn't seem to be a chance to correct these values ... so let's go on to the next issue:

As marked yellow, there is even a difference between my values an those shon on Laps Chart on lfsw.
The interesting thing is: In contrast to the facts stated above, it occurs, that my values are sometimes a little larger than those on lfsw. This seems quite strange to me, as I doublechecked everything to exclude typos or math-errors.
My only explanation is, what I'll put into this thread's question:
As I used tracklengths from the english wiki to calculate the travelled distance: How accurate are those values?
And where could I possibly find better ones?
avetere
S3 licensed
Apart the fact, that those two archives aren't identical (EN contains some more files than PT) ... I'm afraid, that there is a whole bunch of files missing! Nearly every file that is referenced is not present in the archives ... maybe those where present in the beta and the files posted now are only those, that have been changed or added?
However, you might want to check that and release an archive that contains all files, as many people around might not have loaded the old ones (such as me)
"Rewind"-Button for Replay-Analyzer (LfSW-one)
avetere
S3 licensed
Well ... I didn't really know, how to name it, but last time I used the LfSW-Replay-Analyzer I encountered, there is no option to "switch back" to the start. So in case, You have done with one combo and want to switch car or track, you have to reload the whole thing and begin from scratch.

Though it isn't a big thing to reload that page it would be more comfortable if you could simply hit a "back-button" or even pick car and track from a dropdown-menu.

Nothing special, but it would be nice, if that was possible.


Oh and one other thing:
On the new race-details page (which I find great!) it would be tremendous, if the laptime-graph would adapt width (and height) according to the width of the window, so that maximising the window would enlarge the graph ... and perhaps you could exclude lap 1 from it (or let the graph run out of border), so that you get more detail on the following laps (which normally are faster than the first one) ...
avetere
S3 licensed
Quote from Victor :hmm i need to think about that one.

Exactly, what I expected to hear/read
wrong "last race information" when doing a race with takeover
avetere
S3 licensed
Hi there!

Don't really know if this is bug or a feature, but today I realized some issues with last race information on lfsworld:

I did a longer race yesterday, including takeovers by my teammate. Well, no problem this far.

But when I checked today on lfsworld, I recognized, that this race is not refered to as last race (my teammate finished the race, whereas I began it).
Going to the details-page then, the race is listed, but the verall result is quite ... weird ... instead of place 15 (which is correctly stated on race-details) it sais place 24 of 24 ...

Rest of race-details is absolutely correct so I assume, that there simply is an issue with a driver not personally completing the race ...

In case you want to check, what I'm talking about:
I attached an image with the relevant data marked in red ...


EDIT:
Forgot to say: His last-race-info is correct, it's only mine that's errorous
Last edited by avetere, .
avetere
S3 licensed
Quote from Xenix74 :
Hate people who drive with Pedals and mouse or such thinks.

Just for curiosity:
In which way should that be an advantage or even a cheat?!
avetere
S3 licensed
Done that alternative GUI. Now app starts in tabbed view by default, ful view can however be selected.
Minor issue: loaded setups are not loaded upon form-change (yet).

I didn't include thar relative defference yet, though ... still have to evaluate where to put them

see first post for updates zip-file ...
avetere
S3 licensed
*gg* thanks ... that huge form is the thing I am also unhappy about ...
those relative differences are a nice idea! I'm afraid they won't fit in the actual form though.
But I#m currently working on an alternative form using a tabbed layout ... maybe there they would fit well
avetere
S3 licensed
Quote from mkinnov8 :HOne Suggestion if I may, adding some scrollbar's may help

good point ... I even had them in but temporarily killed them for testing purposes ... seems I forgot to reinclude them ...
will be done in next ver.
Win-Version added
avetere
S3 licensed
As of Dygear's point I decided to try to make a windows-version of that script.
Though this is my very first exe I'm quite happy with it so far ...

You'll find detail here:
http://www.lfsforum.net/showthread.php?t=41953
SetComp - Comparing Setups
avetere
S3 licensed
Hi folks!

Some of You may have noticed the other thread over here:
http://www.lfsforum.net/showthread.php?t=41804
that concerns a php-script I made for comparing (+ editing and saving) setups.

Well, You might be interested in the windows-exe-version I made out of that.

What it does:
- shows any relevant data for the chosen setup (only data supported by the car and currently selected)
- once loaded any setup may be changed and saved with the changed values
- Two setups can be loaded one beneath another, though making it easy to compare both.

Though it seems to work quite well, there may of course be some bugs as this is the very first Windows-prog I've ever made

UPDATED zip-file (v0.55) here:
http://jallaland.de/uploads/SetComp_0.55.zip

Anything should be self-explaining, if not, feel free to ask!

I'll appreciate any feedback and bugreport


greetings,
avetere

--------------------------
Changelog:

v0.55 (20.04.2008)

added features:
- tabbed view as default
- ico for exe-file

changes:
- alteres view for gear ration in full view

fixes:
minor typos


#############################
v0.5 (18.04.2008)

initial release
Last edited by avetere, .
avetere
S3 licensed
Well ... a little update:
As it was requested by mkinnov8, I made an alternative script, that does not throw value and that won't allow You to change or save any values, but that simply compares two setups and gives You an "OK", if all relevant data (the values supported by that car (the higher gears or wings for example) AND currently selected (visco-torque, whwn locked diff is selected for example)) are the same.
If there are differences on relevant data, that values will be "put out" (Is it called like that in english?!?) to give a "short" summary.

Might be a nice feature for some race-admins who would like to check for equal setups of all racers ...

Here's the link:
http://en.jallaland.de/setcomp2.php

There might still be some translation issues ... feel free to give me a notice
Last edited by avetere, .
avetere
S3 licensed
Quote from Dygear :Cool, but I could see this as a place to farm setups.

You mean, it could be misused to "steal" setups?
Hm ... probably true, though I didn't even think of that possibility ...
Well, the only thing I can say is to assure You, that this is not done nor planned (neither data nor setupfile are stored on the server)
(Wouldn't be to usefull either, as there is no indicator of an uploaded setup being good or not ...)
comparing setups (php-script)
avetere
S3 licensed
Hi folks!

Did You ever want to simply compare two setups and did You ever complain about the fact that You always have to switch around to see any different values?
Well, I did and out of that I started a script, that made it possible to compare, alter and re-save any two setups without the need to lauch LfS and to switch around setup-menus.
It's still not finished - Mr. error is everywhere - , but it has reached a stage at which I would like You to "beta-test" it

I'll be pleased to hear any fedback and fair comment (perhaps even concerning general design) and - of course - bugreport.

You'll find the script here:
http://en.jallaland.de/setcomp.php
(And for those capable of german language:
http://jallaland.de/setcomp.php)

A short comment on handling (though it should be self-explaining):
At the top You can upload two setup-files (one left an one on the right). This done, the data contained will be given by two adjacent tables.
The clou:
You can alter the table either using direct text-input or a slider underneath the text-field (or a dropdown.box where suitable).
Once a slider is activated You can even fine-tune the values using the arrow-keys (usefull for short sliders where using the mouse might not be accurate).
At the very bottom You will find a save-button for each setup.
Clicked it will result in the relevant setup being downloaded with the newly set values.

Known bugs:
- No values for brakestrength and gear ratios when watched in IE
- reading a "RACE_S"-setup may result in wrong values for "added mass position" and "clutch preload" -> This seems to be an issue of altered LfS-behaviour

hoping for feedback and bugreports,
avetere

EDIT:
exe-version added here:
http://www.lfsforum.net/showthread.php?t=41953
Last edited by avetere, . Reason : update
vcom on a unix-machine?
avetere
S3 licensed
Hi there!

I was wondering, whether vcom would run under a unix environment (using wine) as i would like to run it on a unix-host.
Didn't manage to get it to work though ...
FGED GREDG RDFGDR GSFDG