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.

Fuel Remaining

Featured Replies

  • Commercial Member

I wish this forum had a better search routine because I'm sure the answer's here somewhere. Unfortunately, advanced searching on 'fuel', 'fuel level', 'fuel remaining' and 'fuel level remaining' all return pages and pages of identical results.When calculating the fuel remaining in any one tank, I have seen the following two figures quoted: divide by 8088322.0 and divide by 8388608.0 (quoted in the SDK) e.g.lookup_var(&fuel_level_leftaux);lookup_var(&fuel_cap_leftaux);dblfuelstate=fuel_level_leftaux.var_value.n/[figure];dblfuelstate=fuel_cap_leftaux.var_value.n * dblfuelstate;However, I find that when comparing a full tank to the fuel capacity as stated in the aircraft.cfg file, I find that 8088322.0 gives a figure that is too high and 8388608.0 gives a figure that is too low. So I checked the direct return fromlookup_var(&fuel_cap_leftaux);and it gave me 83618 (I suspect I truncated it early and it should actually be 8361800.0 - see below). So, if the figure in the cfg file is (e.g. 3757) and the tank in question is full,lookup_var(&fuel_level_leftaux);lookup_var(&fuel_cap_leftaux);dblfuelstate=(fuel_level_leftaux.var_value.n/83618.0)/100;dblfuelstate=fuel_cap_leftaux.var_value.n * dblfuelstate;gives 3757 as expected.So which figure is right? 8088322.0, 8388608.0 or 8361800.0? Or did I really do something stupid and overlook the obvious again?-Dai

  • Author
  • Commercial Member

Hi EdI gave up on this one in the end. I queried all four tanks in this aircraft and got four different results, three above and one below 8388608. I have no idea what's going on, so for the sake of being inaccurate to the tune of about seven gallons in a multi-thousand gallon tank, I'm going to ignore it and use the SDK figure for conversions. Thank you for checking.-Dai

Dai,I'm not shure but are the values in the .cfg file of your a/c correct?Greetz Slammer

  • Commercial Member

Or you could just use XML and have it solve all you problems... :( Engjell BerishaGood Day!

Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

  • Author
  • Commercial Member

@ Slammer:Yes, the aircraft.cfg file is correct. I entered the tanks and quantities myself.@ Engjell:I was starting to seriously consider doing just that, but a seven gallon inaccuracy in an almost 4000-gallon tank isn't really worth changing the code now I've completed it. It was just that the inaccuracy between tank capacity and tank contents niggled at me sufficiently (at the time) to want to find an answer to it.-Dai

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.