• 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 P8 Compass Anomalies

Messages
417
Country
ca-ontario
Hi, I recently added the fantastic freeware Avro Tutor by Nigel Richards to P3D v4.5 and it looks and flies like a champion. I am however having some issues with the pop-up P8 compass behaving incorrectly in terms of set direction versus actual direction.

I have added code for an autopilot from another aircraft (AP, Direction Indicators, Radios and Electrical sections) and I am using the pop-up AP panel from the Maul M7. The problem lies with the compass ring and/or needle on the P8 pop-up (and also reflected in the VC model too). The compass ring, needle and lubber lines on the glass are only correct on the 'cardinal' compass headings of N and S, while E and W are opposites. Any selected heading other than those four gives an incorrect true heading when read from the 'Shift+Z' info line! The table below shows you the results of my tests and the correct and incorrect values:

Compass Setting
Actual Heading
<SHIFT + Z> Value
North
North
360°
North-East
North-West
315°
East
West
270°
South-East
South-West
225°
South
South
180°
South-West
South-East
135°
West
East
090°
North-West
North-East
045°

This is the code for the P8 compass:

XML:
<Gauge Name="compass_popup" Version="1.0">
  <Image Name="AVRO__compass.bmp"/>
 
  <Element>
    <Position X="150" Y="150"/>
    <Image Name="compass_popup_needle.bmp" PointsTo="South">
      <Axis X="85" Y="86"/>
    </Image>
    <Rotate>
      <Value>(A:Wiskey compass indication degrees,degrees) - </Value>
      <Nonlinearity>
        <Item Value="0" Degrees="-90"/>
        <Item Value="180" Degrees="90"/>
        <Item Value="360" Degrees="-90"/>
      </Nonlinearity>
    </Rotate>
  </Element>
 
  <Element>
    <Position X="150" Y="150"/>
    <Image Name="P8_Grid_Ring_mod.bmp" PointsTo="North">
    <Axis X="143" Y="143"/>
    </Image>
    <Rotate>
      <Value>(A:AUTOPILOT HEADING LOCK DIR, degrees)</Value>
      <Nonlinearity>
        <Item Value="0" Degrees="-90"/>
        <Item Value="180" Degrees="90"/>
        <Item Value="360" Degrees="-90"/>
      </Nonlinearity>
    </Rotate>
  </Element>

 
 
    <Mouse>
      
        <Area Name="AVRO HEADING REFERENCE DOWN" Left="0" Top="0" Width="150" Height="300">
            <Tooltip ID="">AVRO Compass (Heading %((A:Wiskey compass indication degrees,degrees))%!d!°) - R. Click to toggle 2D compass.</Tooltip>
            <Cursor Type="DownArrow"/>
            <Click Repeat="Yes" Kind="LeftSingle+RightSingle">
                (M:Event) 'RightSingle' scmp 0 == if{ 75 (&gt;K:PANEL_ID_TOGGLE) } els{ (>K:HEADING_BUG_DEC) }
            </Click>
        </Area>

        <Area Name="AVRO HEADING REFERENCE UP" Left="150" Top="0" Width="150" Height="300">
            <Tooltip ID="">AVRO Compass (Heading %((A:Wiskey compass indication degrees,degrees))%!d!°) - R. Click to toggle 2D compass.</Tooltip>
            <Cursor Type="UpArrow"/>
            <Click Repeat="Yes" Kind="LeftSingle+RightSingle">
                (M:Event) 'RightSingle' scmp 0 == if{ 75 (&gt;K:PANEL_ID_TOGGLE) } els{ (>K:HEADING_BUG_INC) }
            </Click>
        </Area>

    </Mouse>   
  
</Gauge>

The AP follows the incorrect heading when in heading hold mode (i.e. if you select NE on the compass the aircraft turns to the NW :oops:)

Can anyone see where the error might be and offer a solution?

Thanks. 👍
 
Try adding the 90 and 270° angles to the non linearity sections. With only 0, 180, and 360° entries the needles don’t know which way to turn.
 
I added the 90 and 270 values Tom and tried 45, -45, 90, -90, and many variations thereof in the 'degrees' section and it didn't improve the situation, in fact it made it worse in some cases because I lost the North and South correct headings I had originally! :oops:
 
Did you put them in the proper numerical order, from low to high?
 
I am willing to bet the graphic for the ring is visually in reverse order than the actual value being used to drive it.
 
Try


XML:
<Nonlinearity>
        <Item Value="0" Degrees="-90"/>
        <Item Value="90" Degrees="-45"/>
        <Item Value="180" Degrees="90"/>
        <Item Value="270" Degrees=“45"/>
        <Item Value="360" Degrees="-90"/>
</Nonlinearity>

Or

XML:
<Nonlinearity>
        <Item Value="0" Degrees="-90"/>
        <Item Value="90" Degrees="45"/>
        <Item Value="180" Degrees="90"/>
        <Item Value="270" Degrees=“-45"/>
        <Item Value="360" Degrees="-90"/>
</Nonlinearity>

Or if those don’t work:

XML:
<Nonlinearity>
        <Item Value="0" Degrees="0"/>
        <Item Value="90" Degrees="90"/>
        <Item Value="180" Degrees="180"/>
        <Item Value="270" Degrees=“270"/>
        <Item Value="360" Degrees="0"/>
</Nonlinearity>

Or

XML:
<Nonlinearity>
        <Item Value="0" Degrees="0"/>
        <Item Value="90" Degrees="270"/>
        <Item Value="180" Degrees="180"/>
        <Item Value="270" Degrees=“90"/>
        <Item Value="360" Degrees="0"/>
</Nonlinearity>

And if those don’t work:

XML:
<
Nonlinearity>
        <Item Value="0" Degrees="270"/>
        <Item Value="90" Degrees="180"/>
        <Item Value="180" Degrees="90"/>
        <Item Value="270" Degrees=“0"/>
        <Item Value="360" Degrees="270"/>
</Nonlinearity>

Or

XML:
<
Nonlinearity>
        <Item Value="0" Degrees="270"/>
        <Item Value="90" Degrees="0"/>
        <Item Value="180" Degrees="90"/>
        <Item Value="270" Degrees=“180"/>
        <Item Value="360" Degrees="270"/>
</Nonlinearity>

And if those don’t work:

XML:
<
Nonlinearity>
        <Item Value="0" Degrees="90"/>
        <Item Value="90" Degrees="180"/>
        <Item Value="180" Degrees="270"/>
        <Item Value="270" Degrees=“0"/>
        <Item Value="360" Degrees="90"/>
</Nonlinearity>

Or

XML:
<
Nonlinearity>
        <Item Value="0" Degrees="90"/>
        <Item Value="90" Degrees="0"/>
        <Item Value="180" Degrees="270"/>
        <Item Value="270" Degrees=“180"/>
        <Item Value="360" Degrees="90"/>
</Nonlinearity>
 
I tried them all Tom and none worked correctly! :eek:

The nearest was the 6th set. i.e.:

Code:
<Nonlinearity>
        <Item Value="0" Degrees="270"/>
        <Item Value="90" Degrees="0"/>
        <Item Value="180" Degrees="90"/>
        <Item Value="270" Degrees="180"/>
        <Item Value="360" Degrees="270"/>
    </Nonlinearity>

In that case I get the following compass headings confirmed by 'Shift+Z', AP heading value and HSI heading value:

Set Value Gives Compass Heading
360° N - N
045° NE - NW
090° E - W (reversed)
135° SE - SW
180° S - S
225° SW - SE
270° W - E (reversed)
315° NW - NE
360° N - N

It is very odd behavior and one of Nigel's beta testers told be he had a bear of a time with it during development and it might have been left as non-functional in the release version!

The bottom line is the aircraft now behaves correctly with a pop-up AP and HSI but it would have been nice to get the original compass working as I wanted to put it in all my vintage aircraft. :(
 
Last edited:
How about:

XML:
<Nonlinearity>
        <Item Value="360" Degrees="270"/>
        <Item Value="270" Degrees="0"/>
        <Item Value="180" Degrees="90"/>
        <Item Value="90" Degrees=“180"/>
        <Item Value="0" Degrees="270"/>
</Nonlinearity>
 
Or go with the original non-linearity values and remove the final - sign from the value statement?
 
I will check in the AM as I was just doing a final round of the forums before turning in for the night. ;)
 
Tom we are getting so close I can almost smell victory! :D

The code in Post #10 has fixed the compass ring so that it now corresponds to the correct headings at all times. The only thing to fix now is the needle as it is only correct at the N and S positions and is 180° out at the E and W positions! Have a look at the following screens and note the values in the marked rings compared to the needle position.

North
N.jpg

North-East
NE.jpg

East
E.jpg

South-East
SE.jpg

South
S.jpg


Continued in next post due to image limitations................
 
.....Screens continued:

South-West
SW.jpg

West
W.jpg

North-West
NW.jpg

Back to North
N2.jpg


Looking at the original code I'm not sure just what is driving the needle position but at least the compass ring is now correct! 👍
 
Looking at all the shots above it now seems like the needle is moving in a CW direction while the compass ring is moving in a CCW direction.
 
CRACKED IT!!!!!!!!!

After a bit of trial and error I realized that one block of code controls the rotation of the compass ring and the other block of code controls the compass needle. After some trial and error and cutting and pasting of code blocks in the needle section I found a block that worked for the needle so now I have a working compass ring AND a working compass needle! :)

This is the working code for the compass needle:

XML:
<Element>
    <Position X="150" Y="150"/>
    <Image Name="compass_popup_needle.bmp" PointsTo="South">
      <Axis X="85" Y="86"/>
    </Image>
    <Rotate>
      <Value>(A:Wiskey compass indication degrees,degrees) - </Value>
    <Nonlinearity>
        <Item Value="0" Degrees="270"/>
        <Item Value="90" Degrees="0"/>
        <Item Value="180" Degrees="90"/>
        <Item Value="270" Degrees="180"/>
        <Item Value="360" Degrees="270"/>
    </Nonlinearity>
    </Rotate>
  </Element>

While this is the working code for the compass ring:

XML:
<Element>
    <Position X="150" Y="150"/>
    <Image Name="P8_Grid_Ring_mod.bmp" PointsTo="North">
    <Axis X="143" Y="143"/>
    </Image>
    <Rotate>
      <Value>(A:AUTOPILOT HEADING LOCK DIR, degrees)</Value>
    <Nonlinearity>
        <Item Value="360" Degrees="270"/>
        <Item Value="270" Degrees="0"/>
        <Item Value="180" Degrees="90"/>
        <Item Value="90" Degrees="180"/>
        <Item Value="0" Degrees="270"/>
    </Nonlinearity>
    </Rotate>
  </Element>

Thanks for all the assistance Tom (and also the suggestion from 'WarpD') because I couldn't have done it without you. Now I need to test it in all my other vintage birds too!
 
Glad to hear you finally figured it out. Those things can be really frustrating.
 
Back
Top