Would be great if you could make the library up-to-date. I've checked what has to be changed, and mainly it's threaded timers, but I'm not sure what everything does, so I'll have to take a closer look at it.
It looks to be more than just the timers, here's a report from the portability analyser, looks like everything with an X in the .NET Core column would need changed.
I'll look into what can be fixed, but I can't promise anything, I'm not prepared to sink a lot of time into this to be honest.
Hey I want to simply be able to get the datas (ax,ay,az,vx,vy,vz and etc.) from LFS but I have no idea how to do it...
Can someone help me please?
where should I write a code and where should I get started to finally be able to write the code...
I've been struggling about 16 hours between these forums LFS programming manual INsim and Outsim but I wasn't able to connect to LFS nor with outsim nor with insim and I really want to do it...
where should I start what should I read/learn please help me please
It sounds like what you need is OutSim. What is your programming background? Helper libraries like InSim.NET take care of the communication, all you have to do is process the received packets. Did you not see this sample code? (https://github.com/alexmcbride/insimdotnet#outgauge--outsim)
Thanks for your answer My programming is so basic not so good at all, do you have any suggestions so that I can become something like you guys in future?
and I tried the codes I only can get the headings, RPM and vector things doesn't work because I think C# cannot writeline vectors so I don't know what to do about that.
I have two other questions anyways:
1) I've tried the outsim code for python which is written here : http://en.lfsmanual.net/wiki/OutSim_/_OutGauge
It seems that the code is running but no data will come to there (cfg.text is correct), do you know what is going on? It will be awesome if I can get all the values from the game.
2) I want to decode a UDP packet sent from a micro autobox in a car to send it to a motion simulator seat. Any suggestions about that??
It has nothing to do with these right???
Is it easy to do it with wireshark?
Sorry for all the questions it will be so good if you can answer them somehow...
Regards,
Parsa
What exactly does that mean? What language(s) do you have some experience with? Do you know at least the basics of network communication?
If you are sure you have OutSim and OutGauge enabled, you also should notice that the sample code does not display the received data anywhere. It only reads the raw data from the received packet and stores it in individual variables.
Thanks this helped a lot but I don't know why even before moving none of the velocity vectors are literally zero they are all something like 0089384 and they are changing isn't that wrong?
Ummm I know MATLAB and a bit of Vb,Vb.net and C. I think I know the basics of network communication.
So how can I get the values of the stored variables?
Is it possible to see them with wireshark?
I tried to track the packets with wireshark but I was not able to do it so I'm trying to find something (some video or whatever) about how to track UDP packets with wireshark or whatever to be able to do it.
Good. If you know C you can find a fully working OutGauge code right on the forum. It will also spare you the trouble of converting the raw packet format to something processable in VB.
Yeah I did thanks, but after some printing it gives an error: unpack requires a string argument of length 64 :/
It didn't happen before without printings so I don't know I have no idea why it gives it do you know ?
# Unpack the data.
outsim_pack = struct.unpack('I12f3i', data)
time = outsim_pack[0]
angvel = [outsim_pack[1], outsim_pack[2], outsim_pack[3]]
header = outsim_pack[4]
pitch = outsim_pack[5]
roll = outsim_pack[6]
accel = [outsim_pack[7], outsim_pack[8], outsim_pack[9]]
vel = [outsim_pack[10], outsim_pack[11], outsim_pack[12]]
pos = [outsim_pack[13], outsim_pack[14], outsim_pack[15]]
print "udp received"
#print "time is ", time
#print "angvel is ", angvel
#print "header is ", header
#print "pitch is ", pitch
#print "roll is ", roll
#print accel
print "vel is ", vel
#print "pos is ", pos
# Release the socket.
sock.close()
It actually was so much better but now it just gives one "udp received":/
It used to give like 30, 40 or something...
And is there a way to tell the time between each time it prints or gets the packet?
The code you posted lost indentation so it's impossible to tell what happens in the while loop. The OutSim packet has the a "Time" field, use that to get time deltas.
The NPL occurs after a player joins a race or rejoins from pits. At this moment the car is already choosen from the player. You can't change it by setting another value to the NPL.Cname property. The property would only affect your own code in your InSim but not LfS at all.
At the end it looks to me, you have the idea to get the licensed cars for free. There may be ways to success but you will struggle with InSim.
You are using two totally different things. First you're using the NPL from InSim.net. This is only a notification from LfS to your InSim. It says a new player has joined the race or whatever. In your case the player may have joined with the XFG. It doesn't matter what you do in your InSim. LfS still knows, the player has choosen the XFG.
Now, you want to have a VWS in you InSim. From the sight of LfS this is a XFG with additional intake and weight. This is what you can read from the NPL. But then you'll have to save the information to another object. This could be a copy from the original NPL or a player object.
I don't know your InSim-Code but the C.Cars == "VWS" looks suspicious to me.
At least you only need another variable to store the information which "virtual" car a player has choosen. It is still senseless to store this information in the NPL.Cname property.
Add XFG suction and weight and tweak to make and maintain vws
Tweak xfg & xrg to make the actual vehicle settings will be xfg and xrg in appearance, but the internal properties are tweaked to the actual tool.