• 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 Fuel Consumption/ used gauge

Messages
207
Country
us-michigan
Is it possible to have the correct code for a gauge that displays the fuel actually consumed (pounds) from each tank (L & R).

I want it displayed where the current % amount shows.

I've had gauges that show the fuel consumed, but really it is just displays how much fuel is "burned" from the total fuel system. So if I start with a lower fuel load than full, It shows I've burned so many pounds already without starting any engines yet.

here is the current code..

</Element>
<Element>
<Position X="65" Y="230" />
<Text X="60" Y="24" Bright="Yes" Length="3" Font="Arial" Color="#40FF40" Adjust="center" VerticalAdjust="Center" Multiline="No" Fixed="No">
<String>%((A:Fuel tank left main level,percent) abs)%!3.0f!</String>
</Text>
</Element>
<Element>
<Position X="202" Y="230" />
<Text X="60" Y="24" Bright="Yes" Length="3" Font="Arial" Color="#40FF40" Adjust="center" VerticalAdjust="Center" Multiline="No" Fixed="No">
<String>%((A:Fuel tank right main level,percent) abs)%!3.0f!</String>
</Text>

Thanks in advance again..

gp
 
Last edited:
gp - Try this gauge out and then modify it.

Code:
<Gauge Name="Fuel used test">
<!-- Only units of volume seem to be recognised for fuel tank quantity. Hence gallons * 6 = pounds for avgas  // 6.7 for JetA -->

  <size X="100" Y="50" />
  
  <Update>(A:General eng combustion:1,bool) 0 != (L:Startflag,bool) 0 == and (* start the gauge when the engine starts *)
      if{ (A:Fuel tank left main quantity,gallon) 6 * (>L:Left_reference,pound) (* set the reference quantity here *)
          (A:Fuel tank right main quantity,gallon) 6 * (>L:Right_reference,pound)
          (L:Startflag,bool) ! (>L:Startflag,bool) (* ignore the update routine after the first pass *)
        }
   </Update> 


  <Element>
<!-- Subtract the current gallons ,times 6 , from the reference and prevent negative values from displaying. -->

    <Position X="6" Y="15" />
    <Text X="60" Y="24" Bright="Yes" Length="3" Font="Arial" Color="#40FF40" Adjust="center" VerticalAdjust="Center" Multiline="No" Fixed="No">
      <String>%((L:Left_reference,pound) (A:Fuel tank left main quantity,gallon) 6 * - 0 max)%!3.0f!</String>
    </Text>
  </Element>
  
  <Element>
    <Position X="6" Y="35" />
    <Text X="60" Y="24" Bright="Yes" Length="3" Font="Arial" Color="#40FF40" Adjust="center" VerticalAdjust="Center" Multiline="No" Fixed="No">
      <String>%((L:Right_reference,pound) (A:Fuel tank right main quantity,gallon) 6 * - 0 max)%!3.0f!</String>
    </Text>
  </Element>
  
</Gauge>

Regards, Ted.
 
Thanks Tom..I did look at that thread earlier today and got lost...

Ted that did the trick though!!!! Thank you very much.
One item that I must be overlooking, it seems to be showing me burning avgas and this is a JetA burner. The actual fuel consumed rate is a little ahead of the fuel used counter. That is why I think it is calculating 6 instead of 6.7. What do I change??

Greg
 

Attachments

  • fq1.JPG
    fq1.JPG
    5.8 KB · Views: 510
Last edited:
The clue lies in the second line - try this:-

Code:
<Gauge Name="Fuel used test">
<!-- Only units of volume seem to be recognised for fuel tank quantity. Hence gallons * 6 = pounds for avgas  //[COLOR="Red"] 6.7[/COLOR] for JetA -->
  <size X="100" Y="50" />
  
  <Update>(A:General eng combustion:1,bool) 0 != (L:Startflag,bool) 0 == and (* start the gauge when the engine starts *)
      if{ (A:Fuel tank left main quantity,gallon) [COLOR="Red"]6.7[/COLOR] * (>L:Left_reference,pound) (* set the reference quantity here *)
          (A:Fuel tank right main quantity,gallon) [COLOR="Red"]6.7[/COLOR] * (>L:Right_reference,pound)
          (L:Startflag,bool) ! (>L:Startflag,bool) (* ignore the update routine after the first pass *)
        }
   </Update> 


  <Element>
<!-- Subtract the current gallons ,times [COLOR="Red"]6.7[/COLOR] , from the reference and prevent negative values from displaying. -->
    <Position X="6" Y="15" />
    <Text X="60" Y="24" Bright="Yes" Length="3" Font="Arial" Color="#40FF40" Adjust="center" VerticalAdjust="Center" Multiline="No" Fixed="No">
      <String>%((L:Left_reference,pound) (A:Fuel tank left main quantity,gallon) [COLOR="Red"]6.7[/COLOR] * - 0 max)%!3.0f!</String>
    </Text>
  </Element>
  
  <Element>
    <Position X="6" Y="35" />
    <Text X="60" Y="24" Bright="Yes" Length="3" Font="Arial" Color="#40FF40" Adjust="center" VerticalAdjust="Center" Multiline="No" Fixed="No">
      <String>%((L:Right_reference,pound) (A:Fuel tank right main quantity,gallon) [COLOR="Red"] 6.7[/COLOR] * - 0 max)%!3.0f!</String>
    </Text>
  </Element>
  
</Gauge>

Ted.
 
Last edited:
I changed all 5 6's to 6.7 and that didn't work. I aslo tried 6.70 and a 7 just to see. The gauge works, just displays 0's. This code is embedded in a eicas fuel gauge and wonder if some other fuel item is messing it up. I can't post the whole code right now but can later if needed.
Thanks Greg
 
Ok here is the whole fuel gauge and aircraft CFG. I also tied 6.67 a there was a discussion using that in some other thread.


[fltsim.5]
title=Falcon 2000 NetJets
sim=F2TH
model=
panel=ws
sound=
texture=NetJets
kb_checklists=
kb_reference=
atc_id=N221QS
atc_airline=EXECJET
atc_flight_number=221
ui_manufacturer=Dassault
ui_type=Falcon 2000
ui_variation=NetJets
description=Falcon 2000 NetJets
atc_heavy=0

[General]
atc_type=NONE
atc_model=F2TH
editable=1
performance=Normal cruise speed: Mach .77\nCeiling: 43,000 ft\nRange: 3000 nm\nMax Seating: 5 + Crew

[pitot_static]
vertical_speed_time_constant = 1 // Increasing this value will cause a more instantaneous reaction in the VSI

[WEIGHT_AND_BALANCE] // All weights Lbs => 1 Lbs = 0.4536 KgLbs
max_gross_weight = 42200.00
empty_weight = 20735.00

reference_datum_position=0.000000,0.000000,0.000000
empty_weight_CG_position=1.000000,0.000000,0.000000

max_number_of_stations=14

station_load.0=150, 12, -1.2, 0.0 //Pilot Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.1=150, 12, 1.2, 0.0 //Co-Pilot Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.2=160, 6.0, -1.2, 0.0 //Pssngr 1 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.3=160, 6.0, 1.2, 0.0 //Pssngr 2 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.4=120, 0.0, -1.2, 0.0 //Pssngr 3 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.5=120, 0.0, 1.2, 0.0 //Pssngr 4 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.6=160, -6.0, -1.2, 0.0 //Pssngr 5 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.7=160, -6.0, 1.2, 0.0 //Pssngr 6 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.8=140, -10.0, -1.2, 0.0 //Pssngr 7 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.9=140, -10.0, 1.2, 0.0 //Pssngr 8 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.10=90, 6.0, -1.2, 0.0 //Pssngr 9 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.11=90, 6.0, 1.2, 0.0 /Pssngr 10 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.12=60, -8.0, 2.0, 0.0 //Baggage2 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)
station_load.13=60, -8.0, 2.0, 0.0 //Baggage2 Weight(lbs), longitudinal, lateral, vertical positions from datum (feet)

;Moments of Inertia
empty_weight_roll_MOI =500000
empty_weight_pitch_MOI =500000
empty_weight_yaw_MOI =300000
empty_weight_coupled_MOI =0000

[flight_tuning]
cruise_lift_scalar =1.0
parasite_drag_scalar =1.0
induced_drag_scalar =1.0
elevator_effectiveness =6.0
aileron_effectiveness =2.0
rudder_effectiveness =2.6
pitch_stability =1.0
roll_stability =1.1
yaw_stability =1.1
elevator_trim_effectiveness=1.0
aileron_trim_effectiveness =1.0
rudder_trim_effectiveness =1.0

[GeneralEngineData]
engine_type = 1
Engine.0 = -13.000, -6.000, 2.000
Engine.1 = -13.000, 6.000, 2.000
fuel_flow_scalar = 0.91
min_throttle_limit=-0.210

[TurbineEngineData]
fuel_flow_gain = 0.0025
inlet_area = 1.400
rated_N2_rpm = 29920.000
static_thrust = 7000.000 // 3500.00 (Lbs)
afterburner_available = 0
reverser_available = 1.0
reverse_thrust_throttle_percent=-75.000

[jet_engine]
thrust_scalar =1.000

[electrical]
;BusType, MaxAmpLoad, MinVoltage
;BusTypes:0=MainBus,1=AvionicsBus,2=BatteryBus,3=HotBatteryBus,4-7=Generator/AlternatorBus(1-4)
flap_motor = 0, 5 , 17.0
gear_motor = 0, 5 , 17.0
autopilot = 0, 5 , 17.0
avionics_bus = 0, 10, 17.0
avionics = 1, 5 , 17.0
pitot_heat = 0, 2 , 17.0
additional_system = 0, 20, 17.0
marker_beacon = 1, 2 , 17.0
gear_warning = 0, 2 , 17.0
fuel_pump = 0, 5 , 17.0
starter1 = 0, 20, 17.0
light_nav = 0, 5 , 17.0
light_beacon = 0, 5 , 17.0
light_landing = 0, 5 , 17.0
light_taxi = 0, 5 , 17.0
light_strobe = 0, 5 , 17.0
light_panel = 0, 5 , 17.0
battery_bus_voltage=24.0
generator_alternator_voltage=24.0
max_generator_alternator_amps=40.0

//0 Class <0=none,1=wheel, 2=scrape, 3=float>
//1 Longitudinal Position (feet)
//2 Lateral Position (feet)
//3 Vertical Position (feet)
//4 Impact Damage Threshold (Feet Per Minute)
//5 Brake Map (0=None, 1=Left, 2=Right)
//6 Wheel Radius (feet)
//7 Steer Angle (degrees)
//8 Static Compression (feet) (0 if rigid)
//9 Max/Static Compression Ratio
//10 Damping Ratio (0=Undamped, 1=Critically Damped)
//11 Extension Time (seconds)
//12 Retraction Time (seconds)
//13 Sound Type
//14 Airspeed limit for retraction (KIAS)
//15 Airspeed that gear gets damage at (KIAS)

[contact_points]
point.0= 1, 20.85, -0.40, -5.40, 1181.10, 0.00, 0.65, 55.92, 0.25, 2.50, 0.90, 4.00, 4.00, 0.00, 0.00, 0.00
point.1= 1, 20.85, 0.40, -5.40, 1181.10, 0.00, 0.65, 55.92, 0.25, 2.50, 0.90, 4.00, 4.00, 0.00, 0.00, 0.00

point.2= 1, -2.90, -6.30, -6.20, 1574.80, 1.00, 0.80, 0.00, 1.00, 2.50, 0.90, 6.90, 6.90, 2.00, 0.00, 0.00
point.3= 1, -2.90, -5.30, -6.20, 1574.80, 1.00, 0.80, 0.00, 1.00, 2.50, 0.90, 6.90, 6.90, 2.00, 0.00, 0.00

point.4= 1, -2.90, 6.30, -6.20, 1574.80, 2.00, 0.80, 0.00, 1.00, 2.50, 0.90, 7.10, 7.10, 3.00, 0.00, 0.00
point.5= 1, -2.90, 5.30, -6.20, 1574.80, 2.00, 0.80, 0.00, 1.00, 2.50, 0.90, 7.10, 7.10, 3.00, 0.00, 0.00

point.6= 2, -9.00, -31.00, -1.60, 787.40, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 5.00, 0.00, 0.00
point.7= 2, -9.00, 31.00, -1.60, 787.40, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 6.00, 0.00, 0.00
point.8= 2, -28.70, 0.00, 3.80, 787.40, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 9.00, 0.00, 0.00
point.9= 2, 31.00, 0.00, -0.20, 787.40, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 4.00, 0.00, 0.00

max_number_of_points = 21

static_pitch = -0.121 // 0.0
static_cg_height= 5.194 // 5.10
gear_system_type = 0

[Views]
eyepoint= 22.30, -1.50, 3.20 //(feet) longitudinal, lateral, vertical distance from reference datum

[Radios]
// Radio Type = availiable, standby frequency, has glide slope
Audio.1 = 1
Com.1 = 1, 1
Com.2 = 1, 1
Nav.1 = 1, 1, 1
Nav.2 = 1, 1, 0
Adf.1 = 1
Transponder.1 = 1
Marker.1 = 1

[LIGHTS]
//Types: 1=beacon, 2=strobe, 3=navigation, 4=cockpit, 5=landing
light.0 = 3, -8.62, -31.07, -1.60, fx_navred ,
light.1 = 3, -8.62, 31.07, -1.60, fx_navgre ,
light.2 = 3, -27.35, 0.00, 8.27, fx_navwhi ,
light.3 = 2, -8.05, -30.85, -1.60, fx_strobe ,
light.4 = 2, -8.05, 30.85, -1.60, fx_strobe ,
light.5 = 1, 7.95, 0.00, -2.86, fx_beaconb ,
light.6 = 1, -27.00, 0.00, 16.85, TBCN.fx ,
light.7 = 4, 22.24, 0.00, 3.50, fx_vclight ,
light.8 = 2, -27.35, 0.00, 8.27, fx_strobe ,
light.9 = 5, 9.99, -2.90, -1.90, fx_shockwave_landing_light_short
light.10 = 5, 9.99, 2.90, -1.90, fx_shockwave_landing_light_short
light.11 = 6, 21.95, 0.00, -3.20, fx_shockwave_landing_light_short

[keyboard_response]
//Breakpoint speeds (knots) on the keyboard increments of control surfaces.
//Speed at which the incremenet is reduced to 1/2 and 1/8 respectively.
elevator = 150, 250
aileron = 150, 250
rudder = 150, 250

[direction_indicators]
//1 Type: 0=None, 1=Vacuum Gyro, 2=Electric Gyro, 3=Electro-Mag Slaved Compass, 4=Slaved to another
//2 Indicator number of slaving indicator if Type = 4
direction_indicator.0=3,0

[exits]
number_of_exits = 2
exit_rate.0 = 0.4 ;Percent per second
exit_rate.1 = 0.4 ;Percent per second

[EFFECTS]
wake=fx_wake
water=fx_spray
dirt=fx_tchdrt
concrete=fx_sparks
touchdown=fx_tchdwn, 1

[autopilot]
autopilot_available=1
flight_director_available=1
default_vertical_speed=2000
autothrottle_available=1
autothrottle_arming_required=1
autothrottle_max_rpm = 94
autothrottle_takeoff_ga=1
pitch_takeoff_ga = 8;
max_pitch=10.000
max_pitch_acceleration=1.00
max_pitch_velocity_lo_alt=2.00
max_pitch_velocity_hi_alt=1.50
max_pitch_velocity_lo_alt_breakpoint=20000.00
max_pitch_velocity_hi_alt_breakpoint=28000.00
max_bank=25.00
max_bank_acceleration=1.80
max_bank_velocity=3.00
max_throttle_rate=0.10
nav_proportional_control=9.00
nav_integrator_control=0.25
nav_derivative_control=0.000
nav_integrator_boundary=2.50
nav_derivative_boundary=0.00
gs_proportional_control=9.52
gs_integrator_control=0.26
gs_derivative_control=0.00
gs_integrator_boundary=0.70
gs_derivative_boundary=0.00
yaw_damper_gain=1.000000

[fuel]
LeftMain = 0.000, -4.000, 0.000, 1243.000, 0.000
RightMain = 0.000, 4.000, 0.000, 1243.000, 0.000
fuel_type = 2 //Fuel type: 1 = Avgas, 2 = JetA
number_of_tank_selectors = 1
electric_pump=2

[airplane_geometry]
wing_area=720.000000
wing_span=58.333333
wing_root_chord=13.333333
wing_dihedral=2.999268
wing_incidence=1.8
wing_twist=0.0
oswald_efficiency_factor=0.74
wing_winglets_flag=0
wing_sweep=20.000000
wing_pos_apex_lon=0.000000
wing_pos_apex_vert=0.000000
htail_area=40.000000
htail_span=10.833333
htail_pos_lon=-33.333333
htail_pos_vert=0.000000
htail_incidence=-0.763550 // -0.763550
htail_sweep=0.000000
vtail_area=46.000000
vtail_span=7.733046
vtail_sweep=0.000000
vtail_pos_lon=-33.333333
vtail_pos_vert=5.833333
elevator_area=50.000000
aileron_area=11.000000
rudder_area=25.000000
elevator_up_limit=18.0
elevator_down_limit=18.0
aileron_up_limit=20
aileron_down_limit=20
rudder_limit=21.772396
elevator_trim_limit=24.0
spoiler_limit=57.295780
spoilerons_available=0
aileron_to_spoileron_gain=4.600000
min_ailerons_for_spoilerons=49.847328
min_flaps_for_spoilerons=0.000000
auto_spoiler_available = 1

[Reference Speeds]
flaps_up_stall_speed = 130.00
full_flaps_stall_speed = 100.00
cruise_speed = 250.00 //knots over the ground. mach 0.77 apx
max_indicated_speed = 350.00
max_mach=0.85

[forcefeedback]
gear_bump_nose_magnitude=3000 ; 0 - 10000
gear_bump_nose_direction=18000 ; 0 - 35999 degrees
gear_bump_nose_duration=250000 ; in microseconds
gear_bump_left_magnitude=2700 ; 0 - 10000
gear_bump_left_direction=35500 ; 0 - 35999 degrees
gear_bump_left_duration=250000 ; in microseconds
gear_bump_right_magnitude=2700 ; 0 - 10000
gear_bump_right_direction=00500 ; 0 - 35999 degrees
gear_bump_right_duration=250000 ; in microseconds
ground_bumps_magnitude1=1300 ; 0 - 10000
ground_bumps_angle1=08900 ; 0 - 35999 degrees
ground_bumps_intercept1=3.0
ground_bumps_slope1=0.20
ground_bumps_magnitude2=200 ; 0 - 10000
ground_bumps_angle2=09100 ; 0 - 35999 degrees
ground_bumps_intercept2=1.075
ground_bumps_slope2=0.035
crash_magnitude1=10000 ; 0 - 10000
crash_direction1=01000 ; 0 - 35999 degrees
crash_magnitude2=10000 ; 0 - 10000
crash_direction2=9000 ; 0 - 35999 degrees
crash_period2=75000 ; in microseconds
crash_duration2=2500000 ; in microseconds

[Flaps.0]
type=1
span-outboard=0.500000
extending-time=7.000000
system_type=0
flaps-position.0=0.000000,0.000000
flaps-position.1=10.0,0.000000
flaps-position.2=20,0.000000
flaps-position.3=40.0,0.000000

//[Flaps.1]
//type= 1
//span-outboard= 0.33
//extending-time= 8.00
//system_type= 1
//damaging-speed= 250.00
//blowout-speed= 300.00
//lift_scalar= 0.60
//drag_scalar= 1.30
//pitch_scalar= 1.30
//flaps-position.0= 0.00, 0.00
//flaps-position.1= 10.00, 0.00
//flaps-position.2= 20.00, 0.00
//flaps-position.3= 40.00, 0.00

[Flaps.1]
type= 2
span-outboard= 0.80
extending-time= 2.00
system_type= 1
damaging-speed= 250.00
blowout-speed= 300.00
flaps-position.0= 0.00, 0.00
flaps-position.1= 1.00, 0.00

[brakes]
toe_brakes_scale=1.00
parking_brake=1.1

[gear_warning_system]
gear_warning_available=1
pct_throttle_limit=0.091553
flap_limit_power=80.214091
flap_limit_idle=21.772396

[hydraulic_system]
electric_pumps=0
engine_map=1,1,0,0
normal_pressure=3000.00

[stall_warning]
type=1

[attitude_indicators]
attitude_indicator.0=1

[turn_indicators]
turn_indicator.0=1,0

[deice_system]
structural_deice_type=1

Thanks for your help

Greg
 

Attachments

It seems as though the gauge code is not starting.
Perhaps the <Update> section needs to be the first 'Element' in the code (line 5) ? I always put it there but I have no evidence that that's a requirement.
I had forgotten about the (A:FUEL WEIGHT PER GALLON, pounds per gallon) function so use that instead of any number as a multiplier.


Code:
  <Update>(A:General eng combustion:1,bool) 0 != (A:General eng combustion:2,bool) 0 != or (L:Startflag,bool) 0 == and (* start the gauge when either engine starts *)
      if{ (A:Fuel tank left main quantity,gallon) (A:FUEL WEIGHT PER GALLON, pounds per gallon) * (>L:Left_reference,pound) (* set the reference quantity here *)
          (A:Fuel tank right main quantity,gallon) (A:FUEL WEIGHT PER GALLON, pounds per gallon) * (>L:Right_reference,pound)
          (L:Startflag,bool) ! (>L:Startflag,bool) (* ignore this update routine after the first pass *)
        }
   </Update> 


  <Element>
<!-- Subtract the current gallons from the reference and prevent negative values from displaying. -->
    <Position X="6" Y="15" />
    <Text X="60" Y="24" Bright="Yes" Length="3" Font="Arial" Color="#40FF40" Adjust="center" VerticalAdjust="Center" Multiline="No" Fixed="No">
      <String>%((L:Left_reference,pound) (A:Fuel tank left main quantity,gallon) (A:FUEL WEIGHT PER GALLON, pounds per gallon) * - 0 max)%!3.0f!</String>
    </Text>
  </Element>
  
  <Element>
    <Position X="6" Y="35" />
    <Text X="60" Y="24" Bright="Yes" Length="3" Font="Arial" Color="#40FF40" Adjust="center" VerticalAdjust="Center" Multiline="No" Fixed="No">
      <String>%((L:Right_reference,pound) (A:Fuel tank right main quantity,gallon) (A:FUEL WEIGHT PER GALLON, pounds per gallon) * - 0 max)%!3.0f!</String>
    </Text>
  </Element>

As there are two engines I have inserted a token to allow for the second engine being started first so that the correct current fuel load is referenced and saved for both tanks.

As it seemed to work when you first tried it I am at a loss to explain why just changing a number made it go wrong.
Is it possible another gauge has an L:var with the same name?

I have confirmed that the code works on both Avgas and JetA aircraft. Try starting your model from the 'cold and dark' state which means all L:vars are at zero.

Best of luck Ted.
 
Greg.

It looks as if the <Update> section can not be wrapped in <Element> tags.

Try moving the <Update> routine to the very top thus:-
Code:
    <Image Name="EICAS_BG.bmp" ImageSizes="380,380" />
  
<!-- Only units of volume seem to be recognised for fuel tank quantity. Hence '(A:Fuel weight per gallon, pounds per gallon)' -->
  [COLOR="Red"]<Update>[/COLOR](A:General eng combustion:1,bool) 0 != (L:Startflag,bool) 0 == and (* start the gauge when the engine starts *)
      if{ (A:Fuel tank left main quantity,gallon) (A:Fuel weight per gallon, pounds per gallon) * (>L:Left_reference,pound) (* set the reference quantity here *)
          (A:Fuel tank right main quantity,gallon) (A:Fuel weight per gallon, pounds per gallon) * (>L:Right_reference,pound)
          (L:Startflag,bool) ! (>L:Startflag,bool) (* ignore the update routine after the first pass *)
        }
[COLOR="Red"]  </Update>[/COLOR]
  <Element>
    <Position X="25" Y="25" />
    <Image Name="EICAS_2_BG.bmp" ImageSizes="330,330" Luminous="Yes" />
    <Visible>(A:Avionics master switch,bool)</Visible>
    <Element>

Ted.
 
Last edited:
Bingo!!! Moving the update section seems to have been the trick. Thanks for the help Ted!! Attached screenshot shows the gauge in the climb after I took off with 5000 #/side and the fuel used is right on the money at 250 # burned with 250 # out of each tank. The side by side shot shows the real guage and the sim gauge.

Is there a variable that makes the fuel used display show to the nearest 10's of lbs instead of each single lb? Now I'm just getting picky :D

Thanks again Ted

Regards, Greg
 

Attachments

  • fq1.JPG
    fq1.JPG
    12 KB · Views: 512
This will show in tens of pounds - just add the bits shown in red.

Code:
    <Element>
<!-- Subtract the current gallons from the reference, round down to display in 10s of pounds and prevent negative values from displaying. -->
      <Position X="65" Y="230" />
    <Text X="60" Y="24" Bright="Yes" Length="3" Font="Arial" Color="#40FF40" Adjust="center" VerticalAdjust="Center" Multiline="No" Fixed="No">
      <String>%((L:Left_reference,pound) (A:Fuel tank left main quantity,gallon) (A:Fuel weight per gallon, pounds per gallon) * [COLOR="Red"]- 10 / int 0[/COLOR] max)%!3.0f!</String>
    </Text>
    </Element>
    <Element>
      <Position X="202" Y="230" />
    <Text X="60" Y="24" Bright="Yes" Length="3" Font="Arial" Color="#40FF40" Adjust="center" VerticalAdjust="Center" Multiline="No" Fixed="No">
      <String>%((L:Right_reference,pound) (A:Fuel tank right main quantity,gallon) (A:Fuel weight per gallon, pounds per gallon) * [COLOR="Red"]- 10 / int 0[/COLOR] max)%!3.0f!</String>
    </Text>
    </Element>

Ted.
 
Back
Top