Jump to content Jump to content

[F1 2021 UDP - Telemetry] Create a track map


Recommended Posts

Hey everyone,

Not sure if I'm in the right sub-forum, but I couldn't figure out where to post this exactly. Please let me know if I'm wrong.

I've created a personal F1 Telemetry app (for F1 2021) but I'm currently looking to create track map.
With that I mean a map where you see all the drivers live on a map. Now I'm struggeling to figure out how.

I'm aware that the tracks itself aren't officially available anywhere. Luckily F1Laps have published them on their Github: https://github.com/f1laps/f1-track-vectors
Now I'm struggeling to get the drivers on that vector and not sure how to go about this. I know that there's m_worldPositionX & m_worldPositionY on the CarMotion package.
But I don't think that'll be useful to place the drivers on the map? The values of these positions can go into negatives and I can't figure out what would be considered the min & max values of these positions.

I'm not sure what other variables would be useful to create this so I'm quite clueless on how to go about creating a custom track map.
Any clues, ideas or whatever to point me in the right direction would be more then welcome.

Thanks in advance for your time!

Link to post
Share on other sites
  • Moderator

I think m_worldPositionX and m_worldPositionY are the most useful values you'll encounter. There are many ways of getting the coordinates right, but one thing you can do is to just find some objects to sync the coordinates and your map with. It's a good way to start, after which you can look for better ways of syncing it if there proves to be issues 🙂 

Link to post
Share on other sites
1 minute ago, UP100 said:

I think m_worldPositionX and m_worldPositionY are the most useful values you'll encounter. There are many ways of getting the coordinates right, but one thing you can do is to just find some objects to sync the coordinates and your map with. It's a good way to start, after which you can look for better ways of syncing it if there proves to be issues 🙂 

With "but one thing you can do is to just find some objects to sync the coordinates and your map with" you probably mean like corners?
So this is like a sync that I need to do for every track?

Then again, as values can go into negatives, I assume position 0,0 (X, Y) would be the center of the map? Whereby it's a matter of finding the scale of the image to make it look correct?

Link to post
Share on other sites

I have just experimented with this real quick. See the x, y & z coords with the image below for Canada:

"x": -7.289400577545166, "y": 94.78215026855469, "z": 0.2308087944984436
F1_2021_dx12_iGWpdd0NH1.png.4dcfe1ba308d9adb4952884d3afbb03f.png

 

Am I missing something here?
As far as I can tell only x & z are relevant. y seems to be the altitude.
Look at where my car is positioned, this is the closest I could get to x 0 & z 0.
So that's supposed to be the center or a corner of the map? I feel like I'm missing something because this would make no sense, right?

Link to post
Share on other sites
2 minutes ago, Wills said:

Why not just do a lap while logging the world coordinates? At the end you'll have a bunch of points you can turn into your own vector which will match the circuit in the game 1:1 :).

 

 

Hmm, good point. However never done anything like this.
I could easily create a bunch of points for them, but unsure how I would need to string them together into a vector and make those work when I get coords from players.
Any resources you potentially can point me to, because I'm not quite sure what I'd need to start searching to find things like this.

Thanks in advance for the ideas & your time!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...