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

GPU Voltage Problem

Messages
1,084
Country
us-northcarolina
I have modified a gauge I found here to have the bmp's I want for WWII B24J for the ground power electrical generator. I am able to get the background bmp and the start and stop bmps to show and seem to function when clicked properly. The Voltagte "Red" readout also shows but its 0.0 and does not go to 28Volts which it should when start is pushed. What is wrong with this code? I am enclosing the entire gauge. I'm guessing that the problem is with the voltage element but tried to find the answer in the MSN ESP SDK for gauges and could not find the answer so please help me out.

Code:
<Gauge Name="AF GPU" Version="1.0">
   <Image Name="gpu.bmp"/>
   <Element>
      <Position X="158" Y="125"/>
      <Select>
         <Value>(L:StartGroundCart,bool)</Value>
         <Case Value="1">
            <Image Name="gpu_on.bmp"/>
         </Case>
      </Select>
   </Element>
   <Element>
      <Position X="158" Y="172"/>
      <Select>
         <Value>(L:StartGroundCart,bool)</Value>
         <Case Value="0">
            <Image Name="gpu_off.bmp"/>
         </Case>
      </Select>
   </Element>
   <Element>
      <Position X="158" Y="215"/>
      <Text Bright="Yes" X="85" Y="30" Length="6" Fixed="Yes" Font="Arial" Color="RED" Adjust="Center" VerticalAdjust="Top">
         <String>%((A:APU Volts, volts))%!3.1f! Volts)  d 0 == ?)%!3d!</String>
      </Text>
   </Element>
   <Mouse>
      <Area Left="180" Top="140" Width="10" Height="30">
         <Cursor Type="Hand"/>
         <Tooltip>START GPU</Tooltip>
         <Click>1 (>L:StartGroundCart,bool)
        1 (>K:APU_STARTER) 1 (>K:APU_GENERATOR_SWITCH_SET)
      </Click>
      </Area>
      <Area Left="180" Top="190" Width="10" Height="30">
         <Cursor Type="Hand"/>
         <Tooltip>STOP GPU</Tooltip>
         <Click>0 (>L:StartGroundCart,bool)
        0 (>K:APU_GENERATOR_SWITCH_SET) (>K:APU_OFF_SWITCH)
      </Click>
      </Area>
   </Mouse>
</Gauge>
 
maybe try? -
XML:
<String>%((A:APU Volts, volts) s1 0 ==)%{if}%(l1)%!03d!%{else}%(l1)%!3.1f!%{end}</String>
 
A non-jet aircraft does not typically have an APU, at least that's how the sim sees it. For it to function, you have to add the following to the aircraft.cfg file:
Code:
[Auxiliary Power Unit]
available = 1
 
Hi Warp D thank you for your reply. I am aware that the non-jets do not have an apu but do connect ground power. This is for a GPU for a Consolidated B-24 Liberator which used a GPU to start all their engines if it was available though the DID have an APU gasoline generator onboard the aircraft.
 
spokes2112 it works I think but the red type is so small I can't read it at all. How should the text code be done. I have tried a few different things and nothing works to make it larger. I can't seem to find that in the SDK.
 
I am talking about the sim... not the real world aircraft. There is no APU in a non-jet aircraft in the sim without adding that section to the aircraft.cfg file. I tell you this because you are using APU events and APU variables to simulate the GPU so that there's actual voltage.
 
<Text Bright="Yes" X="85" Y="30" Length="6" Fixed="Yes" Font="Arial" Color="RED" Adjust="Center" VerticalAdjust="Top">

X="85" - the width of the text string area
Y="30" - the height of the text string area
Length="6" - the max number of characters to fit in the text area, in your case it should be a 3 or 4
Fixed="Yes" - all text should fit on a single line

The described above plus the following will all have an effect on legibility of the text.
The panel.cg entry of gauge size(s) X & Y will also have an effect as a ratio of gauge text size X,Y versus total gauge size X,Y.

FontHeight - Height of the characters in pixels.
FontWeight - Integer, 0 for normal text. Increase for bolder text. (tested - 400 = normal, 800 = bold)
-or- (have never used below from SDK, always used weight)
Bold Set to True for bold text. IE Bold="Yes"

With all the above and no way to test (lacking bitmaps) the following may work. The only way to know is to test, adjust, test again ......
Bold code below is changed values from the original. (X is increased to 100 to allow increased font size & bold text)
<Text Bright="Yes" X="100" Y="30" FontHeight="26" FontWeight="800" Length="3" Fixed="Yes" Font="Arial" Color="Red" Adjust="Center" VerticalAdjust="Center">

Reference, applies to FSX too.
 
I am talking about the sim... not the real world aircraft. There is no APU in a non-jet aircraft in the sim without adding that section to the aircraft.cfg file. I tell you this because you are using APU events and APU variables to simulate the GPU so that there's actual voltage.
got it thank you. I added the auxiliary power unit to the aircraft.cfg so that it would work for this WWII recip aircraft.
 
<Text Bright="Yes" X="85" Y="30" Length="6" Fixed="Yes" Font="Arial" Color="RED" Adjust="Center" VerticalAdjust="Top">

X="85" - the width of the text string area
Y="30" - the height of the text string area
Length="6" - the max number of characters to fit in the text area, in your case it should be a 3 or 4
Fixed="Yes" - all text should fit on a single line

The described above plus the following will all have an effect on legibility of the text.
The panel.cg entry of gauge size(s) X & Y will also have an effect as a ratio of gauge text size X,Y versus total gauge size X,Y.

FontHeight - Height of the characters in pixels.
FontWeight - Integer, 0 for normal text. Increase for bolder text. (tested - 400 = normal, 800 = bold)
-or- (have never used below from SDK, always used weight)
Bold Set to True for bold text. IE Bold="Yes"

With all the above and no way to test (lacking bitmaps) the following may work. The only way to know is to test, adjust, test again ......
Bold code below is changed values from the original. (X is increased to 100 to allow increased font size & bold text)
<Text Bright="Yes" X="100" Y="30" FontHeight="26" FontWeight="800" Length="3" Fixed="Yes" Font="Arial" Color="Red" Adjust="Center" VerticalAdjust="Center">

Reference, applies to FSX too.
I just copied all this to Notepad++ and saved it so that I have your reply to work with offline this morning. Thank you for taking the time and explaining this. I am going to test it again in a few minutes and realize as with all gauges even ESP says its: test! test! test! FSX(A) over and over but the satisfaction when it DOES work like we wanted is great.
 
I tried this and still did not get a nice large readout. I could see a blinking red line when it was energized but could not read it. Another problem...the engines are not receiving starter voltage. Doug Dawson made a battery charger for Carenado that I remembered that I used in the past and uploaded that which worked perfectly but I would like MINE to work. Attached is a zip folder of the gauge with bmp's. I appreciate your help trying to fix this.
 

Attachments

The engine voltage gauges still show no voltage and the readout text is still nothing but a thin red line.
 
Been testing all afternoon and here is the last thing I did with the code and a photo of the result in FSX(A).
Code:
 <Element>
      <Position X="100" Y="50"/>
      <Text Bright="Yes" X="100" Y="50" Length="4" Fixed="Yes" FontHeight="24" FontWeight="0" Font="Arial" Color="RED" Adjust="Center" VerticalAdjust="Top">
         <String>%((A:APU Volts, volts))%!3.1f! Volts</String>
      </Text>
   </Element>

the latest AFGPU.jpg


There is only the top half of the text as you can see. It DOES spool up from 0.0 when off to 28.0 when clicked on as now
 
At least you should see 0.0 !

I never used FontHeight="26" FontWeight="0".
Delete them or change the values.especially Fontweight "0" . look into the SDK which it's meaning.

Saw just image. You half a "28.0"
I would say change x ="200". Or Fontheight smaller . And maybe "y" a bit larger.
 
I experimented with those values and compared with Doug Dawson's Battery charger Text Element and noticed that Vertical Adjust= Top and his said Center and when I changed it it got better and then changing x and y I got it done. NOW is the Engine Voltages with the engines shut down supposed to register 28Volts when I have the GPU connected on just when the engine generators are running? Any thought? Otherwise I can't tell if the GPU is operating correctly or not.
 
At last, last night, success. Here is a jpg of the final result.
 

Attachments

  • Success.jpg
    Success.jpg
    64.9 KB · Views: 238
Back
Top