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

ADF needle problems.

Zeiten

Resource contributor
Messages
444
Country
norway
Hi!

Having some funny things happening to my ADF needle.

If I tune into an ADF on the right side of the plane the needle points just fine and accurate toward the station, but if the station is on the left side of the plane the needle just points forwards, but as soon as the planes turns so the station is somewhere in the range of 0 - 180 * to the right the needle moves again.

The needle have 360 KF starting at 0 and rotating to the right.

Code:
  <PartInfo>
      <Name>mip_rdmmi_needle_adf1</Name>
      <AnimLength>360</AnimLength>
      <Animation>
      <Parameter>
           <Sim>
             <Variable>ADF RADIAL:1</Variable>
               <Units>degrees</Units>
               <Scale>1</Scale>
               <MinValue>0</MinValue>
               <MaxValue>360</MaxValue>
           </Sim>
     </Parameter>
      </Animation>
</PartInfo>
 
You need to "normalize" the ADF Radial's returned value. While you're at it, you may as well include some script to "park" the needle whenever there's no valid signal, or the master battery and/or avionics power is off:

Code:
        <Code>
          (A:ELECTRICAL MASTER BATTERY,bool)
          (A:AVIONICS MASTER SWITCH,bool)
          and
          if{ (A:ADF Radial:1,degrees) dnor }
          els{ 90 }
        </Code>
 
Who would have known :rolleyes:

Expect you off course:D

Thanks for the fast reply.

Edit

And suddenly the VOR needle came to life as well :)
 
Last edited:
I'll spare you the technical reasons, but suffice it to say that the return is "pseudo-degrees" which is why it has to be "normalized" in order to work properly. I learned this many years ago during a discussion with one of the crackerjack programmers in the FS World, "WarpD"... :cool:

EDIT: Corrected attribution 8/25/2012
 
Last edited:
Odd that since the last forum software update, all of the oldest threads are now in reverse order, and all code snippets are throughly mangled...

Nonetheless, there's nothing in that thread that discusses "pseudo-degrees" nor the requirement to "normalize" the calculated value with the "dnor" operator.

This thread however (http://forums1.avsim.net/topic/73527-adf-needle-note-c-gauges/page__hl__pseudo-degrees) seems to have been the genesis of my faulty memory.

Kudo's instead indeed belong to Ed, who is a "crackerjack programmer!" :wizard:
 
Back
Top