Solved Measure the distance traveled

Discussion in 'Mod Support' started by Stiegfried, Jun 15, 2018.

  1. Stiegfried

    Stiegfried
    Expand Collapse

    Joined:
    Feb 17, 2018
    Messages:
    16
    Hello everyone,

    I was wondering whether or not there is a way to measure the exact distance traveled by a vehicle either since the spawning or since a certain point of time.

    Two ways to do this would obviously be to calculate the distance between two ticks of stream refreshing from either the time and speed or the old and new coordinates. But both these approaches are not perfectly accurate as they either consider the speed between two ticks to be constant (or linear-increasing/decreasing or how ever you guess the speed between the two ticks) or the way between the old and the new coordinates as a straight path. Even taking the steering angle into the calculation of the second version wouldn't make it 100% accurate, although it would probably increase the accuracy.

    However I would like the distance measurement to be as precise as possible. Does anyone have an idea on how to measure the distance traveled with higher precision than the two ways mentioned above?

    Thanks in advance,
    Stiegfried
     
  2. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    If the stream isn't precise enough for you, you can use GE update which is your FPS or vehicle update which is physics ticks.
    Unless you use physics ticks you won't have a 100 % precision. I do say that for most application the GE update should be enough (30-60 or more FPS depending on your computer)
     
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice