Page 1 of 1

ETS2 coordinate system?

Posted: 24 Sep 2017 19:59
by RootlessAgrarian
I've had no luck getting an answer over at SCS yet, wondering if someone here can spare a moment to write a couple of lines explaining the ETS2 coord system. I'm starting to play with the telemetry SDK (under OSX, probably I'm the first on my block) and now that I can extract XYZ coordinates I'm wondering how to interpret them.

Is it in in-game metres? Can it be mapped (via local scale) to real-world metres?

Where should I have looked this up? is there a url for basic "how ETS2 works" info, a sort of reference guide for modders?

Re: ETS2 coordinate system?

Posted: 24 Sep 2017 21:57
by Koen
You might very well be the first to work on it on macOS, congratulations on that :)

It is indeed in-game metres. You can probably calculate the scale with real life, though it should be roughly 1:19, 1:15 (in the UK) or 1:3 (in cities).
If you're interested in a list of all cities and their respective coordinates: https://github.com/Koenvh1/ETS2-City-Co ... -Retriever (the tools to get them are Windows only though)

Re: ETS2 coordinate system?

Posted: 24 Sep 2017 23:46
by MandelSoft
Yes. The in-game co-ordinate system is based upon meters. So, the X;Y;Z co-ordinates correspond to the number of meters from the origin of the map in each direction. The origin is somewhere south-west of Erfurt at sector +0000+0000.

Re: ETS2 coordinate system?

Posted: 25 Sep 2017 00:23
by RootlessAgrarian
It looks like one of the telemetry values available from the game is local_scale, i.e. what the scale is where you are at present. so the game-metres to IRL-metres calculation is a little iffy when crossing a scale border, but once you're inside a scaled area it should be fairly straightforward.

one thing I'm still curious about is the Z coord. it seems to be absolute elevation, so I'm now looking for the telemetry for local ground level, i.e. the terrain surface. the obvious answer is "it's the truck Z position" -- if the truck is, say, 1200 game-metres above sea level, surely that is where the ground is? not that it matters really, but I wonder if the truck elevation is located at the bottom of the tyres where they contact the terrain, or at the 3d centroid of the truck, or... ? and what if the truck is falling off a cliff? how would you know it was falling (other than a very steep downtrend in Z!) unless you knew where local ground level (directly below truck position) is?

(edit) there is a telemetry param "wheels on ground" (boolean) which I suppose tells us whether the truck is still on the terrain, but still doesn't tell us where the terrain is relative to the truck.

the SDK interface is formal/abstracted (objecty) and so (for simple minded proceduralist me) slow going, but when I've actually achieved anything I'll make it available. my goal is a generic UDP telemetry server using keyword/value request/response via udp datagrams, all plain text. you know the sort of thing: client connects to socket, sends "GET <list of keys>" or maybe "GET <keyword group ID>" and server responds "DATA <keyword,value>, <keyword,value>..." But I am many, many sleepless nights away from anything like a working plugin (besides, still wrapping up another ETS2 project that should be public in a week or two).