Actual position on the track

Discussion in 'Modding' started by xGerix, Feb 15, 2021.

  1. xGerix

    xGerix Registered

    Joined:
    Feb 15, 2021
    Messages:
    5
    Likes Received:
    0
    Hey modders!

    I want to collect ny car's actual position every sec.
    Is there a possible way to get the gps position of the car on the track?
     
    Last edited: Feb 15, 2021
  2. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    9,144
    Likes Received:
    4,223
    GPS, no. A well modded track will have the GPS coords (at least close to) correct in the gdb and the orientation (north direction) also correct, but the game doesn't provide either of those as output to plugins.

    For a list of known tracks you could extract or deduce those, but then you'd still have to try and use the car's x,y,z location to generate GPS coords taking into account altitude and coordinate density at that particular location (the earth isn't a sphere). Plus for very big tracks even the earth's curvature itself would need to be factored in.

    But the x,y,z location is certainly available, and can be used to compare data across runs at the same track. My telemetry plugin does this to generate fake GPS coords for the purpose of lap comparisons. My actual GPS coords point a little to the west of Africa to avoid being mistake for a real position (unless you're driving a boat, I suppose).

    So really it depends what you want to do with the data. Normally I get asked about this in the context of comparing to real life data, which I think is overly optimistic (though scanned tracks do at least help there).
     
  3. xGerix

    xGerix Registered

    Joined:
    Feb 15, 2021
    Messages:
    5
    Likes Received:
    0
    First of all thanks for your reply!

    So is it possible to collect the x,y,z locations of the cars ?
     
  4. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    9,144
    Likes Received:
    4,223
    Via a plugin, yes. If you have a specific application in mind I or someone else could make a simple plugin for you.
     
  5. xGerix

    xGerix Registered

    Joined:
    Feb 15, 2021
    Messages:
    5
    Likes Received:
    0
    Thanks for the help! I think I'll try myself first :D
     

Share This Page