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 Dump

Featured Replies

HiAny chance to make a xml gauge for dumping the fuel?I try a lot but the K: variables don

Hey Peyroteo.Sorry, can't help you on that one, but as an encouragement, I know it is possible (although haven't figured out how to do it yet) to do that in C, so it might be possible in XML.

Hi all,There was already a discussion about this subject, try search function.It is not possible in xml.But.... there is a good working C gauge which i use and it is made with coop of Arne.It is in the experimental aircraft and panel of mr. Pike.Search in the library:c4sst12.zipIt works well!Jan"Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hey Jan.Thanks for the answer. Say, would you mind showing us the code for this gauge? I have been left wondering how you'd go about doing that, but can't seem to find an answer. FSUIPC perhaps?

Hi,gauge00=FSUIPC_DUMP!fuel_dump, 440, 285, 70, 60You need :FSUIPC_DUMP.gau and set fuel.xml from his gaugesThey are in the zipJan"Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Something like this?#include "fs2k2gauges.h"#include "resource.h"#include "FSUIPC_User.h"#include "FUEL_DUMP.h"#define GAUGE_NAME "Fuel_Dump0"#define GAUGE_W 40#define REF_HELPID HELP_NONE#define BMP_BACK BMP_FUEL_DUMP_BACK#define CENTRE_LEVEL 0x0B74#define LEFT_MAIN_LEVEL 0x0B7C#define LEFT_AUX_LEVEL 0x0B84#define LEFT_TIP_LEVEL 0x0B8C#define RIGHT_MAIN_LEVEL 0x0B94#define RIGHT_AUX_LEVEL 0x0B9C#define RIGHT_TIP_LEVEL 0x0BA4static DWORD dwResult;static BOOL FSAPI FuelDump(PPIXPOINT arg1, FLAGS32 mouse_flags ){ DWORD fuellevel=66536*128;//100% fuellevel = (int)((double)fuellevel*0.5);//50% FSUIPC_Open(SIM_FS2K2 , &dwResult); FSUIPC_Write(CENTRE_LEVEL, 4, &fuellevel, &dwResult); FSUIPC_Write(LEFT_MAIN_LEVEL, 4, &fuellevel, &dwResult); FSUIPC_Write(LEFT_AUX_LEVEL, 4, &fuellevel, &dwResult); FSUIPC_Write(LEFT_TIP_LEVEL, 4, &fuellevel, &dwResult); FSUIPC_Write(RIGHT_MAIN_LEVEL, 4, &fuellevel, &dwResult); FSUIPC_Write(RIGHT_AUX_LEVEL, 4, &fuellevel, &dwResult); FSUIPC_Write(RIGHT_TIP_LEVEL, 4, &fuellevel, &dwResult); FSUIPC_Process(&dwResult); FSUIPC_Close(); return FALSE;}static void FSAPI gauge_cb(PGAUGEHDR pgauge, int service_id, UINT32 extra_data){ switch(service_id) { case PANEL_SERVICE_CONNECT_TO_WINDOW: case PANEL_SERVICE_DISCONNECT: break; default: break; }}/////////////////////////////////////////////////////////////////////////////////////////////////////////static MAKE_STATIC( background, BMP_BACK, NULL, NULL, IMAGE_USE_TRANSPARENCY| IMAGE_USE_ERASE, 0, 0,0)static MAKE_PLIST(plist,&background)static MOUSE_BEGIN( mouse_rect, REF_HELPID, 0, 0 ) MOUSE_CHILD_FUNCT(0,0,40,40, CURSOR_UPARROW, MOUSE_LEFTSINGLE,FuelDump)MOUSE_ENDstatic char gauge_name[] = GAUGE_NAME;GAUGE_HEADER_FS700( GAUGE_W, gauge_name, plist, mouse_rect, gauge_cb, 0, 0, 0 );The use of FSUIPC_Open instead of FSUIPC_Open2 might be ineffecient if used often ,but since it is only in one callback, seldom used....The code is not in the standrad form since I add the subgauge.c file to the project and include a subgauge.h, but you actually only need the stuff around the "FuelDump"-function. "FuelDump" sets each tank to half full, you can also use other levels/tank selections of course.Arne Bartels

Great stuff Arne, thanks a lot!

Hi,Thanks for your answers.It a pity, I do not program in C anymore for 15 years ago. I can understand the code and if have more time I start again programing in C. Thanks a lot Arne.My idea is a gauge only to dump the fuel, i.e. 200 gallons/minute, not to refill too.I start developing a xml gauge to get a failure if the plane weight is above the maximum landing weight and so I must have any mean to dump the fuel in the case of a forced landing.Best regards,Peyroteo

Well, if you were to use C (and for others reading), you can still vary the ammount of fuel dumped overboard with time by using the "fill to" function.All you'd have to do is read the current level of the fuel tanks, determine what the fuel dump rate would be, then fill the tanks to a lesser value every, say, second, according to the dump rate.So if the fuel dump activate switch/knob/lever stayed in the ON position, for every second that went by, the tanks would be refilled to a smaller value, giving the impression fuel is guzzling out.

>I start developing a xml gauge to get a failure if the plane>weight is above the maximum landing weight and so I must have>any mean to dump the fuel in the case of a forced landing.Great tip, thanks :)IF max realism AND gear extended AND 1 feet above ground AND retarded throttles AND above maximum weight, THEN toggle gear :D

:-)

  • 4 weeks later...

>All you'd have to do is read the current level of the fuel>tanks, determine what the fuel dump rate would be, then fill>the tanks to a lesser value every, say, second, according to>the dump rate.>>So if the fuel dump activate switch/knob/lever stayed in the>ON position, for every second that went by, the tanks would be>refilled to a smaller value, giving the impression fuel is>guzzling out.I'm trying this approach, and have the following : //--------------------------------------------------------MODULE_VAR dump_left = {FUEL_TANK_LEFT_MAIN_LEVEL};....lookup_var(&dump_left);dump_left.var_value.n = dump_left.var_value.n - 537.3386; //dump 2T/min case PANEL_SERVICE_PRE_UPDATE: //Set fuel selector to External tanks if (*pfdump == 1) { fuellevel = dump_left.var_value.n; FSUIPC_Write(LEFT_MAIN_LEVEL, 4, &fuellevel, &dwResult); FSUIPC_Process(&dwResult); }//--------------------------------------------------------This approach works, however the jettison flow rate seems to vary with the fuel level. It will dump 2T/min when at 0% level, but something much higher when the tank level is at 100%. Is there a way to work around this? I'm sure I'm doing something wrong! Thanks for any help or suggestions. Andrew

  • 2 years later...

Further to this....is there a way to use XML parameters to make the fuel dump/add work? In other words, custom L:Vars that can trigger the fuel-dump gauge to add or subtract fuel?Steve

Steve,Ask Doug Dawson.He made a fuel dump gauge with xml parameters.Works perfect!!Different tanks, rate etc.Probably he is willing to make it custom for you (adding fuel)Jan"Beatus Ille Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Janyes I have been talking with Doug :-))Also I have been playing with the (>K:ADD_FUEL_QUANTITY) event, and it is quite possible to customise the amount of fuel added using numbers from 0 to 65535 (full fuel). Can't get it to subtract though.Steve

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.