Menu

#2205 View limits greater than 180 degrees no longer supported

None
NeedInfo
nobody
Low
2021-08-19
2020-04-12
No

View limits greater than 180 degrees are clipped to 180. Example:

  <view n="0">
   <internal archive="y">true</internal>
   <config>
    <x-offset-m archive="y" type="double">-0.5</x-offset-m>
    <y-offset-m archive="y" type="double">1.16375</y-offset-m>
    <z-offset-m archive="y" type="double">-27.7515</z-offset-m>
    <pitch-offset-deg>-12.0</pitch-offset-deg>
    <default-field-of-view-deg type="double">75.0</default-field-of-view-deg>
    <limits>
     <enabled type="bool">true</enabled>
     <left>
      <heading-max-deg type="double">200.0</heading-max-deg>
      <x-offset-max-m type="double">0.15</x-offset-max-m>
      <x-offset-threshold-deg type="double">65.0</x-offset-threshold-deg>
     </left>
     <right>
      <heading-max-deg type="double">200.0</heading-max-deg>
      <x-offset-max-m type="double">0.15</x-offset-max-m>
      <x-offset-threshold-deg type="double">65.0</x-offset-threshold-deg>
     </right>
    </limits>
   </config>
  </view>

Discussion

  • James Turner

    James Turner - 2020-04-12

    @cgdae One for you to look at. Michael, please list which version/commits you are testing.

     
  • Anonymous

    Anonymous - 2020-04-12

    Hi, James,

    Using all -next as of Apr 12 (today).

     
  • Anonymous

    Anonymous - 2020-06-06

    -next as of 06 Jun is now respecting the limits, but the movement near them is jerky.

     
  • Julian Smith

    Julian Smith - 2020-06-16

    I don't think anything changed in the viewing code between Apr 12 and Jun 6, so i'm not able to explain this. And i haven't noticed any such problems myself.

    Can you give full details about what aircraft was/is having this problem?

     
  • Anonymous

    Anonymous - 2020-06-16

    Tu-144D: https://gitlab.com/mdanil/Tu-144/-/blob/master/Tu-144D-set.xml#L605
    as far as I remember, I haven't touched my view definitions for a long while, too.

     
  • Anonymous

    Anonymous - 2020-08-05

    I checked again, and now camera rotation limits are respected again.

     
  • xDraconian

    xDraconian - 2020-08-06

    @mike402, Michael, Are there any remaining concerns or is this ticket ready to close?

     
  • xDraconian

    xDraconian - 2020-08-06
    • labels: --> PropertyTree, View Limits
     
  • Julian Smith

    Julian Smith - 2020-08-06
    • status: New --> NeedInfo
     
  • Anonymous

    Anonymous - 2020-10-22

    Sorry about the long delay. If I use <heading-max-deg type="double">90.0</heading-max-deg> or any other value less than 180, it works.

    So it seems that it only stopped working with a limit of more than 180 degrees (but you can turn your head more than 180 if you're flexible enough or use your shoulders). In this case it still gets limited to 180 degrees, but shakes a bit when it hits the limit. Same happens for setting exactly 180.

     

    Last edit: Anonymous 2020-10-22
  • Anonymous

    Anonymous - 2021-08-18
    • summary: View limits no longer respected --> View limits greater than 200 degrees no longer supported
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
    -Rotation limits are no longer respected. Example:
    +View limits greater than 180 degrees are clipped to 180. Example:
    
     ```
       &lt;view n=&#34;0&#34;&gt;
    
     
  • Anonymous

    Anonymous - 2021-08-18
    • summary: View limits greater than 200 degrees no longer supported --> View limits greater than 180 degrees no longer supported
    • status: NeedInfo --> Invalid
     
  • Anonymous

    Anonymous - 2021-08-18
    • status: Invalid --> NeedInfo
     
  • Anonymous

    Anonymous - 2021-08-18

    Oops. I wanted to say, view.nas pilot_view_limiter has not changed for longer than the bug existed, so the problem must be elsewhere. Probably the C++ view system rewrite.

     
  • Julian Smith

    Julian Smith - 2021-08-19

    I've had a look and i can't see where the changes to the view system in the last couple of years could have broken this. In fact i can't find any C++ code that refers to heading-max-deg - it looks like view limits are implemented entirely in Nasal? In which case i'm struggling to see how it could ever work without artefacts such as shaking, because of Nasal callback generally running slower than frame rate.

    Ultimately i'd like to switch to use Sviews for the main window, where it will be easy to implement viewing limits, but that will probably have to wait until we've got a replacement for PUI working. In the meantime, i'll have a look at whether there is a simple way to implement viewing limits in the current C++ code main window view code.

    Having said that all that, please let me know if i've missed something here and there is something that might have broken viewing limits that could be easily fixed.

    • Jules
     
  • Anonymous

    Anonymous - 2021-08-19

    Thank you for checking, Jules! So the new views implementation is not enabled so far? Has the old one been changed in any way?

    I was somewhat suspicious of the normdeg()s in the limiter Nasal but according to git blame, those lines have not changed recently at all, but I can not think of any other place.

    If you will be rewriting it in C++, I have a small feature idea: vertical angle limiting. Right now it's only possible to limit horizontal angles, which means there is no way to model something like a fixed camera without aircraft-side hacks.

     
    • Julian Smith

      Julian Smith - 2021-08-20

      On Thu, 19 Aug 2021 22:56:50 -0000
      "Michael Danilov" mike402@users.sourceforge.net wrote:

      Thank you for checking, Jules! So the new views implementation is not enabled so far? Has the old one been changed in any way?

      The main (aka old) view system had fairly extensive changes a couple of
      years ago to improve support for views of multiplayer aircraft.

      The Sview system is different; it was added to allow 'extra view'
      windows with CompositeViewer (only available on next). This was
      necessary because the main view code doesn't support multiple instances
      of the viewing state, but it's also intended to be more flexible and
      powerful.

      I was somewhat suspicious of the normdeg()s in the limiter Nasal but according to git blame, those lines have not changed recently at all, but I can not think of any other place.

      Yes, i noticed this too. It's all a bit of a mystery...

      If you will be rewriting it in C++, I have a small feature idea: vertical angle limiting. Right now it's only possible to limit horizontal angles, which means there is no way to model something like a fixed camera without aircraft-side hacks.

      Sure, that should be easy enough to add.

      Thanks,

      • Jules

      --
      http://op59.net

       

Log in to post a comment.

MongoDB Logo MongoDB