• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

W.I.P. UDP format update ?

vthinsel

New Member
Hello,

I'm currently developing a plugin for SimTools (for motion and dashboard), using the UDP referece coming from this thread: http://assettocorsamods.net/threads/doc-ac-udp-remote-telemetry.60/
I have implemented the handshake succesfully, but I'm now a bit stuck at decoding the UDP payload.
From the above document, I calculated a packet size of 323 bytes. You can check it here, in case I made a mistake: https://docs.google.com/spreadsheets/d/1UTgeE7vbnGIzDz-URRk2eBIPc_LR1vWcZklp7xD9N0Y/edit?usp=sharing

All packets I receive are 328 bytes large. (floats and ints are assumed to be 32 bits, little endian, what about bool ?)
By changing offsets I managed to get a couple of values, but with high uncertainty.
Has there been updates recently on the UDP structure ?
I'm running on PS4.
Thanks for your comments !
 

vthinsel

New Member
I have been able to sort out RPM, and went from that one up and down. The only strange thing is that I have extra bytes around the bool values. But I have all I need for motion, at least the G forces.
What is terribly missing in the data is the yaw/pitch/roll values. Those one are a big lack for motion. Any chance we get them in a future update ?

Thanks.
 

luchian

Administrator
Staff member
I wish I knew..
However, I tend to think that developers are listening, and should these values be available somewhere, they could be surfaced. Maybe try a suggestion on official forums.

In the same time, isn't it possible to calculate them (approximately) based on G-forces ?
 

Mr Whippy

Active Member
Ah yes of course, sorry :(

I hope you have some luck accessing these values if it's designed to be able to let you. If not, I hope you can get KS to add them in.

Though I do wonder if they have commerical/sim lisences and the overlap/capabilities of AC would be too close to the sim users capabilities if they offered too much within AC.
I know even in sim-land people might still use game versions of things to do pro-level work, even though in the T&Cs it says otherwise :)
 

luchian

Administrator
Staff member
On PS4, this is not an option unfortunately
I don't have a modern console, so may I ask: can you use mods on Consoles ?? (for Assetto Corsa in particular I mean)

Sent from my phone using Tapatalk
 

cercata

Member
I don't have a modern console, so may I ask: can you use mods on Consoles ?? (for Assetto Corsa in particular I mean)
Consoles are closed gardens, everything you run there must be cryptographically signed, and I think only Sony/Microsoft can sign content

The program (Assetto for example) is already signed, and it can load "content/code" from the cloud for example, so mods that are not a separate process are technically posible.

But they can add exploits, and if you do that on your Game, you'll have problems with Sony/Microsoft.

As far as I know, Fallout 4 is the first console game to allow mods, but you need to submit them to Bethesda, and if they validate it, they publish it to the game.

If kunos is really interested, they could do something similar with Assetto, that would be great.
 

cercata

Member
I'm currently developing a plugin for SimTools (for motion and dashboard), using the UDP referece coming from this thread: http://assettocorsamods.net/threads/doc-ac-udp-remote-telemetry.60/
I have implemented the handshake succesfully, but I'm now a bit stuck at decoding the UDP payload.
I've seen that the new version of the protocol (4), is quite different:

https://github.com/joaoubaldo/acudpclient/tree/master/acudpclient
https://github.com/mathiasuk/ac-pserver

I hope they don't break compatibility with your plugin with future updates, but it seems the console version is based in some old code of version 1, very different

Or maybe they have several servers in diferent ports ?
 
Last edited:

Mr Whippy

Active Member
I know this isn't a helpful addition for vthinsel, but why exactly are you making this plugin for PS4 rather than just running a PC version?
Don't you need a PC to run the software for telemetry readouts in the first place?


Maybe there is a use case and I'm not familiar enough with the gear needed etc, but I'm interested in why you'd do this unless you 'just wanted to'

Ie, I know teams who've gone with a PS4 and forgone all moddability and flexibility just to save a few hundred quid on setup... assuming they'll never need/want more.
Is this a case of being stuck on PS4 for budget reasons, because it could easily be cheaper (depending on your time costs) to just go for a PC version and have huge flexibility/future proof etc etc?!
 

cercata

Member
Last edited:

vthinsel

New Member
Hello.
He's making a comercial product, so the more customers he can reach, the better.

I guess you don't need a PC, the embedded hardware (arduino, etc) that makes the motion control of the RIG will read directly the UDP stream

https://www.xsimulator.net/simtools-motion-simulator-software/
Actually, this is wrong. I do not any money with my plugins or arduino dashboards. I'm not a simtools developper. The plugin also requires a PC.
On the console question, well, I already spend 8 hours a day on a PC. When I get home and want to play for 30 minutes, I want to play without delay. No windows update, driver update,game update, crash update,... PC has advantages over consoles, for sure, but so far console is fine with me.
More and more games support UDP on consoles, and some with handshakes like AC. UDP has strong advantages over memory dumping, so this is why my plugins are UDP based, for both consoles and PC. Trying to harmonize the two worlds... so they are on par regarding motion/dashboards.When I develop plugins I try to validate it on PC also using free/demo versions

Cheers,
Vincent
 

cercata

Member
Actually, this is wrong. I do not any money with my plugins or arduino dashboards. I'm not a simtools developper. The plugin also requires a PC.
Sorry for the misunderstanding ...

On the console question, well, I already spend 8 hours a day on a PC. When I get home and want to play for 30 minutes, I want to play without delay. No windows update, driver update,game update, crash update,... PC has advantages over consoles, for sure, but so far console is fine with me.
I totally understand you, I've been like that for the last 15 years !!!! :lol:
Now I'm back to PC, I don't know until when ...
 

bradleyland

New Member
@vthinsel it sounds like you figured out the UDP layout, but I wanted to post my solution here, so that anyone else looking might benefit from our exploration. I also noticed the extra bytes, which was extremely confusing for a couple of hours.

I used a Ruby library called BinData to read the UDP stream into usable data structures within Ruby. This won't be of much use to you directly, but because I'm 100% certain that this is a working implementation, it should be much easier to port to other languages.

My RTCarInfo payload reader is here:

https://github.com/bradland/ac_telemetry/blob/b1f434f8027e40fab239101b7127d907da7074bd/lib/ac_telemetry/bin_formats/rt_car_info.rb

BinData records use a declarative format, so starting at the top, endian is just a global setting (which I've sloppily repeated elsewhere, whoops), and everything after that is part of the payload. The primitives (string, int8, int32le, etc) are all based on common C implementations of the same, but there are some inconsistencies between implementations, so the following reference will be helpful:

https://github.com/dmendel/bindata/wiki/PrimitiveTypes

I've tried to document as much as I could within the class definition. If you have discovered any additional information about the values output by AC, I'd love to incorporate it!
 
Top