Jump to content


Photo

Change fuel level


  • Please log in to reply
6 replies to this topic

#1 wawax

wawax

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationMidsomer

Posted 02 July 2013 - 06:49 PM

Hello!

I try to change fuel level in one of tanks. It's quite easy, thanks to you Pete, in FSUIPC - change some offsets and that's it. Unfortunately I have to do it in XML gauge. I created APU for VasFMC A320 panel and I'd like it to burn some fuel.

 

I managed to get actual fuel level, change it, but I can't write it. I look for K:Variable, which is appropriate to write new fuel level. I know, it is called FUEL TANK LEFT MAIN LEVEL, and it is writable (as shown on ESP website, as well as in offset description in FSUIPC for programmers). But this is A:Variable.

 

Do you know the name of K:Variable which is responsible for writing fuel level? I found only fuel selectors on list of events. Or maybe I should try to write it some other way?

 

 


  • 0

#2 Pete Dowson

Pete Dowson

    Advanced Member

  • Moderators
  • 27,289 posts
  • LocationNear Stoke-on-Trent, UK

Posted 02 July 2013 - 07:24 PM

Hello!

I try to change fuel level in one of tanks. It's quite easy, thanks to you Pete, in FSUIPC - change some offsets and that's it. Unfortunately I have to do it in XML gauge. I created APU for VasFMC A320 panel and I'd like it to burn some fuel.

 

I managed to get actual fuel level, change it, but I can't write it. I look for K:Variable, which is appropriate to write new fuel level. I know, it is called FUEL TANK LEFT MAIN LEVEL, and it is writable (as shown on ESP website, as well as in offset description in FSUIPC for programmers). But this is A:Variable.

 

Do you know the name of K:Variable which is responsible for writing fuel level? I found only fuel selectors on list of events. Or maybe I should try to write it some other way?

 

 

Sorry, you have me confused. I do not know anything about "K" or "A" variables. FSUIPC only has access to the regular values (via SimConnect in FSX, directly in FS9 -- you don''t even say what FS you are talking about ), and L:Vars, which are local panel variables which are exposed to other parts of the system.

 

Regards

Pete


  • 0

#3 wawax

wawax

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationMidsomer

Posted 03 July 2013 - 05:15 AM

Sorry, I have written too briefly. I use FS2004. Flight Simulator has different types of variables used in gauges. The best known are L:Vars (public variables set in gauges) and G:Vars (those stay only inside one gauge). A: E: and P:Vars are those, you can get from FS using offsets (the list is here: http://msdn.microsof...y/cc526981.aspx). In gauges, they have own names, which can be used. The last type are K:Vars, which are nothing else than controls shown in FSUIPC documentation (http://msdn.microsoft.com/en-us/library/cc526980.aspx, and in FSUIPC file: List of FS2004 controls.pdf).

 

One can read A, E and P variables, but changing them is possible only via K (events). It is easier in FSUIPC, because one may change offset directly. This way it isn't possible in XML gauge (as I know, but I hope to be wrong).

 

Now I look for control (K:Var), which will allow me to change fuel level in tanks. In list of FS2004 control I found ADD_FUEL_QUANTITY, but as written in ESP, this only adds fuel. I look for something like REMOVE_FUEL_QUANTITY.

 

Regards,

Slawek


  • 0

#4 Pete Dowson

Pete Dowson

    Advanced Member

  • Moderators
  • 27,289 posts
  • LocationNear Stoke-on-Trent, UK

Posted 03 July 2013 - 09:10 AM

Sorry, I have written too briefly. I use FS2004. Flight Simulator has different types of variables used in gauges. The best known are L:Vars (public variables set in gauges) and G:Vars (those stay only inside one gauge). A: E: and P:Vars are those, you can get from FS using offsets (the list is here: http://msdn.microsof...y/cc526981.aspx). In gauges, they have own names, which can be used. The last type are K:Vars, which are nothing else than controls shown in FSUIPC documentation (http://msdn.microsof...y/cc526980.aspx, and in FSUIPC file: List of FS2004 controls.pdf).

 

So, "K" means "KEY EVENT", as all of the controls have full names in the form KEY_XXXXX.

 

One can read A, E and P variables, but changing them is possible only via K (events). It is easier in FSUIPC, because one may change offset directly. This way it isn't possible in XML gauge (as I know, but I hope to be wrong). Now I look for control (K:Var), which will allow me to change fuel level in tanks. In list of FS2004 control I found ADD_FUEL_QUANTITY, but as written in ESP, this only adds fuel. I look for something like REMOVE_FUEL_QUANTITY.

 

Sorry, but the list of controls I publish is the complete list from FS itself.

 

In FSX there is  "FUEL DUMP TOGGLE", number 66651. I suppose you could try that number just in case, but it seems unlikely to be in FS9 as it isn't in the tables.

 

Regards

Pete


  • 0

#5 wawax

wawax

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationMidsomer

Posted 03 July 2013 - 09:22 AM

Thanks. That's pity.

As I know, there are some gauges written in C, which are able to dump fuel. If that gauge could communicate via L:Var with XML gauge, I could send command to decrease fuel in certain tank. I must see whether such gauge exists. Unfortunately, I don't know C, so I'm unable to write one.


  • 0

#6 Pete Dowson

Pete Dowson

    Advanced Member

  • Moderators
  • 27,289 posts
  • LocationNear Stoke-on-Trent, UK

Posted 03 July 2013 - 10:11 AM

Thanks. That's pity.

As I know, there are some gauges written in C, which are able to dump fuel. If that gauge could communicate via L:Var with XML gauge, I could send command to decrease fuel in certain tank. I must see whether such gauge exists. Unfortunately, I don't know C, so I'm unable to write one.

 

 

You could have an L:Var which can be seen in FSUIPC, then have a Lua plug-in which reads that L:Var and write to the fuel offsets. Of course this needs a Registered install of FSUIPC too.

 

Regards

Pete


  • 0

#7 wawax

wawax

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationMidsomer

Posted 03 July 2013 - 10:16 AM

Thanks. That's other solution. Creating Lua will be easier for me than writing in C.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


About simFlight - simflight.com - simflight.de - simflight.fr - simflight.nl - simflight.pt - simflight.es - simflight.it - simflight.jp - simrussia.com - simMarket