Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Getting start lane position and orientation

  1. #1
    Kart Driver
    Join Date
    Jul 2018
    Posts
    8
    Platform
    PC

    Getting start lane position and orientation

    Hi,

    Is there any way of getting current track start position and orientation? (to draw it in a map)

  2. #2
    WMD Member
    Join Date
    Mar 2012
    Location
    Sydney
    Posts
    239
    Platform
    PC
    You could google the tracks and look for the start line and get the direction bearing /..
    Do you mean in a data dump ? UDP data and track orientation to capture for an app ?
    Or do you want a visual track map, with where you are? Exported file ?
    Do you mean in the replay file ?
    or whilst your driving (track map) -in the UI ?

    Not quite sure what your actually asking for ... you want the position and direction (im assuming of your car).. if you want it for each track, im assuming the UDP data would have it.. but if you just need for a map, might be quicker to just use google.


    Your question isnt very clear, so hard to answer. (What exactly do you want ?
    CPU : I7-7700k, 16gb Gskill 3200 DDR4 Ram. GTX 1070
    3x27" AOC Monitors, G29, with custom perfect pedal mod.

  3. #3
    Kart Driver
    Join Date
    Jul 2018
    Posts
    8
    Platform
    PC
    You are right, my question sucks sorry...

    I'm using UDP api, I just want to get the position and orientation of the track start related to the "world position" (sent in "eTimings" or in "eCarPhysics") and orientation (sent on "eTimings"), that way I can calculate when did the player pass through the start position

  4. #4
    WMD Member
    Join Date
    Mar 2012
    Location
    Sydney
    Posts
    239
    Platform
    PC
    Cheers I honestly know zero in this area so cant help, however theres many who can, hopefully they can offer up the info you need
    CPU : I7-7700k, 16gb Gskill 3200 DDR4 Ram. GTX 1070
    3x27" AOC Monitors, G29, with custom perfect pedal mod.

  5. #5
    Kart Driver
    Join Date
    Jul 2018
    Posts
    8
    Platform
    PC
    There are a couple of workarounds I thought:
    1- Take the initial position and heading of the car as start position - very easy to implement, but not very accurate
    2- Wait for the first lap to be completed (current lap time = 0) and use it as start position - harder to implement, have to wait for first lap (not a problem since I draw the circuit layout during this first lap), but accurate (the position, the heading can be wrong)

  6. #6
    WMD Member Sampo's Avatar
    Join Date
    Jun 2012
    Location
    Finland
    Posts
    641
    Platform
    PC
    Why not get the coords of a car when its sCurrentLapDistance wraps around to 0? Or actually, when it changes say from over 95% distance to under %5 distance to take into account your sampling frequency.

    Edit: Just reread your question and if you only want to know the moment a car passes the start/finish line, forget about getting the coords
    Last edited by Sampo; 13-07-2018 at 10:32.
    CPU Intel i5 3570K @ 4.2 GHz | Motherboard Asus P8Z77-V LK | RAM 16GB 1600MHz DDR3 | GPU nVidia GTX980 4GB (390.77) | Audio Realtek 5.1 on MB | Screen AOC U3477PQU | OS Windows 7 Pro 64-bit | Wheel Logitech G27
    In-game settings: 2560x1080 / 3440x1440 | Texture Resolution HIGH | AF 16x | VSync ON | AA None | Reflections MED | Envmap MED | Vehicle HIGH | World HIGH | Shadows MED | Motion Blur NO | Render Frames Ahead 1 | Particles MED/MED/MED

    PC2Info, a PC program that shows most stats the game provides over UDP

  7. #7
    Kart Driver
    Join Date
    Jul 2018
    Posts
    8
    Platform
    PC
    actually that's also a good idea

    just to clarify what i want to do:

    currently i have a GPS based app to measure lap times and show some in-race telemetry and drive aids in real life (yeah, i also race in real life):
    (Cannot post videos for being a n00b) => youtube watch?v=G4qWM_Kcdi4

    And I want to implement a "mock" GPS to be able to use it also with PC2 (mostly for testing and debugging). In real life, I set the track start and orientation using google maps (and finish line if is not a looped track), and work from there... but in PC2 i dont have the start position right away.

    Anyway, thanks a lot for your help, is always great to have quality feedback

  8. #8
    WMD Member Sampo's Avatar
    Join Date
    Jun 2012
    Location
    Finland
    Posts
    641
    Platform
    PC
    Ok. Then the easiest way I guess is to go to sCurrentLapDistance=0, face perpendicular to the start line, and have your app save the position (sFullPosition) and orientation (sOrientation) on disk. Rinse and repeat for each track.
    Last edited by Sampo; 13-07-2018 at 14:02.
    CPU Intel i5 3570K @ 4.2 GHz | Motherboard Asus P8Z77-V LK | RAM 16GB 1600MHz DDR3 | GPU nVidia GTX980 4GB (390.77) | Audio Realtek 5.1 on MB | Screen AOC U3477PQU | OS Windows 7 Pro 64-bit | Wheel Logitech G27
    In-game settings: 2560x1080 / 3440x1440 | Texture Resolution HIGH | AF 16x | VSync ON | AA None | Reflections MED | Envmap MED | Vehicle HIGH | World HIGH | Shadows MED | Motion Blur NO | Render Frames Ahead 1 | Particles MED/MED/MED

    PC2Info, a PC program that shows most stats the game provides over UDP

  9. #9
    Kart Driver
    Join Date
    Jul 2018
    Posts
    8
    Platform
    PC
    Thanks! If it works properly probably I will leave it in the app as a free demo and charge for use it in real racing

  10. #10
    GT4 Pilot
    Join Date
    Jul 2017
    Posts
    2,626
    Platform
    PC
    But I still think that in the sim you'd better use a different method, what I am doing is to check the sector before and after, if it has changed from 3 to 1, then the car just crossed the finish line, it is very simple. In real life, you do not have information like that, so you had to use a smart algorithm with the GPS coordinates to calculate when you pass the finish line, but in game we do have all this info already calculated for us, ready to use

Similar Threads

  1. BUG can't choose start position with race
    By koly in forum Technical Help & Support (PC)
    Replies: 16
    Last Post: 27-09-2017, 21:34
  2. Replies: 2
    Last Post: 27-01-2016, 12:10
  3. Race start Gear and pit lane lights
    By Stryker44 in forum Feature Suggestions
    Replies: 11
    Last Post: 02-11-2015, 00:10
  4. Replies: 3
    Last Post: 08-06-2015, 20:58
  5. Orientation matrix of the car
    By sdecorme in forum PC - Technical Help & Support
    Replies: 0
    Last Post: 27-05-2015, 12:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •