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

FS2004 Bar Readout animation

Messages
10,163
Country
us-arizona
Hey guys,

I am making a bar readout. It will show throttle input, zero to 100%. It moves horizontally.

I am using bits of the FS2004 747 ECIAS gauge that has 'bars' for readouts, zero point is bottom, moves upwards. I am trying to adopt it.

For some reason, its not showing up in my plane. Does anyone see a reason it isnt?

Code:
            <Element>
               <Position X="1175" Y="60"/>
               <MaskImage Name="PowerBarAlpha.bmp" Bright="Yes" ImageSizes="155,53"/>
                     <Image Name="PowerBar.bmp" Bright="Yes" ImageSizes="145,42"/>
               <Shift>
                  <Value Minimum="0" Maximum="100">(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent) </Value>
                  <Nonlinearity>
                     <Item Value="0" X="0" Y="0"/>
                     <Item Value="100" X="200" Y="0"/>
                  </Nonlinearity>
               </Shift>
            </Element>

Should there be something after the 'percent' area?
<Value Minimum="0" Maximum="100">(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent) </Value>


Many thanks for any input.
 

Attachments

  • Capture.JPG
    Capture.JPG
    89.2 KB · Views: 409
Another one of many tries. Found some issues. Still, the bar object will not show up. I am removing the Alpha layer and just trying to get an object to appear now, and that isnt even working.

Code:
      <Element>
          <Position X="1175" Y="60"/>
              <Image Name="PowerBar.bmp" PointsTo="East" Luminous="Yes" ImageSizes="145,42">
                  <Axis X="0" Y="21"/>
              </Image>
                  <Nonlinearity>
                      <Value Minimum="0" Maximum="100">(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent)</Value>
                                 <Item Value="0" X="0" Y="0"/>
                                 <Item Value="50" X="200" Y="0"/>
                                 <Item Value="100" X="400" Y="0"/>
                 <Delay DegreesPerSecond="20"/>
                  </Nonlinearity>
      </Element>
 
This is the N1 coding for a vertical bar readout (animated) dual color. This is what I am going from, or was going from.

Code:
            <Element>
               <Position X="0" Y="0"/>
               <MaskImage Name="EICAS1_N1_Alpha.bmp" Bright="Yes" ImageSizes="25,40,40,64"/>
               <Select>
                  <Value>(A:Turb eng1 N1, part) abs 1 &lt;</Value>
                  <Case Value="1">
                     <Image Name="EICAS1_N1_WhiteBar.bmp" Bright="Yes" ImageSizes="25,40,40,64"/>
                  </Case>
                  <Case Value="0">
                     <Image Name="EICAS1_N1_RedBar.bmp" Bright="Yes" ImageSizes="25,40,40,64"/>
                  </Case>
               </Select>
               <Shift>
                  <Value Maximum="1">(A:Turb eng1 N1, part) abs</Value>
                  <Nonlinearity>
                     <Item Value="1" X="0" Y="0"/>
                     <Item Value="0" X="0" Y="25"/>
                  </Nonlinearity>
               </Shift>
            </Element>
         </Element>
         <Element>
            <Position X="31" Y="78"/>
            <Image Name="EICAS1_N1_Normal.bmp" Bright="Yes" ImageSizes="25,40,40,64"/>
            <Element>
               <Position X="2" Y="1"/>
               <Text X="21" Y="9" Bright="Yes" Length="5" Font="Arial" Color="%('#FFFFFF' '#FB4747' (A:Turb eng2 N1, percent) 100 &gt;= ! ?)" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                  <String>%((A:Turb eng2 N1, percent) abs)%!5.1f!</String>
               </Text>
            </Element>

The Normal layer, bottom, appears to be the top with zero zero zero as the black color in the transparent zones. The Alpha has 1, 1, 1 as the 'show up' zones. I do not need the Normal layer, just the Alpha and the actual bar, right?

And you tell I have never done 'bars' before?
 
Ok, added shift. But nothing. Still, the power bar object should be showing in the screen, in the PFD.
 
Ok, found out why the object wasnt even showing up, lol... Misnamed it. Its PowerBarGreen.bmp, but it is not animating.

Code:
      <Element>
          <Position X="1175" Y="60"/>
              <Image Name="PowerBarGreen.bmp" PointsTo="East" Luminous="Yes" ImageSizes="145,42">
                  <Axis X="0" Y="21"/>
              </Image>
                  <Shift>
                      <Value Minimum="0" Maximum="100">(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent)</Value>
                                 <Item Value="0" X="0" Y="0"/>
                                 <Item Value="50" X="200" Y="0"/>
                                 <Item Value="100" X="400" Y="0"/>
                  </Shift>
      </Element>
 
nonLinearity in the wrong spots/missing??

Code:
                  <Shift>
                      <Value Minimum="0" Maximum="100">(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent)</Value>
                            <nonLinearity>
                                 <Item Value="0" X="0" Y="0"/>
                                 <Item Value="50" X="200" Y="0"/>
                                 <Item Value="100" X="400" Y="0"/>
                            </nonlinearity>
                  </Shift>
 
Ron,

Many thanks. I had found that. What I didnt notice was that the bar was showing up at the top left of the PFD instead of over where the 'position' stated it was to be. For some reason, it over-rided the Position setting. It was there the entire time.

man... I do not envy coders. You guys.... This is grim. 2+ hours to make a single little gizmo element in a PFD. ACK!!!!!!!!!!!!!!!!!!!!!!

Working code for one color coded segment of the system;

Code:
<!-- ////////////////////////////// GREEN POWER BAR -->
      <Element>
          <Position X="1176" Y="60"/>
            <Visible>5 75.9 (A:GENERAL ENG THROTTLE LEVER POSITION:1, percent) rng </Visible>
               <MaskImage Name="PowerBarAlpha.bmp" Bright="Yes" ImageSizes="155,53"/>
              <Image Name="PowerBarGreen.bmp" PointsTo="East" Luminous="Yes" ImageSizes="145,42">
                  <Axis X="0" Y="21"/>
              </Image>
               <Shift>
                <Value Minimum="0" Maximum="100">(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent)</Value>
                  <Nonlinearity>
                                 <Item Value="0"   X="1036" Y="82"/>
                                 <Item Value="50"  X="1110" Y="82"/>
                                 <Item Value="100" X="1180" Y="82"/>
                  </Nonlinearity>
               </Shift>
      </Element>

75% power turns yellow, then red above 90%.



While you are here, do you see an issue with this one? I need a blue bar to show up when the plane is in flight and moving and zero throttle. For some reason, it isnt working.

Code:
<!-- ////////////////////////////// BLUE POWER BAR -->
      <Element>
          <Position X="1176" Y="60"/>
            <Visible> (A:GENERAL ENG THROTTLE LEVER POSITION:1, percent) 5 &lt;
                      (A:VELOCITY BODY Z,knot) 20 &gt;
                      (A:SIM ON GROUND,bool) 0 !
                      and and
            </Visible>
               <MaskImage Name="PowerBarAlpha.bmp" Bright="Yes" ImageSizes="155,53"/>
              <Image Name="PowerBarBlue.bmp" PointsTo="East" Luminous="Yes" ImageSizes="145,42">
                  <Axis X="0" Y="21"/>
              </Image>
               <Shift>
                <Value Minimum="0" Maximum="100">(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent)</Value>
                  <Nonlinearity>
                                 <Item Value="0"   X="1036" Y="82"/>
                                 <Item Value="50"  X="1110" Y="82"/>
                                 <Item Value="100" X="1180" Y="82"/>
                  </Nonlinearity>
               </Shift>
      </Element>

This combination doesnt seem to work. I have tried a few variations.
(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent) 5 &lt;
(A:VELOCITY BODY Z,knot) 20 &gt;
(A:SIM ON GROUND,bool) 0 ==
and and


Bill
 
Hello Bill:

I don't know very much about XML, however I managed to rework some old gauges for my old Bell 407 where I used bars in someway. The original gauge code was written by Manuel Gonzalez; I only added some colors. Bear with me, for sure the codes (without insulting anyone) are not very efficient but you'll have a few hints, and hopefully, you might get some ideas. Here are a few images:

Bell_407_cockpit2_01.jpg


Bell_407_cockpit2_02.jpg


Gauges, graphics and XML codes:
https://mega.nz/#!9EgBDQaL
Key:
!TEftxCYHK2HkOONmfazZ40sWkDsVmqpdeZWQXF84KRY

Also, I recommend to revise Nike Pike's tutorials (the first one deals precisely with your idea):
https://mega.co.nz/#!pNIDBC4K!5yIm3jAcZgeEguX-j8emlfEjDADyG9AUgfEGVDuOEoc

Kindest regards,
Sergio.
:)
 
Last edited:
Many thanks Sergio.

Brilliant work on those gauges.

I need to get back into Helos again. I havent been practicing hovering in quite some time.
 
Bill:

Your welcome my friend and thank you for your kind words. From time to time a helicopter flight is good for the soul!
;)
 
Back
Top