Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Setting the Fuel Selector

Featured Replies

I find that the Fuel Selector setting carries over from the C172 to another aircraft (Kodiak).

 

If the C172 selector is set to "Left", and I switch to the Kodiak, it uses the left tank (only).

 

No amount of:

 1 (>K:FUEL_SELECTOR_ALL) 

 1 (>K:FUEL_SELECTOR_2_ALL) 

seems to cure that behavior.

 

If I go back to the C172, move the selector to "Both", and go back to the Kodiak, it now uses both tanks.

 

What am I doing wrong?

Bert

Bert,
 
 It's very strange, the whole fuel setup for the Kodiak. First off in the aircraft.cfg it has -

number_of_tank_selectors = 2

That should be one since there is only one engine. 
 

SDK - Number of fuel tank selectors (maximum 4 and should be less than or equal to the number of engines).

 
Then, in Kodiak_Fuel_Selectors.xml (2D) the code is only using "Fuel Valves" not "Fuel Selectors". Valves are a totally different animal compared to Selectors. That is why it follows the same tank configuration from the previously selected aircraft.
 
Via FSUIPC logging the VC follows this same convention of using valves vs. selectors. Unfortunately this will keep one from selecting separate tanks (Bummer, hard coded in VC) - once maybe fixed. Selection of separate tanks could be done via the 2D popup with a rewrite of "Kodiak_Fuel_Selectors.xml" with a touch of tank/valve select logic.
 
Do not know why your commands don't work - strange.
 
What I would do is -

  •   Change the aircraft.cfg to "number_of_tank_selectors = 1"
  •   Use the following code in a non visible XML logic gauge mounted in the VC - 
<Gauge Name="Kodiak Fuel Selector Logic" Version="1.0">
<Update>
<!-- THIS UPDATE ONLY WORKS IF THE DEFAULT KODIAK FUEL VALVES ARE ON --> 
(A:GENERAL ENG FUEL VALVE:1, bool) if{ (A:FUEL TANK SELECTOR 1, enum) 1 != if{ 1 (>K:FUEL_SELECTOR_SET) } }
</Update>
</Gauge>

If that still doesn't work then there is some logic in the model animation that is keeping the commands from working.
 
Nice flying with you on Saturday  B)

 

EDIT - Just tested using FSUIPC and it works, used the "F" key to command Fuel Selector Set with a parameter of 2 ( Left Tank) and then monitored  0x0AF8 (U16)  "Fuel tank selector" . As soon as I hit "F" the output went to 2 (Left Tank) for just a second then back to 1 (All Tanks) . That should do it for ya. 

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

  • Author

Hi Roman,

 

You nailed it!

 

Changing the number of fuel selectors to  1 made things work!  :P 

 

I've got a popup fuel selector from the C182Q for now, so I can set the selector

manually, but I am going to re-code the Kodiak selectors so that they control the

selector, rather than the valve.

 

All this started, because I wanted to get the Kodiak ready for next week's Tongass Fjords

flight, and I noticed that it was using fuel only from the left tank...  :unsure:

 

You may have seen that I've got the GTN 750 working in the panel, and with the fuel

fixed, it will be like a "new plane".

 

http://www.simforums.com/forums/forum_posts.asp?TID=52578&title=flight1-gtn-in-lionheart-kodiak

 

Only thing is that our daughter is coming to visit on Saturday, and I may not be able to fly..

 

Thanks again!!

Bert

  • Author

Here is a re-coded fuel selector for the Kodiak (after setting Fuel Selectors to 1 in the aircraft.cfg file)

<!-- ========== Fuel Selector Valve - Left Wing ====== -->
  <Element>
    <Position X="330" Y="342"/>
    <Image Name="Fuel_Selector_Knob.bmp" PointsTo="North">
      <Axis X="36" Y="232"/>
    </Image>
    <Rotate>
      <Value> (A:FUEL TANK SELECTOR 1, enum)
 </Value>
      <Nonlinearity>
         <Item Value="0" X="335" Y="0"/> <!-- 0 is LH TANK OFF -->
         <Item Value="1" X="0" Y="355"/> <!-- 1 is LH TANK ON -->
         <Item Value="2" X="0" Y="355"/> <!-- 2 is LH TANK ON -->
         <Item Value="3" X="335" Y="0"/> <!-- 3 is LH TANK OFF -->
 
      </Nonlinearity>
     
    </Rotate>
  </Element>

<!-- =========== Fuel Selector Valve - Right Wing ======= -->
  <Element>
   <Position X="536" Y="342"/>
    <Image Name="Fuel_Selector_Knob.bmp" PointsTo="North">
      <Axis X="36" Y="232"/>
    </Image>
    <Rotate>
      <Value> (A:FUEL TANK SELECTOR 1, enum) </Value>
      <Nonlinearity>

         <Item Value="0" X="530" Y="0"/>    <!-- 0 is RH TANK OFF -->
         <Item Value="1" X="875" Y="344"/> <!-- 1 is RH TANK ON -->
         <Item Value="2" X="530" Y="0"/>    <!-- 2 is RH TANK OFF -->
         <Item Value="3" X="875" Y="344"/> <!-- 3 is RH TANK ON -->
                  
      </Nonlinearity>
      
    </Rotate>
  </Element>

 <Mouse>

<!-- ============== Selector Position Info ============== 
    <Area Left="0" Top="0" Right="875" Bottom="513">
      <Tooltip ID="TOOLTIPTEXT_FUEL_SELECTOR"/>
    </Area>  -->

<!-- ========== LH Tank Selector Mouse Control ============ -->
   <Area Left="10" Top="100" Right="430" Bottom="300">
  // LH Fuel Shutoff
    <Cursor Type="Hand"/>
    <Click>

      (A:FUEL TANK SELECTOR 1, enum) 1 == if{ 3 (>K:FUEL_SELECTOR_SET) }
      (A:FUEL TANK SELECTOR 1, enum) 2 == if{ 0 (>K:FUEL_SELECTOR_SET) }


       </Click>
  </Area>

  <Area Left="10" Top="301" Right="430" Bottom="400">
  // LH Tank ON
     <Cursor Type="Hand"/>
    <Click>

      (A:FUEL TANK SELECTOR 1, enum) 0 == if{ 2 (>K:FUEL_SELECTOR_SET) }
      (A:FUEL TANK SELECTOR 1, enum) 3 == if{ 1 (>K:FUEL_SELECTOR_SET) }


    </Click>
  </Area>                         

<!-- ============ RH Tank Selector Mouse COntrol ============= -->
   <Area Left="450" Top="100" Right="850" Bottom="300">
  //RH Fuel Shutoff
      <Cursor Type="Hand"/>
       <Click>

      (A:FUEL TANK SELECTOR 1, enum) 1 == if{ 2 (>K:FUEL_SELECTOR_SET) }
      (A:FUEL TANK SELECTOR 1, enum) 3 == if{ 0 (>K:FUEL_SELECTOR_SET) }


       </Click>
   </Area>

   <Area Left="450" Top="301" Right="850" Bottom="400">
    //RH Tank ON
     <Cursor Type="Hand"/>                               
     <Click>

      (A:FUEL TANK SELECTOR 1, enum) 0 == if{ 3 (>K:FUEL_SELECTOR_SET) }
      (A:FUEL TANK SELECTOR 1, enum) 2 == if{ 1 (>K:FUEL_SELECTOR_SET) }


       </Click>
   </Area>

Bert

Bert,

 

 Very nice! Both the code & the GTN integration.  :Applause:

 

I will not be able to fly this Saturday. Either, flying in a C-45H, WX permitting, or driving up to Menominee, MI for a tour of Enstrom Helicopter.. If you make the flight - have a good one!  

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.