The online racing simulator
Searching in All forums
(7 results)
Beau
S2 licensed
Holy crap was LFS easy to get info out of. I'm surprised!!.

Already i've written a windows app that will let me get the RPM, speed (converted to km/h), and X,Y,Z accelerations.

Now if and when my damn servos come, i should be able to create something interesting .

Thanks mate
Beau
S2 licensed
ahh well the init via insim, was surprisingly simple (after glancing through your examples).

So to me it really doesn't matter either way. But it's already going now....


as i was typing i fixed the problem with my debugger, upon that i relized that i was printing FLOATS as ints.

%f fixed it.... I win the stupidest error award lol.


But on that, is there anyway i can check to see if i'm recieving a OutGaugePack struct?. Because of the typecasting on memory locations, i'm a tad worried that i could possibly get something else through that port, resulting in gibberish and a crash...
Beau
S2 licensed
Okay i have some code hopefully someone can help me with.

It's going like this, i can connect to Insim (port 29999), setup Outgauge on port 30000 (if it's on 29999, Insim captures it all with red warning writing).

I'm farily sure it seems to be working. It's just i'm not sure how to recieve UDP properly? and check that it's an OutgaugePack packet.

(what seems to happen is i treat everything as an outgaugepack, it sends something weird, then i'm trying to print something stupid on screen.)

here's the part that causes problems.

RecvAddr.sin_port = htons(30000);
bind(RecvSocket, (SOCKADDR *) &RecvAddr, sizeof(RecvAddr));


while ( quit==false){
printf("Settingmem...\n");
memset(&outgauge, 0, sizeof(struct OutGaugePack));
printf("Recieving...\n");
recvfrom(RecvSocket, (char *)&outgauge, sizeof(struct OutGaugePack), 0, (SOCKADDR *)&SenderAddr, &SenderAddrSize);
printf("Recieving2...\n");
if(outgauge.Speed!=NULL){
//TODO:if quit bail
printf("Speed: %n \n",outgauge.Speed);
}

i get recieving2 printed then caplunk . it happens the exact same way without my hacky null check.
Beau
S2 licensed
For all those who don't wish to use Code::Blocks. (eg. me who for reasons beyond my control, must use VC++ for a different project).
For VC++2008 Express. Do this to make it run.

Create an empty console application. Create the header/main files, and copy the code in.

IMPORTANT: it doesn't work if the file is named main.c. IT MUST be named main.cpp, It seems to be a bug(with VC++), but i was frustrated for 30 minutes figuring it out.

Then you need to link against the wsock32.lib.
To do this,

Project->Properties..
Configuartion Properties->Linker->Input-> Additional Dependencies
Put the path to wsock32.lib in there.

Now it should compile. Hooray. . Hopefully this helps people like me, who haven't learnt winsock programming, but just want to tinker.
Programming LFS, outgauge? outsim?
Beau
S2 licensed
Howdy.

Just curious as to where i should begin in making a plugin/ something that can get data out of LFS.

For starters i think i'd just like to get out the speed/tacho information. Then i can send it down to a uC via serial.

Micro side i can do, LFS side i'm not sure where to begin.

My best language is C/C++ so hopefully i can do it in that. Any links/guides etc? on how i grab the info i need?
Beau
S2 licensed
The moving the wheel full lock both ways seemed to have fixed it.

Weird, but i'll take it, i can drive in straight lines with ease again haha.



Swear it was like the whole track was a corrugated dirt one before :P.

Thanks guys.
g25 wobble?
Beau
S2 licensed
Is there any major physics or driver differences between LFS .5V and .5X10?

It's just i seem to get major differences in the wobble.

In .5V it barely exists. I played this for awhile before going to .5X10 and i didn't know about the wobble issue. Once aware of it, i discovered i could flick the wheel on purpose and make it appear, but it was easily stopped with one hand.

In .5X10 it pretty much has made the wheel useless. Its not fun. The whole desk shakes like crazy, and there is no way you can completly stop it with one hand.

What confuses me is the same settings in the profiler and inside the game.

I've even tried tweaking the hell out of .5X10 and i can't get the wobble out or at least down to how it was in .5V.

Makes me wonder what's been added or changed?, or have i just fluked something really weird.
FGED GREDG RDFGDR GSFDG