Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
Collapse
Just Flight Community Forum
  1. Home
  2. Just Flight
  3. MSFS Products
  4. Black Square Add-Ons
  5. Starship
  6. Altitude Preselector Display Bug

Altitude Preselector Display Bug

Scheduled Pinned Locked Moved Starship
13 Posts 2 Posters 203 Views 1 Watching
  • 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.
  • I Offline
    I Offline
    intjmastermind
    wrote last edited by
    #1

    When adjusting the preselected altitude, as you pass each 1000 ft going up, the hundreds value goes from "900" to "1000" but the thousands value doesn't increase.

    i.e. 37,900 -> 37,1000 -> 38,100

    Going down...

    38,100 -> 37,1000 -> 37,900

    1 Reply Last reply
    0
    • Black SquareB Offline
      Black SquareB Offline
      Black Square
      Black Square Developer
      wrote last edited by
      #2

      Wow. That's a wild one. I can't reproduce that over here. What does that even look like? They are completely different text elements. You're saying the "1000" in the hundreds place now overlaps the "37" in the thousands place? Can you share a screenshot?

      These are the things that really baffle me about software sometimes. Looking at the code, there would almost have to be a difference in how the modulo operator is implemented between your computer and mine for this to happen.

      1 Reply Last reply
      0
      • I Offline
        I Offline
        intjmastermind
        wrote last edited by
        #3

        It says I don't have enough privileges to add a picture, but yes the "1" overlaps the last digit of the thousands.

        I 1 Reply Last reply
        0
        • I intjmastermind

          It says I don't have enough privileges to add a picture, but yes the "1" overlaps the last digit of the thousands.

          I Offline
          I Offline
          intjmastermind
          wrote last edited by intjmastermind
          #4

          Imgur link: https://imgur.com/a/Wm91zex

          1 Reply Last reply
          0
          • Black SquareB Offline
            Black SquareB Offline
            Black Square
            Black Square Developer
            wrote last edited by
            #5

            That's unbelievable. I'm at a loss for words. Before I start ranting about how math appears to be broken on your computer (it wouldn't be the first time in MSFS 2024, at least), can you do one test for me?

            When the incorrect number is displaying, could you try adjusting the barometer setting to see if the instrument is generally working and reacting to your inputs?

            1 Reply Last reply
            0
            • I Offline
              I Offline
              intjmastermind
              wrote last edited by intjmastermind
              #6

              Yeah everything otherwise works fine with the altimeter and the autopilot is able to capture an altitude written as “15,1000” correctly at 16,000.

              I’m running Intel 14900K, Win 11 24H2, FS2024 SU3 (latest beta update), English USA localization.

              1 Reply Last reply
              0
              • Black SquareB Offline
                Black SquareB Offline
                Black Square
                Black Square Developer
                wrote last edited by
                #7

                Thanks for checking. In case I sound too astonished, let me be clear, the implication is that your computer thinks...

                38,000 / 1,000 = 37
                1,000 / 1,000 = 1,000

                I know that might sound impossible, but I've already seen it with the same mathematical operator in MSFS 2024 when it was released.

                In theory, I could add some special code to watch for this situation, but that seems a little silly doesn't it? To look for when mathematics is no longer working as it has for the last 200 years? (Surprisingly, the modulo operator was only conceived in 1801.)

                Sorry I'm being a little more animated than I usually am here. Some days, you just think you've seen it all...

                Since I always do my best to offer support to users having any problems, I can walk you through investigating this with me, if you would like. It would take a little work, but I would be very thankful. You can't be the only person on earth for whom this will present itself.

                1 Reply Last reply
                0
                • I Offline
                  I Offline
                  intjmastermind
                  wrote last edited by
                  #8

                  Sure, happy to help!

                  1 Reply Last reply
                  0
                  • Black SquareB Offline
                    Black SquareB Offline
                    Black Square
                    Black Square Developer
                    wrote last edited by
                    #9

                    Thanks! Well, seeing as I am quite baffled by this one, let's start by loading the debugger and looking for errors.

                    I've never tried this, but I believe you might be able to view the debugger without installing anything by going to http://127.0.0.1:19999/ in your web browser while the simulator is running. If not then you might have to install the SDK from the developer menu. I can walk you through this too, if you're not feeling confident.

                    Once you have the debugger open, look for the blue link with "ALT" in the name. Once you've clicked it, click the tab for "Console" at the top of the window. There will be some red errors from when the system was powered up at the top. Try rolling the knob through the suspicious altitudes, and see if this generates any new errors.

                    I'm also going to try this on two more computers later myself, and I will keep an eye out for it.

                    1 Reply Last reply
                    0
                    • I Offline
                      I Offline
                      intjmastermind
                      wrote last edited by intjmastermind
                      #10

                      Ok so I figured it out!

                      If I only use the in-cockpit altitude select knob, or its associated H-events, then the altimeter behaves normally and displays the preselected altitude correctly.

                      Last night, I was modifying the LVAR bksq_AltitudePreselect_1 by incrementing or decrementing it by 30.48 to create a 100 ft change in preselected altitude. That seemed to be the problem. After adjusting the LVAR, the “1000” bug appears, and persists, even if I subsequently use the knob for further changes.

                      Interestingly, after the bug appears, if I then return the pre-selected altitude to 0000, and then only use the knob, the “1000” does not appear again.

                      This leads me to believe there is a floating point precision bug because it only occurs when I’m incrementing or decrementing the LVAR by 30.48.

                      The solution is simply to use the provided H-events and not mess with the LVAR!

                      Black SquareB 1 Reply Last reply
                      0
                      • I intjmastermind

                        Ok so I figured it out!

                        If I only use the in-cockpit altitude select knob, or its associated H-events, then the altimeter behaves normally and displays the preselected altitude correctly.

                        Last night, I was modifying the LVAR bksq_AltitudePreselect_1 by incrementing or decrementing it by 30.48 to create a 100 ft change in preselected altitude. That seemed to be the problem. After adjusting the LVAR, the “1000” bug appears, and persists, even if I subsequently use the knob for further changes.

                        Interestingly, after the bug appears, if I then return the pre-selected altitude to 0000, and then only use the knob, the “1000” does not appear again.

                        This leads me to believe there is a floating point precision bug because it only occurs when I’m incrementing or decrementing the LVAR by 30.48.

                        The solution is simply to use the provided H-events and not mess with the LVAR!

                        Black SquareB Offline
                        Black SquareB Offline
                        Black Square
                        Black Square Developer
                        wrote last edited by
                        #11

                        @intjmastermind said in Altitude Preselector Display Bug:

                        This leads me to believe there is a floating point precision bug

                        This was the conclusion I arrived at today, myself. The implementation of the "floor" and modulo operator is still not perfect correct (this is one that every software language does just a little differently, believe it or not...), but I meant to ask you if you were using hardware to interact with the knob.

                        Sounds like there are two ways to solve this problem. I can think of something to try on my end, but we could also figure out why you guys need to interact with that variable in meters instead of the feet that I use. Perhaps the best solution is to do both. Thank you for looking into that today, though!

                        1 Reply Last reply
                        0
                        • I Offline
                          I Offline
                          intjmastermind
                          wrote last edited by
                          #12

                          You’re welcome!

                          I prefer to modify the underlying LVAR directly instead of relying on increment/decrementing commands for several reasons.

                          1. It bypasses any built-in acceleration. I get the same rate of change each and every time. Without it, some planes apply an acceleration to the speed/altitude/heading values, and I find that annoying and unpredictable.

                          2. I can customize behaviors such as a short press adjusting the altitude by 100 ft increments, while a press and hold adjusts the altitude in 1000 ft increments above 18,000 feet and 500 feet below 18,000 feet.

                          I 1 Reply Last reply
                          0
                          • I intjmastermind

                            You’re welcome!

                            I prefer to modify the underlying LVAR directly instead of relying on increment/decrementing commands for several reasons.

                            1. It bypasses any built-in acceleration. I get the same rate of change each and every time. Without it, some planes apply an acceleration to the speed/altitude/heading values, and I find that annoying and unpredictable.

                            2. I can customize behaviors such as a short press adjusting the altitude by 100 ft increments, while a press and hold adjusts the altitude in 1000 ft increments above 18,000 feet and 500 feet below 18,000 feet.

                            I Offline
                            I Offline
                            intjmastermind
                            wrote last edited by
                            #13

                            UPDATE: Modifying the LVAR using units of Feet does work!

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users