• 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.

FSX watter ballast variables help

Messages
14
Country
southafrica
water ballast variables help

Hi guys, my first post here.

I'm updating my Ag-Cat for FSX and I'm using water ballast to simulate the spray system.

I'm using the water ballast valve variable and event key, but I've been unable to find a variable for the ballast quantity. Would someone please point me in the right direction?

Thanks
Marcel
 
Last edited:
Perhaps the best way is to relate it to aircraft weight. The Water Ballast System entry in the DG808S config file gives the initial quantity in gallons and it appears they use 7 lbs per gallon based on the payload data in the Aircraft Fuel and Payload drop down. The TOTAL WEIGHT variable will give you current weight, the FUEL TOTAL QUANTITY WEIGHT variable will give you current fuel weight. Comparing current weight values to initial weight values should allow you to work out the current water weight.

Roy
 
Hi
Check out the default glider (DG808S) aircraft.cfg (see below)
then have a look at the sdk for the correct event tags for valve use

[Water Ballast System]
//Tank.n = Gallons, Long, Lat, Vert, iValve
Tank.0 = 7.79, -2.75, 0.0, 0.0, 1 //Front Fuselage
Tank.1 = 3.57, -3.28, 0.0, 0.0, 2 //Rear Fuselage
Tank.2 = 9.25, -0.60, -10.5, 0.0, 2 //Left Outboard
Tank.3 = 16.38, -0.66, -4.5, 0.0, 1 //Left Inboard
Tank.4 = 16.38, -0.66, 4.5, 0.0, 1 //Right Inboard
Tank.5 = 9.25, -0.60, 10.5, 0.0, 2 //Right Outboard

NumberOfReleaseValves = 2
DumpRate = 0.18494 //Gallons per second

only thing I think you cant change is the effect used
Wozza
 
Last edited:
Perhaps the best way is to relate it to aircraft weight. The Water Ballast System entry in the DG808S config file gives the initial quantity in gallons and it appears they use 7 lbs per gallon based on the payload data in the Aircraft Fuel and Payload drop down. The TOTAL WEIGHT variable will give you current weight, the FUEL TOTAL QUANTITY WEIGHT variable will give you current fuel weight. Comparing current weight values to initial weight values should allow you to work out the current water weight.

Roy

Thanks Roy that is exactly what I needed.

Hi
Check out the default glider (DG808S) aircraft.cfg (see below)
then have a look at the sdk for the correct event tags for valve use

[Water Ballast System]
//Tank.n = Gallons, Long, Lat, Vert, iValve
Tank.0 = 7.79, -2.75, 0.0, 0.0, 1 //Front Fuselage
Tank.1 = 3.57, -3.28, 0.0, 0.0, 2 //Rear Fuselage
Tank.2 = 9.25, -0.60, -10.5, 0.0, 2 //Left Outboard
Tank.3 = 16.38, -0.66, -4.5, 0.0, 1 //Left Inboard
Tank.4 = 16.38, -0.66, 4.5, 0.0, 1 //Right Inboard
Tank.5 = 9.25, -0.60, 10.5, 0.0, 2 //Right Outboard

NumberOfReleaseValves = 2
DumpRate = 0.18494 //Gallons per second

only thing I think you cant change is the effect used
Wozza

Thanks Wozza, I'm already using the available variables and I've changed the effect. I was looking for a variable that would give me the quantity of ballast left in the tank.

Cheers
 
Perhaps the best way is to relate it to aircraft weight. The Water Ballast System entry in the DG808S config file gives the initial quantity in gallons and it appears they use 7 lbs per gallon based on the payload data in the Aircraft Fuel and Payload drop down. The TOTAL WEIGHT variable will give you current weight, the FUEL TOTAL QUANTITY WEIGHT variable will give you current fuel weight. Comparing current weight values to initial weight values should allow you to work out the current water weight.

Roy

Need some more help please;

This is the line of code I'm using to calculate the hopper load (ballast mass):

<Value>(A:TOTAL WEIGHT,POUNDS) (A:EMPTY WEIGHT,POUNDS)- (A:FUEL TOTAL QUANTITY WEIGHT,POUNDS)- (A:PAYLOAD STATION WEIGHT:0,POUNDS)- (&gt;L:HOPPER LOAD,POUNDS)</Value>

Problem is that it is giving the total airplane weight, not the ballast weight. I suspect I am making a silly mistake with the syntax?
 
Make sure there is a space *before and after* the minus signs.

I've also never used POUNDS for an L: variable (I use NUMBER), but I don't know if that is a problem or not.

Hope this helps,
 
Tom, apparently XML doesn't really pay much attention to the "units" of L:vars at all, only that they HAVE one!

As a test, I once used "Fred" for the units and...

...it worked! :rolleyes:
 
But that's not entirely true! I'm not sure about L: variables, but with A: variables you can use the units to automatically change the units! For instance
Code:
(A:RECIP ENG MANIFOLD PRESSUR:1,psi)
will give you a different reading than
Code:
(A:RECIP ENG MANIFOLD PRESSUR:1,inHg)

You'll even notice a difference with L: variables, however I am not quite sure if the result is reliable and therefore I tend to use ",number" for almost all my custom variables.
 
You are correct. A:vars's "units" are critically important.

All L:vars are by nature simply FLOAT64 variables (which is of course why they can't be used for "strings!"), so it makes absolutely difference what you use for the unit name.

The only reason for being anal about using "bool", "enum", "number", etc. is to provide some clue as to what one is using the L:var for!

There is absolutely no difference whatever in practice. For example, create an L:var named:

(L:MyVariable,bool)

then stuff it like this:

269 (>L:MyVariable,bool)

Next, write a string display to read the contents of these and "print to screen":

(L:MyVariable,enum)
(L:MyVariable,number)
(L:MyVariable,fred)
(L:MyVariable,ginger)

or any other weird "unit" name you can dream of...

Every single one will return "269" :rotfl:

Stranger still! Use a blank space for the "unit" name!

(L:MyVariable, ) :duck:
 
Hi,

Thanks, that makes it clear. Of course now that I know that, I won't be so careful and my code will be less understandable... :)
 
Hello again,

Bill, of course you are right. But did you try it the other way round? Unfortunately I don't find the time for fsdev at the moment but I'd be curious if it is the same if you reverse the process. Initialize a L: variable with a KNOWN unit and try to convert it to something else:

Code:
42 (&gt;L:TEST TEMPERATURE,celsius)
42 (&gt;L:TEST PRESSURE,psi)
42 (&gt;L:TEST FREQUENCY,megahertz)

what happens if you try accessing these variables with a different unit:
Code:
(L:TEST TEMPERATURE,fahrenheit)
(L:TEST PRESSURE,inHg)
(L:TEST FREQUENCY,kilohertz)

or even if you try to read it as a number?
Code:
(L:TEST TEMPERATURE,number)
(L:TEST PRESSURE,number)
(L:TEST FREQUENCY,number)

cheers,
Vitus
 
Make sure there is a space *before and after* the minus signs.

I've also never used POUNDS for an L: variable (I use NUMBER), but I don't know if that is a problem or not.

Hope this helps,

Thanks, that solved it. :)
 
Back
Top