The online racing simulator
#1 - J@tko
Question/request about speed
Hi programmers.

I'm looking for a little insim programme for the upcoming Kyoto 250 and 500.

I'd like lap times displayed as a speed rather than a lap time, as it makes it more realistic. Can you program insim to take each lap time, then divide 1.9 (oval length) by the lap time, then multiply it by 3600 to give the lap in mph?

Is this easy to do/impossible or what?

If it's not too much, would someone do this for me? I'd be glad to give credit on the credits and you could also release it to the community as a useful tool.

Thanks

J@tko
Sounds easy to program but the maths to get the MPH in speed is what freaks me out.
#3 - J@tko
Quote from mcgas001 :Sounds easy to program but the maths to get the MPH in speed is what freaks me out.

Speed = distance / time

Here we have the distance in miles, and the speed in seconds, e.g 1.9 miles in 41 secs. 1.9/41 = 0.046341463 miles per second. There are 3600 seconds in an hour, so we times by this to get the speed in mph - 166.82 mph.

Now i've done the maths - you do the insim
LOL, give me a little while ill see what i can snap together
#5 - J@tko
Quote from mcgas001 :LOL, give me a little while ill see what i can snap together

Cheers (and please add it to the server whilst your at it )

What's the server called and is it online all the time?
I actually recently added this functionality to the in development version of LFSPoints. I took the track lengths from here, and used this simple algorithm:


double avgSpeed = (trackLength / (lapTotalMilliseconds / 1000)) * 3600;

I've not had time to check it to make sure it's exactly right, but it seems to work well enough. I've no idea when LFSPoints V2.3 Final will be released though, it's a bit of a mess right now and I don't have the energy to finish it.
Quote from DarkTimes :I actually recently added this functionality to the in development version of LFSPoints. I took the track lengths from here, and used this simple algorithm:


double aveMph = (trackLength / (lapTotalMilliseconds / 1000)) * 3600;

I've not had time to check it to make sure it's exactly right, but it seems to work well enough. I've no idea when LFSPoints V2.3 Final will be released though, it's a bit of a mess right now and I don't have the energy to finish it.

Heh works well, This program is almost done already
#8 - J@tko
Quote from DarkTimes :...

I'm asking Victor if he has any 'more exact' lengths for the oval, as it currently says 1.9 miles, but that could be anywhere between 1.85 miles (gives 161 mph on a 41 sec lap) and 1.94 (gives 171 mph on a 41 sec lap)

BTW, thanks for the LFS Points, I'm using it for the LFS BC. Perfect lazy man's tool
Quote from J@tko :I'm asking Victor if he has any 'more exact' lengths for the oval, as it currently says 1.9 miles, but that could be anywhere between 1.85 miles (gives 161 mph on a 41 sec lap) and 1.94 (gives 171 mph on a 41 sec lap)

BTW, thanks for the LFS Points, I'm using it for the LFS BC. Perfect lazy man's tool

I could get that myself?, All i gotta do is check between every X,Y save it up for a lap, then Convert it too miles at the end?
Quote from mcgas001 :I could get that myself?, All i gotta do is check between every X,Y save it up for a lap, then Convert it too miles at the end?

I presume your talking some insim talk I don't understand.

If so - then do it. The more accurate the better.

Even better, could you calculate how far the car travels in the lap to get it really accurate?

Or is that not possible?

/me is a programming noob
Yep, i could make it save the distance from 1 lap to the next, then give a lap time based on that, if you wish?
Quote from mcgas001 :Yep, i could make it save the distance from 1 lap to the next, then give a lap time based on that, if you wish?

How accurate would that be? yard? inch? (insert whatever's below an inch!)

If so, then go for it!

The more accurate the better!
Im not sure what the insim X,Y is by default, but i would work it out in meters, the convert it to miles...if that helps

ill make a test and see what the results are...
Quote from mcgas001 :Im not sure what the insim X,Y is by default, but i would work it out in meters, the convert it to miles...if that helps

ill make a test and see what the results are...

Thanks
But wouldn't it depend on the driver's line into the corners?
Quote from dougie-lampkin :But wouldn't it depend on the driver's line into the corners?

Yes, that's why I wanted it to work out the distance travelled on each lap.
Quote from J@tko :Yes, that's why I wanted it to work out the distance travelled on each lap.

But the distance travelled depends on the line doesn't it? If you drive along the inside, you will do maybe 400 metres less than a driver on the outside of the track...which would affect speed by 5-10mph i suppose...
Quote from dougie-lampkin :But the distance travelled depends on the line doesn't it? If you drive along the inside, you will do maybe 400 metres less than a driver on the outside of the track...which would affect speed by 5-10mph i suppose...

I mean like for the insim to work out the distance car x travelled between crossing the line for the start of one lap and the start of the next one.
Ah, sorry, I though you were trying to work out what the length of the track was, and using that...ignore my posts then
Quote from dougie-lampkin :Ah, sorry, I though you were trying to work out what the length of the track was, and using that...ignore my posts then

NP. That was my original thought, but then I thought what you thought, and my I thought that my original thought was not as good as the thought I subsequently came up with that happenned to be the same as your thought.

I think.
Quote from J@tko :NP. That was my original thought, but then I thought what you thought, and my I thought that my original thought was not as good as the thought I subsequently came up with that happenned to be the same as your thought.

I think.

Proves I'm 5 minutes slower than the rest of the population...
Well I'd imagine that the actual distance a car travels will not differ too much between different drivers, probably not more than a few meters per lap, which is pretty trivial. I'd take a guess that in 'proper' oval racing they do not messure the exact distance a car travels when working out the speed, but just have the length of the track as a constant.

Edit: Incidentally, I'd be extremely grateful if someone could provide me with more accurate track lengths.
Quote from DarkTimes :Edit: Incidentally, I'd be extremely grateful if someone could provide me with more accurate track lengths.

I asked Victor here what the length of the Oval was. See what he says back.
OK cool. The idea of doing a lap on the speed-limiter is quite clever, but I don't want to do that for every combo... Ooh, that idea makes my head hurt...
Quote from DarkTimes :OK cool. The idea of doing a lap on the speed-limiter is quite clever, but I don't want to do that for every combo... Ooh, that idea makes my head hurt...

DarkTimes, have a break. you helped me before, ill try get you Excat distances for every track
1

FGED GREDG RDFGDR GSFDG