• 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.

FSXA Need some help with the Westwind.

Zeiten

Resource contributor
Messages
444
Country
norway
Hi folks!

The Westwind is coming along nicely.
Just finished up the night textures in the VC.
Outside is the next project.

Next on the list is completion of the autopilot.
It has two modes that I really need some help with.
Pitch mode using either current IAS or MACH.

Everything I have tried just flood up the sim.

I do know you are all busy with your own projects, but it`s better to ask then not ask at all.
In two weeks we are moving into our new house so my time will be more limited in the near future.

So anybody willing to help me out a little bit with this those two modes while I finish up the rest of plane so it possibly could be ready by the end of this year?

All bitmaps etc is finished so this is simply a coding job.
Since it`s basically freeware don`t expect to be rich from job.
IF you insist on getting payed if will be a small fixed price in the range of 45-50$.

Contact PM.

Cheers
Daniel
 
Can you explain in more detail why it has 2 modes.
It's going to take some thought since you need the pitch to adjust to maintain speed.

Also i want to wait to see if others have already coded this before.
I am also wondering if it can be done!
 
Last edited:
It has no auto throttle so the two modes controls pitch during climb or descend to control the airspeed using either IAS or MACH as reference.
There is no option on setting the IAS or MACH so the speed you have when engaging the system is the reference speed.
 
First thing is we need to know the present speed.
So i am thinking if the mode is off we could have a hidden speed hold reference match present speed.
Then when the mode is on the hidden reference speed will stay at the present speed.
Now we can write a code to control the pitch to increase or decrease if the aircraft speed varies from the present speed and reference speed.

That should do it...

Do you think you can write this code?

Maybe write as much as you can and post it and i will help you along the way.
 
This is what I have current.
Very basic stuff, and it flood the sim really bad.

Code:
        (A:ELECTRICAL MASTER BATTERY, bool)
        (A:AUTOPILOT MASTER, bool)
        (L:CC AP IAS, bool)
        and
        and
      
        if{  1 (>L:IAS active, bool) 1 (>L:IAS cap current, bool)  }
        els{ 0 (>L:IAS active, bool) 0 (>L:IAS cap current, bool) } }
      
        (L:IAS cap current, bool) 1 ==
        if{
        (A:AIRSPEED INDICATED, knots) (>L:IAS Current, knots) } }
      
        (L:IAS Current, knots) &;gt (A:AIRSPEED INDICATED, knots)
        if{ (>AP_PITCH_REF_INC_UP) } }
      
        (L:IAS Current, knots) &;lt (A:AIRSPEED INDICATED, knots)
        if{ (>AP_PITCH_REF_INC_DN) } }
 
Fix these tags and see what happens.

&;gt ........>

Remove these extra brackets. Found this in a few places.
els{ 0 (>L:IAS active, bool) 0 (>L:IAS cap current, bool) } }
 
Last edited:
Just tried and it doesn`t appear to be doing anything.


If the plane is in level flight and the throttles are increased/decreased the plane pitches up and down with the natural oscillation without the autopilot doing anything.

Code:
        <!-- IAS Mode-->
       
        (A:ELECTRICAL MASTER BATTERY, bool)
        (A:AUTOPILOT MASTER, bool)
        (L:CC AP IAS, bool)
        and
        and
       
        if{  1 (>L:IAS active, bool) 1 (>L:IAS cap current, bool)  }
        els{ 0 (>L:IAS active, bool) 0 (>L:IAS cap current, bool) }
       
        (L:IAS cap current, bool) 1 ==
        if{
        (A:AIRSPEED INDICATED, knots) (>L:IAS Current, knots) }
       
        (L:IAS Current, knots) &gt; (A:AIRSPEED INDICATED, knots)
        if{ (>AP_PITCH_REF_INC_UP) }
       
        (L:IAS Current, knots) &lt;(A:AIRSPEED INDICATED, knots)
        if{ (>AP_PITCH_REF_INC_DN) }
 
did you mean to say

(L:IAS Current, knots) (A:AIRSPEED INDICATED, knots) &gt;
if{ (>K:AP_PITCH_REF_INC_UP) }

(L:IAS Current, knots) (A:AIRSPEED INDICATED, knots) &lt;
if{ (>K:AP_PITCH_REF_INC_DN) }

Bob
 
Last edited:
What is wrong with my eyes?
Why can`t I see the simples mistakes?
Have I forgotten everything?

Off to fix the mistakes and try again.

Thanks guys!
 
I also need to active the pitch hold mode of course... forgot that stupid me.
Now it works, BUT all I can find is this key event that really don`t help a lot as it`s only the pitch mode I`m interested in, not the wing leveler.

Code:
AP_ATT_HOLD_ON    Turns on AP wing leveler and pitch hold mode

Will a follow up with this solve the problem or just cause massive flooding?
Code:
AP_WING_LEVELER_OFF    Turns off wing leveler mode

Any ideas?
 
To avoid flooding use the command in a Click section, or test for wing leveler ON before turning it OFF.
 
Make it so the AP_WING_LEVELER_OFF turns off the wing lever any time you switch your custom mode switch. Should do the trick!:stirthepo
 
No, unfortunate it did not turn off the wing leveler mode.

So it adjust the pitch (to a certain degree) to hold the current IAS, but it will not turn if I turn off the wing leveler and turn on the HDG mode or NAV mode.
This is why I want to outsource the autopilot to someone who has more experience with this as I don`t have the time ATM to go back and fourth with trial and error.


EDIT; it does turn of the wing leveler mode, but in some strange manners the heading hold will not engage as long as the pitch mode in active.

Did a test run now and;

- After takeoff IAS mode is selected and HDG mode is selected.
- Plane climbs ok, but stays at the current heading.
- ALT SEL mode is engaged.
- When reaching the desired altitude pitch mode is turned off and plane level out and THEN HDG mode turns on.

My head is spinning :confused:
 
Last edited:
Here is the whole logic behind the autopilot.

Code:
        <!-- Autopilot-->
       
        <!--Lock Set Altitude Mode-->
       
        (A:ELECTRICAL MASTER BATTERY, bool)
        (A:AUTOPILOT MASTER, bool)
        (L:CC AP ALTSEL, bool)
        and
        and
       
        if{  (>K:AP_PANEL_ALTITUDE_ON) 1 (>L:CC AP ALTSEL Active, bool) }
        els{ (>K:AP_PANEL_ALTITUDE_OFF) 0 (>L:CC AP ALTSEL Active, bool) }
       
        <!-- 1/2 Bank Mode-->
       
        (A:AUTOPILOT MASTER, bool)
        (A:AUTOPILOT HEADING LOCK, bool)
        (L:CC AP 1/2 bank, bool)
        and
        and

        (A:AUTOPILOT MASTER, bool)
        (A:AUTOPILOT NAV1 LOCK, bool)
        (L:CC AP 1/2 bank, bool)
        and
        and
        or
       
        if{ 22.5 (>K:AP_MAX_BANK_INC) 1 (>L:1/2 bank active, bool) }
        els{ 45 (>K:AP_MAX_BANK_DEC) 0 (>L:1/2 bank active, bool) }
       
       
        <!-- Heading Mode-->
       
        (A:ELECTRICAL MASTER BATTERY, bool)
        (A:AUTOPILOT MASTER, bool)
        (L:CC AP HDG, bool)
        and
        and
       
        if{  (>K:AP_PANEL_HEADING_ON) 1 (>L:HDG active, bool) }
        els{ (>K:AP_PANEL_HEADING_OFF) 0 (>L:HDG active, bool) }
       
        <!-- NAV Mode-->
       
        (A:ELECTRICAL MASTER BATTERY, bool)
        (A:AUTOPILOT MASTER, bool)
        (L:CC AP NAV, bool)
        and
        and
       
        if{  (>K:AP_NAV1_HOLD_ON) 1 (>L:NAV active, bool) }
        els{ (>K:AP_NAV1_HOLD_OFF) 0 (>L:NAV active, bool) }
       
        <!-- VOR LOC Mode-->
       
        (A:ELECTRICAL MASTER BATTERY, bool)
        (A:AUTOPILOT MASTER, bool)
        (L:CC AP VORLOC, bool)
        and
        and
       
        if{  (>K:AP_LOC_HOLD_ON) 1 (>L:CC AP VORLOC Active, bool) }
        els{ (>K:AP_LOC_HOLD_OFF) 0 (>L:CC AP VORLOC Active, bool) }
       
        <!-- APP Mode-->
       
        (A:ELECTRICAL MASTER BATTERY, bool)
        (A:AUTOPILOT MASTER, bool)
        (L:CC AP APP, bool)
        and
        and
       
        if{  (>K:AP_APR_HOLD_ON) 1 (>L:CC AP APP Active, bool) }
        els{ (>K:AP_APR_HOLD_OFF) 0 (>L:CC AP APP Active, bool) }
       
        <!-- IAS Mode-->
       
        (A:ELECTRICAL MASTER BATTERY, bool)
        (A:AUTOPILOT MASTER, bool)
        (L:CC AP IAS, bool)
        and
        and
       
        if{  1 (>L:IAS active, bool) 1 (>L:IAS cap current, bool)  }
        els{ 0 (>L:IAS active, bool) 0 (>L:IAS cap current, bool) }
       
        (L:IAS cap current, bool) 1 ==
        if{
        (A:AIRSPEED INDICATED, knots) (>L:IAS Current, knots)
        (>K:AP_ATT_HOLD_ON) (>K:AP_WING_LEVELER_OFF)    }
       
        (L:IAS Current, knots) (A:AIRSPEED INDICATED, knots) &gt;
        if{ (>K:AP_PITCH_REF_INC_UP) }
       
        (L:IAS Current, knots) (A:AIRSPEED INDICATED, knots) &lt;
        if{ (>K:AP_PITCH_REF_INC_DN) }
 
I have found that there are many interactions between AP modes, and you must take those into account. My AP is a relatively simple one, and thus does not have all the modes yours does. Those would all have to be tested in all their various combinations.

For example, when I want to turn HDG hold off (pilot controls banking), I need to:

1. Turn ATT mode on (cancels HDG mode)
2. Turn Wing Leveler OFF (which gets turned on by #1)
2. Turn ALT mode ON (if on previously), since either #1 or #2 turns it off.

Conversely, if I turn ALT mode off and I want to retain an existing HDG mode, then I need to:

1. Turn ALT mode off
2. Turn ATT mode ON
3. Turn Wing Leveler OFF
4. Turn HDG mode ON

Hope this helps,
 
Guess it`s off to installing BlackBox just to see what turns on or off :eek:
 
Yes you should be using a test window to see what is happening since they designed the Ap to do multiple functions making it hard to get every type of AP needed.
But i still think you can get this to work since my Velocity can use pitch and have no wing lever on. And i remember having the same issue looking for a variable that does not turn on both modes. Keep trying i will test my velocity tonight.
 
Back
Top