• 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 How to convert a RadAlt gauge from metres to feet?

Messages
455
Country
ca-ontario
Hi Folks, I wanted a digital RadAlt gauge for a P3D pop-up panel I am building for helicopters (personal use only). I found one in a cab file for an Antonov AN12. I have no idea how long I have had the cab file or which sim it was meant for but it works in FSX and it works in P3D (sort of). The gauge reads in metres and ideally I would like it to read in feet. Can someone check over the code below and maybe suggest what line(s) I need to change to make the gauge read in feet. Thanks.

XML:
<Gauge Name="ZH_Ralt_win" Version="1.0">
   <Image Name="ZH_Ralt_win_Mask.bmp" ImageSizes="120,38"/>
   <Element>
   <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,bool)</Visible>
   <MaskImage Name="ZH_Ralt_win_Mask.bmp" Bright="Yes" ImageSizes="120,38">
         <Axis X="0" Y="7"/>
      </MaskImage>
      <Image Name="ZH_Ralt_strip.bmp" Bright="Yes" ImageSizes="33,343">
         <Nonlinearity>
            <Item Value="0" X="6" Y="5"/>
            <Item Value="9" X="6" Y="284"/>
         </Nonlinearity>
      </Image>
      <Shift>
         <Value>(A:Radio height, meters) 0 max  s1 10000 / 10 % flr l1 10000 % 9999 &gt; if{ l1 10 % 9 - + }</Value>
      </Shift>
   </Element>
 
<Element>
   <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,bool)</Visible>
   <MaskImage Name="ZH_Ralt_win_Mask.bmp" Bright="Yes" ImageSizes="120,38">
         <Axis X="25" Y="7"/>
      </MaskImage>
      <Image Name="ZH_Ralt_strip.bmp" Bright="Yes" ImageSizes="33,343">
         <Nonlinearity>
            <Item Value="0" X="6" Y="5"/>
            <Item Value="9" X="6" Y="284"/>
         </Nonlinearity>
      </Image>
      <Shift>
         <Value>(A:Radio height, meters) 0 max  s1 1000 / 10 % flr l1 1000 % 999 &gt; if{ l1 10 % 9 - + }</Value>
      </Shift>
   </Element>
   <Element>
   <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,bool)</Visible>
   <MaskImage Name="ZH_Ralt_win_Mask.bmp" Bright="Yes" ImageSizes="120,38">
         <Axis X="50" Y="7"/>
      </MaskImage>
      <Image Name="ZH_Ralt_strip.bmp" Bright="Yes" ImageSizes="33,343">
         <Nonlinearity>
            <Item Value="0" X="6" Y="5"/>
            <Item Value="9" X="6" Y="284"/>
         </Nonlinearity>
      </Image>
      <Shift>
         <Value>(A:Radio height, meters, meters) 0 max  s1 100 / 10 % flr l1 100 % 99 &gt; if{ l1 10 % 9 - + }</Value>
      </Shift>
   </Element>
 
<Element>
   <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,bool)</Visible>  
   <MaskImage Name="ZH_Ralt_win_Mask.bmp" Bright="Yes" ImageSizes="120,38">
         <Axis X="75" Y="7"/>
      </MaskImage>
      <Image Name="ZH_Ralt_strip.bmp" Bright="Yes" ImageSizes="33,343">
         <Nonlinearity>
            <Item Value="0" X="6" Y="5"/>
            <Item Value="9" X="6" Y="284"/>
         </Nonlinearity>
      </Image>
      <Shift>
         <Value>(A:Radio height, meters) 0 max  s1 10 / 10 % flr l1 10 % 9 &gt; if{ l1 10 % 9 - + }</Value>
      </Shift>
   </Element>
 
<Element>
   <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,bool)</Visible>  
   <MaskImage Name="ZH_Ralt_win_Mask.bmp" Bright="Yes" ImageSizes="120,38">
         <Axis X="100" Y="7"/>
      </MaskImage>
      <Image Name="ZH_Ralt_strip.bmp" Bright="Yes" ImageSizes="33,343">
         <Nonlinearity>
            <Item Value="0" X="6" Y="5"/>
            <Item Value="9" X="6" Y="284"/>
         </Nonlinearity>
      </Image>
      <Shift>
         <Value>(A:Radio height, meters) 0 max 10 %</Value>
      </Shift>
   </Element>

 
</Gauge>
 
Anywhere it says (A:Radio height, meters) change it to (A:Radio height, feet)
 
DOH, as easy as that! :eek:

I thought I was going to have to change the math in each instance to do a conversion from metres to feet.:oops:

I will make the changes and report back, thanks!
 
Back
Top