Jump to content

Archived

This topic is now archived and is closed to further replies.

Bert Pieke

Setting the Fuel Selector

Recommended Posts

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

Share this post


Link to post
Share on other sites

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. 


Roman_Full_combo_AVSIM_2.png?dl=1  FS RTWR   SHRS F-111   JoinFS Host/Client 

 

Yamaha CR 1000/JBL 2500, AMD 965 BE OC'd @ 3.88, RipJaw 2x4GB 1600 CL7, Gigabyte GTX-1070 OC 8GB, Asus M4A87TD EVO (AMD 870), Samsung 850 EVO 256GB & 1TB SSDs, WD 1T & 500G Black, 19" & 32" LCD, Win7 Pro 64bit, TMaster T-Flight HOTAS, FSX/FS9, FSUIPC / LUA, FSRealWX Pro, PlanG, JoinFS, LittleNavMap
Copilot - Samantha the "Hound"  RIP 😞        
       samantha.jpg?dl=1

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!  


Roman_Full_combo_AVSIM_2.png?dl=1  FS RTWR   SHRS F-111   JoinFS Host/Client 

 

Yamaha CR 1000/JBL 2500, AMD 965 BE OC'd @ 3.88, RipJaw 2x4GB 1600 CL7, Gigabyte GTX-1070 OC 8GB, Asus M4A87TD EVO (AMD 870), Samsung 850 EVO 256GB & 1TB SSDs, WD 1T & 500G Black, 19" & 32" LCD, Win7 Pro 64bit, TMaster T-Flight HOTAS, FSX/FS9, FSUIPC / LUA, FSRealWX Pro, PlanG, JoinFS, LittleNavMap
Copilot - Samantha the "Hound"  RIP 😞        
       samantha.jpg?dl=1

 

Share this post


Link to post
Share on other sites

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    34%
    $8,560.00 of $25,000.00 Donate Now
×
×
  • Create New...