• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 A few questions about 3D virtual cockpit

Stay away from the autopilot until you get at least the code for more basic cockpit controls right.

VNAV/LVL CHG is not easy to implement in XML.
 
Stay away from the autopilot until you get at least the code for more basic cockpit controls right.

VNAV/LVL CHG is not easy to implement in XML.

Haha, OK. But I wanna fly good.
VNAV is not work on this version of autopilot (in real). But LVLCHNG is need to realize. I think it's not hard, because we know thrust in climb mode, it's always constant and we can attach to thrust level (73% from 100 +- 3) stay only regulate vertical speed for maintain indicated airspeed.
 
Hi , Don't make the Knob animation dependent on the IAS number but driven by an L:var that you have control of. for example this is my code for an Altitude target selection knob. the variable controlling the animation is (L:ALT_Knob, number) so when the user left clicks or uses mouse wheel down the following happen:
1- (>K:AP_ALT_VAR_DEC) so the actual selected altitude decreases.
2- (L:ALT_Knob, number) 5 - (>L:ALT_Knob, number) , So the animation variable decreases by 5 , However it also limited between 0 and 100 so if you keep decreasing and reach 0 it will cycle back to 100 . since animation variable is decreasing the corresponding key frames of animation will decrease (reverse animation) so for my knob it will continue to rotate counter clockwise regardless of the actual altitude value, and vice versa.


Code:
    <PartInfo>
    <Name>HA420_knob_alt</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:ALT_Knob, number)
        </Code>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>selected ALT %((A:AUTOPILOT ALTITUDE LOCK VAR,Feet))%!2.2f!</TooltipText>
      <MouseFlags>LeftSingle+RightSingle+WheelUp+WheelDown</MouseFlags>
      <CallbackCode>
        (M:Event) 'LeftSingle'  scmp 0 ==
        (M:Event) 'WheelDown'   scmp 0 == or
             if{ (&gt;K:AP_ALT_VAR_DEC)
                        (L:ALT_Knob, number) 5 - (>L:ALT_Knob, number)
                        (L:ALT_Knob, number) 99 &gt; if{ 0 (>L:ALT_Knob, number) }
                        (L:ALT_Knob, number) 0 &lt; if{ 99 (>L:ALT_Knob, number) }
                        }

        (M:Event) 'RightSingle' scmp 0 ==
        (M:Event) 'WheelUp'     scmp 0 == or
                                if{ (&gt;K:AP_ALT_VAR_INC)
                        (L:ALT_Knob, number) 5 + (>L:ALT_Knob, number)
                        (L:ALT_Knob, number) 99 &gt; if{ 0 (>L:ALT_Knob, number) }
                        (L:ALT_Knob, number) 0 &lt; if{ 99 (>L:ALT_Knob, number) }
                        }
        7 (>L:knbsound,bool)
      </CallbackCode>
    </MouseRect>
  </PartInfo>


I made other knobs according to your example and they work fine. Thank you very much!
 
Haha, OK. But I wanna fly good.
VNAV is not work on this version of autopilot (in real). But LVLCHNG is need to realize. I think it's not hard, because we know thrust in climb mode, it's always constant and we can attach to thrust level (73% from 100 +- 3) stay only regulate vertical speed for maintain indicated airspeed.

That's also way beyond your capabilities at the moment.
 
That's also way beyond your capabilities at the moment.

You're right! But I try. At the moment I stopped at the custom animation autopilot button with according to the default action variable (events).
I can not understand how to combine them, so that the animation worked and the action was performed.
 
What is the problem? The double animation sometimes occurring when clicking the button? That's a bug in mouse rectangles with "release" conditions that has existed since FSX. Nothing you can do about it.
 
What is the problem? The double animation sometimes occurring when clicking the button? That's a bug in mouse rectangles with "release" conditions that has existed since FSX. Nothing you can do about it.

Really? Thanks again.
What about vertical speed switch? Why it doesn't work? For that switch I use AUTOPILOT VERTICAL HOLD, but it's not switching on VS mode.
 
There is no pure vertical speed hold by default. When clicking the button, in the clickspot code, you will need to engage AP altitude hold, set it to a very high or low value (100000 ft or 0 ft) and then engage vertical speed hold.

(Default VS Hold is basically LVL CHG with V/S mode engaged.)
 
It's strange. I remember a long time ago I was try to change 2d panel and add VS hold button and got good effect - if vs hold button not activated can't change vs speed. Maybe I'm confusing something. But how then to realize it? Need add some conditions to the custom switch? So that no ap speed hold switch is turning on, only when approaching selected altitude.
I think I understand, we need to add custom switch (like a L:vs_hold) with custom animation write custom gauge (like autopilot vertical hold) and add it to the custom switch to the modeldef.xml by CallbackCode like a C:AP:vs_hold. Yes?
 
Last edited:
Not quite. More complicated.

However, I'm getting tired of the constant explanations and my motivation to continue this discussion is weakening. I hope someone else will help you out.
Or search the forums, maybe there already is some code out there.
 
keep calm Bjoern, he/she still doesn't understand yet in mater what sim provide, he/she still dreaming ...
 
keep calm Bjoern, he/she still doesn't understand yet in mater what sim provide, he/she still dreaming ...
(He). Haha, maybe.. Maybe you're right. I'm just want to fly on my favorite aircraft, which is haven't in the simulator, like most Soviet aircraft.
I'd like this PFD, for example, and try to do it more realistic.
mhy68B4SN5c.jpg
 
keep calm Bjoern, he/she still doesn't understand yet in mater what sim provide, he/she still dreaming ...

Yes, and that's what makes the discussion so bloody tedious and energy-consuming.


Anyway, I'm out of here.
Best of luck, Mr. Jam.
 
(He). Haha, maybe.. Maybe you're right. I'm just want to fly on my favorite aircraft, which is haven't in the simulator, like most Soviet aircraft.
there several things/could be many stuff that not provide by the sim, I call it sim limitation. if you want beyond this limitation, you'll need do your own code. it complicated, for autopilot is very complicated, and you can't do half part, you must do fully and whole autopilot by your own code.
 
Back
Top