Falcon BMS Forum
    • Register
    • Login
    • Search
    • Categories
    • Unread
    • Recent
    • Unsolved
    • Popular
    • Website
    • Wiki
    • Discord

    Supporting native Tacview in BMS 4.36.1

    Theater Development
    3
    3
    310
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mrkline
      mrkline last edited by mrkline

      Hi folks! As many of you noticed, native Tacview recordings in BMS 4.36.1 default to KTO coordinates, which produces very odd results in other theaters. Let’s fix that!

      The problem:

      BMS currently generates Lat/Long by taking a coordinate for the southwest corner of the theater, then dividing the distance from that point by the circumference of the planet. Suffice to say, those values can be very inaccurate.

      Tacview solves this problem by storing all edges of the theater (west, east, south, and north), then interpolating between them using a simple formula. Unfortunately, there’s no way to automatically calculate these edges from existing data - the Tacview author hand-fit theaters to the globe in Google Earth, and stores the results in Falcon4Theaters.xml. We considered parsing this file to get theater coordinates, but it seemed like a bad idea for a couple of reasons:

      1. It would mean that BMS would rely on third-party software. (Granted, if you have Tacview recordings enabled, you probably have a copy installed!)
      2. Theater installers would have to edit Tacview’s files, or direct users to do so.

      The solution:

      Instead, BMS now tries to read an optional section at the end of each theater’s Theater.map file, containing those edges (west, east, south, north, in that order) as little-endian, 64-bit doubles, i.e.,

      struct TacviewTheaterBounds {
          double west;
          double east;
          double south;
          double north;
      };
      

      Theaters which extend their Theater.map file with this data should see correct coordinates in Tacview recordings. Very good values for several popular theaters can be found in Tacview’s Falcon4Theaters.xml, as previously mentioned.

      I’ll try to make some simple tools to help theater creators do this, or maybe talk to Falcas about building support into MissionCommander.

      1 Reply Last reply Reply Quote 10
      • Topic is now a regular thread  mrkline mrkline 
      • RUSHER0600
        RUSHER0600 last edited by

        How to apply the solution to your theater:

        As explained previously, to write the coordinates in the .acmi correctly, BMS code needs to know the N/S lat and W/E lon of the 4 theater “sides”.
        It was decided to let BMS read those values out of an Add-On [theatername]\Terrdata[theatername]\terrain\Theater.map file, since it’s a binary file, you will need a hex editor (I used HxD) to add the values.

        • open the Tacview file holding theater data, located in C:\Programs\Tacview\Data\Xml\Data-Falcon4Theaters.xml, this will provide a quick reference for theater border coordinates that should already provide a proper alignment in Tacview (for most 64 tile theaters), for this example we’ll use the ITO values;
        <West>30</West>
        <East>40</East>
        <South>25</South>
        <North>35</North>
        
        • open your Theater.map with a hex editor like HxD (might be better to make a backup of the file first), make sure you select “little endian” as Byte Order below the Data Inspector;
          little-endian.png

        • In HxD, “Edit>Insert Bytes”, set bytecount to 4 to insert 32 new bits, they will be highlighted in red. Mark them and use the Data Inspector to overwrite them with a new float (32 bit) value “20000”, this is some “max altitude” metadata that needs to be present;
          insert-float32.png

        • Insert 8 new bytes (64 bits) like in step 3, select them and use the Data Inspector to overwrite them with a new 64 bit float, repeat this step a total of 4 times to write the WEST, EAST, SOUTH, NORTH border coordinates in order;
          insert-float64.png

        • In total you should have added: “20000” as a 32bit (4 hex-value pairs or bytes) float and the WEST, EAST, SOUTH, NORTH border coordinates as 4 consecutive 64bit (8 hex-value pairs or bytes) floats, all totaling to 36 new bytes written since you started editing. Save the file and check alignment by creating an acmi using the new native export;
          end-result.png

        1 Reply Last reply Reply Quote 3
        • Pinned by  MaxWaldorf MaxWaldorf 
        • Fish44
          Fish44 last edited by Fish44

          Many thanks,
          @RUSHER0600 I followed along and did a ‘do it yourself update’ for Balkans. (until the official …BMS436\Data\Add-On Balkans\Terrdata\Balkans\terrain\Theater.map file is updated). Worked a treat !

          If it helps anyone in the meantime download from HERE
          (backup the original first).

          Fish's Flight Sim Videos

          13700k, RTX 4090, 32gb DDR4 @3200, Warthog stick, TUBSA+cougar TQS, MFG pedals. Opentrack. [email protected] monitor. HP Reverb VR-1000, PICO 4 (with virtual desktop), TP-Link AX3000 Wifi 6 routerwith 2m Cat6 cable to BMS computer

          1 Reply Last reply Reply Quote 1
          • Referenced by  Quasi_Stellar Quasi_Stellar 
          • Referenced by  JUmpstart5179 JUmpstart5179 
          • First post
            Last post

          29
          Online

          10.6k
          Users

          21.0k
          Topics

          348.8k
          Posts

          Benchmark Sims - All rights reserved ©