Results 1 to 6 of 6

Thread: Can RR compute timezone from gps lat/long data?

  1. #1
    Potential Tuner
    Join Date
    Jan 2021
    Location
    UK
    Posts
    3

    Can RR compute timezone from gps lat/long data?

    Hi,

    First-time poster to this forum. I hope someone can help with the following question.

    I'm running Racerender Ultimate v3.7.3 on a Windows 10 PC.

    It has successfully imported an MP4 video created by my GoPro Hero7 Black into a RR project.

    The project's config settings show that it knows I live near Ipswich, England (which I assume it infers from the Lat/Long data in the imported GPS data).

    However, the 'Timer - Data and Time' display object appears not to know this means the video was created in timezone 0 (GMT) and instead uses a default TimeZone = -7 (Mountain).

    I'm using the 'Timer - Data and Time' display object because I wanted to show the date and time unfolding when the video was created.

    Currently, I've set TimeZone = 0 in the display object's background script to set the correct UK time for this project.

    However, is there a way that raceRender or the display object could infer the right timezone from the Lat/Long on the hero 7's GPS data?

    Hope someone says 'Yes' and and can explain how!

    Martin

  2. #2
    Advanced Tuner
    Join Date
    Apr 2018
    Posts
    294
    Quote Originally Posted by SuffolkPunch View Post
    Hi,

    First-time poster to this forum. I hope someone can help with the following question.

    I'm running Racerender Ultimate v3.7.3 on a Windows 10 PC.

    It has successfully imported an MP4 video created by my GoPro Hero7 Black into a RR project.

    The project's config settings show that it knows I live near Ipswich, England (which I assume it infers from the Lat/Long data in the imported GPS data).

    However, the 'Timer - Data and Time' display object appears not to know this means the video was created in timezone 0 (GMT) and instead uses a default TimeZone = -7 (Mountain).

    I'm using the 'Timer - Data and Time' display object because I wanted to show the date and time unfolding when the video was created.

    Currently, I've set TimeZone = 0 in the display object's background script to set the correct UK time for this project.

    However, is there a way that raceRender or the display object could infer the right timezone from the Lat/Long on the hero 7's GPS data?

    Hope someone says 'Yes' and and can explain how!

    Martin
    I think you may have already done everything that you can currently do to correctly display time. One thing to note: the built in Display Object for Date & Time does not correctly handle dates at the end of the month (e.g. March 31st), so I would recommend grabbing the object at the bottom of this post instead.

    I think something like this would definitely be possible for HPTuners to incorporate into the program itself. I've seen a number of various libraries in multiple languages that can perform a translation like that. I think it would have a pretty limited use though. It would also take quite a bit of processing power for determining what essentially maps to a constant (since you typically wouldn't be crossing timezones within a single session). For that reason, I don't think there's a way for us non-employees to create a Display Object that could do that for us. It could be done in the program itself if they decide to add it at some point.

  3. #3
    Potential Tuner
    Join Date
    Jan 2021
    Location
    UK
    Posts
    3
    Thanks - have downloaded the updated date and time object.

    Did you have a view on whether RR infers my location (Ipswich England) from the project's data file?

    I attach a snapshot of the project config page with the location outlined in red.

    It's position (just below the project's .dat file name) seems suggestive to me.

    Added: Have just downloaded a .mov and .csv file from the RaceRender URL
    http://racerender.com/Developer/DataFormat.html
    Data File (607 KB CSV)
    Video File (58 MB 360p H.264)
    The CSV file show Lat and Long (39.7355600,-103.8917433) for High Plains Raceway in Colorado, USA. And the project's config file shows the same. So I conclude that RR gets the geographical location it quotes in a project's config page from the project's data file.

    Martin
    Attached Images Attached Images
    Last edited by SuffolkPunch; 01-13-2021 at 05:07 AM. Reason: Add info on a project's location

  4. #4
    Advanced Tuner
    Join Date
    Apr 2018
    Posts
    294
    Fortunately, it looks like "LocName" is available in the Enhanced Object Script Editor.

    Try this guy:
    Text - Location.rro

    It's done in the Foreground Script, so if that somehow changes, then it should change as well. I'm not sure if RaceRender checks that for the duration of the data or if it just checks at the beginning. I haven't driven far enough in one session to find out...

    If you don't want any outline, just remove the "//" at the start of the second line in the Foreground Script. Otherwise, it should respect the colors and font that you choose.
    Attached Files Attached Files

  5. #5
    Potential Tuner
    Join Date
    Jan 2021
    Location
    UK
    Posts
    3
    The access to location is interesting. Thanks.
    Last edited by SuffolkPunch; 01-14-2021 at 05:04 AM. Reason: correction

  6. #6
    Tuner in Training
    Join Date
    Apr 2021
    Location
    outside Philadelphia PA
    Posts
    33
    I too am new to RaceRender. But I dabble in GPS, and its actually quite hard to figure out proper time zone from the lat/long. The reason is that while many time zones are easy, like if you are in New York City, its US Eastern, a lot of places are much more difficult. Timezones are defined by political boundaries. For example, Most of the US state of Indiana is in the Eastern time zone, but eight counties are in the Mid-west time zone. And two of them have swapped official time zones since 2000. Similarly, in Australia, most of Queensland is in Australian Eastern Standard time. But the boundary between Queensland and New South Wales is very complex near the Gold Coast. And naturally, the two states have different timezones, at least part of the year.