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

FSX Directional Gyro Problem

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
This simple directional gyro is driving me nuts. I had it working fine, but suddenly it doesn't want to allow adjusting any longer.
sFlfI.jpg


The entry in the aircraft.cfg file is correct for a heading gyro device:
Code:
[direction_indicators]
direction_indicator.0=3,1

The "compass card" is animated 360º and is driven by the correct variable. It works just fine, and allows the "D" key to autocorrect for gyro drift:
Code:
  <PartInfo>
    <Name>FIP_Heading_Gyro</Name>
    <AnimLength>360</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:PLANE HEADING DEGREES GYRO, degrees)</Code>
      </Parameter>
    </Animation>
  </PartInfo>
There is also an adjustment knob, which likewise is using the correct K:events:
Code:
  <PartInfo>
    <Name>FIP_CompassCal</Name>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>WheelUp+WheelDown</MouseFlags>
      <CallbackCode>
        (M:Event) 'WheelUp' scmi 0 == if{ (>K:GYRO_DRIFT_DEC) quit }
        (M:Event) 'WheelDown' scmi 0 == if{ (>K:GYRO_DRIFT_INC) quit }
      </CallbackCode>
    </MouseRect>
  </PartInfo>
As I said, it was working just fine for the first few export/compile/test cycles, but now the mouse events have no effect at all.

FSUIPC "Logging" confirms that the two events are being triggered by the mouse wheel, so I'm at a complete loss.
sFlnY.png
 
It looks solid. Is it possible that there is a syntax error in a different part of modeldef.xml that's messing it up? Like accidentally deleting a character/entry while editing/comiling/testing.
 
Bill,
As I recall, a directional gyro, once uncaged, will give as gyro heading whatever direction it is pointing at when uncaged. It then has to be set to whatever the magnetic compass(s) show.
After that it will gradually drift and become less accurate, so you reset it carefully in level flight back to magnetic heading.

The sim is a bit different, the gyro gives true heading all the time. If it has drifted off there is a variable GYRO DRIFT ERROR which gives "Angular error of heading indicator" in radians.
Should that variable show an error you can adjust it with >K:GYRO_DRIFT_DEC or INC. This would probably be in 1/1024 of a radian increments unless you had "repeat" in the code.
Now I know you knew all that, but suppose you had no error because PLANE HEADING DEGREES GYRO was spot on (and why would it not be?) What will GYRO_DRIFT do then? Nothing I would suspect.
I guess your best test would be to see what if any value GYRO DRIFT ERROR has.
Roy
 
Roy, that sounds entirely reasonable except for the fact that in FSX the way it is currently scripted, the correction knob was rotating the compass card.

Now, one export/compile later it is not. No changes were made to the modeldef.xml in the interim. I cannot explain this rather sudden change in behavior.
 
Last edited:
Bill,
Then >K:GYRO_DRIFT_DEC or INC creates the GYRO DRIFT ERROR which would otherwise stay zero.
The value of PLANE HEADING DEGREES GYRO then becomes true heading plus the created drift error.
The most obvious use for the correction would be to set the gyro to read magnetic heading, like I recalled above. And GYRO DRIFT ERROR would equal mag var.

Sorry that did nothing to help!
Roy
 
When using this line:

direction_indicator.0=3,1

you are saying that this indicator is slaved to direction_indicator.1, but you have no such indicator listed.

It might work by changing this to:

direction_indicator.0=3,0

That's what I use.
 
Tom, that made no difference whatever. It just baffles me how it could work as designed then suddenly just stop working! :banghead:

Roy, Gyro Drift Error remains stubbornly at 0.00 always. Again as above, going from "working" to "not working" makes no sense.
 
To put a period to this thread, the correct answer was to change the parameter back to 1,0...

[direction_indicators]
direction_indicator.0=1,0
 
Yes, but the DG is vacuum driven, not electric. Cessna T-50 Bobcat. Very ancient technology. ;)
 
I say! Steady on! I learnt to fly using a vacuum DG and artificial horizon and a very nice P-type compass. But the old jokes are the best!
Roy
 
Last edited:
I was just wondering why 1,0 worked and 3,0 didn't, that's all.
 
Bill,
I have no idea why you got it to work with 3,0 because that denotes an Electro-mag slaved compass.
In that kind of system a magnetic slaving transmitter senses the direction of the earth's magnetic field and automatically corrects the DI for precession or drift. So it then outputs corrected magnetic heading.
In a type 1,0 the vacuum DI adds the input of gyro drift error when present to output corrected gyro heading. If the correction was mag var it would output corrected magnetic heading.
Your type 3 is already corrected so it should not allow gyro drift error inputs.
Roy
 
Roy, I suspect that the little gremlin that lives in my computer was spoofing me and laughing his ass off all the while! :rotfl:
 
Back
Top