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

Variables available in FS

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,884
Country
netherlands
On the old forum I had posted a topic about available variables and I want to bring such a list back now. Together with the list I also want to post some information about how to use the variables (check them, perform jumps, etc).

But before I will start writing this tutorial, I would like to ask your help. In this topic I want to collect variables that are often used. So do you know a variables I should not forgot on the list or do you have extra information on the values a variables takes? Please reply to this thread. I will then keep the list below updated and in the end I will use it in my tutorial.

-------------------------------

Variables available in Flight Simulator

0280 - aircraft altitude
In meters above mean sea level (MSL)

0282 - beacon

0284 - crash
2 = mountain crash
4 = crash
8 = splash
14 = building crash

0288 - aircraft in fuel box
set to 1 to fill tanks

028C - Time of day
1 = day
2 = dusk/dawn
4 = night

030A - beacon2

030C - beacon3

030E - beacon4

0310 - beacon5

0312 - user variable 1

0314 - user variable 2

0316 - user variable 3

0318 - user variable 4

031A - user variable 5

033B - distance from aircraft to scenery
in meters (?)

0346 - scenery complexity setting
0 = very sparse
1 = sparse
2 = normal
3 = dense
4 = very dense
5 = extremely dense

037E - distance to RefPoint along x axis
in RefPoint units

0382 - distance to RefPoint along y axis
in RefPoint units

0386 - distance to RefPoint along z axis
in RefPoint units

0388 - minute of the hour
0...59

0389 - hour of the day GMT
0...23

038A - day of the year
1...365

038C - year
eg. 1997 or 2003

038E - time zone offset
0...1440 minutes west of GMT

05FC - 18 Hz timer

06F8 - season
0 = winter
1 = spring
2 = summer
3 = autumn

07BC - ADF frequency
622 kHz = 622h
321 kHz = 321h

07BE - COM frequency
119.30 = 1930h

07C0 - NAV1 frequency
112.00 = 1200h
123.50 = 2350h

07C2 - nav2 frequency
112.00 = 1200h
123.50 = 2350h

07C4 - Transponder frequency
1427 = 1427h

07C6 - ADF extended frequency
xxx.2 kHz = 2h
xxx.7 kHz = 7h

0C72 - wind ground velocity
kts (?)

0C74 - wind ground heading
 
Last edited:

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,947
Country
us-wisconsin
Hi Arno.

The BGLC_9 source lists this:


Code:
FS5_SIM_SB        EQU         00000004ah

FS5_SIM_WEIGHT          EQU         00000004ch

FS5_SIM_VEL_X_BODY_AXIS_EXP         EQU         000000050h

FS5_SIM_VEL_Y_BODY_AXIS_EXP         EQU         000000052h

FS5_SIM_VEL_Z_BODY_AXIS_EXP         EQU         000000054h

FS5_SIM_ACC_X_WORLD           EQU         000000056h

FS5_SIM_ACC_Z_WORLD           EQU         00000005eh

FS5_SIM_ACC_Z_BODY_AXIS32           EQU         000000070h

FS5_UNKNOWN_7A          EQU         00000007ah

FS5_AIRFRAME            EQU         00000007ch

FS5_CG_TO_GROUND_X            EQU         00000007eh

FS5_SIM_IZZ       EQU         000000090h

altmsl            EQU         000000280h

beacnt            EQU         000000282h

crash       EQU         000000284h

radflg            EQU         000000286h

rpfuel            EQU         000000288h

VERSION_IDENT           EQU         00000028ah

tod         EQU         00000028ch

logol_xv          EQU         00000029ch

logol_yv          EQU         00000029eh

logol_zv          EQU         0000002a0h

hv          EQU         0000002a6h

gndlevl           EQU         0000002eeh

gndlevlw1         EQU         0000002efh

gndlevlw2         EQU         0000002f0h

MAGVAR            EQU         0000002f4h

becon2            EQU         00000030ah

becon3            EQU         00000030ch

becon4            EQU         00000030eh

becon5            EQU         000000310h

usrvar            EQU         000000312h

usrvr2            EQU         000000314h

usrvr3            EQU         000000316h

usrvr4            EQU         000000318h

usrvr5            EQU         00000031ah

SHADOW_FLAG       EQU         000000338h

RBIAS       EQU         00000033ah

RBIAS1            EQU         00000033bh

RBIAS2            EQU         00000033ch

preferred_span          EQU         00000033eh

GROUND_TEXTURE          EQU         000000340h

BUILDING_TEXTURE        EQU         000000342h

AIRCRAFT_TEXTURE        EQU         000000344h

image_complex           EQU         000000346h

TEXTURE_AVAIL           EQU         000000348h

anti_alias        EQU         00000034ah

overflow          EQU         00000034eh

groundalt         EQU         000000350h

rootvar_free0           EQU         000000360h

hour        EQU         000000362h

minute            EQU         000000363h

image_complexity_cycl         EQU         000000364h

rootvar_free1           EQU         000000366h

rootvar_free2           EQU         000000368h

rootvar_free3           EQU         00000036ah

rootvar_free4           EQU         00000036ch

tp0         EQU         00000036eh

tp1         EQU         000000370h

tp2         EQU         000000372h

tp3         EQU         000000374h

tp4         EQU         000000376h

tp5         EQU         000000378h

OUT_OF_RANGE            EQU         00000037ah

xvlow       EQU         00000037ch

xv          EQU         00000037eh

yvlow       EQU         000000380h

yv          EQU         000000382h

zvlow       EQU         000000384h

zv          EQU         000000386h

BGL_ZULU_MINUTE         EQU         000000388h

BGL_ZULU_HOUR           EQU         000000389h

BGL_ZULU_DAY            EQU         00000038ah

BGL_ZULU_YEAR           EQU         00000038ch

TIME_ZONE_OFS           EQU         00000038eh

WATER_TEXTURE           EQU         000000390h

VISUAL_LAT_MIRROR       EQU         000000392h

VISUAL_LON_MIRROR       EQU         000000394h

VISUAL_ALT_MIRROR       EQU         000000396h

show_stars_bgl          EQU         0000003dch

BGL_TICK18        EQU         0000005fch

SEASON_CYCL       EQU         0000006f8h

color_var         EQU         000000734h

adf_freq          EQU         0000007bch

cmfreq            EQU         0000007beh

nvfreq            EQU         0000007c0h

pvfreq            EQU         0000007c2h

trans_freq        EQU         0000007c4h

adf_ext_freq            EQU         0000007c6h

ground            EQU         0000007d4h

BGL_ELAPSED_SECONDS           EQU         000000b40h

global_winds_surface_velocity       EQU         000000c72h

global_winds_surface_direction            EQU         000000c74h

global_winds_surface_turbulence           EQU         000000c76h

ENG1_STARTER            EQU         0000016beh

sky_type          EQU         0000019b4h

gradient_horiz          EQU         0000019bah

plane0lat         EQU         000001ba0h

plane0lon         EQU         000001ba6h

plane0alt         EQU         000001bach

plane0pitch       EQU         000001bb2h

plane0bank        EQU         000001bb6h

plane0heading           EQU         000001bbah

visual_lat        EQU         000001be8h

TEXTURE_QUALITY         EQU         000001ec8h


Then the variable list continues near the end:

Code:
SHADOW_FLAG             EQU             000000338h

image_complex           EQU             000000346h

becon2                  EQU             00000030ah

becon3                  EQU             00000030ch

becon4                  EQU             00000030eh

becon5                  EQU             000000310h

beacnt                  EQU             000000282h

usrvar                  EQU             000000312h

usrvr2                  EQU             000000314h

usrvr3                  EQU             000000316h

usrvr4                  EQU             000000318h

usrvr5                  EQU             00000031ah

BGL_TICK18              EQU             0000005fch

 

app_milliseconds_low    EQU             0000002403h

app_milliseconds_high   EQU             0000002404h

I haven't tried much of it.

Dick
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,884
Country
netherlands
I guess not all of them work in the scenery (some are aircraft variables), that's why I want to collect information from user about variables that work in this post. I could also print the entire list of the Fs98 SDK, but only a small amount of them work.

But I think it would be a good idea to add the BGLC name to the variable list as well.
 
Messages
611
Country
switzerland
a little contribution:

the ADF Variable 07BCh is used as follows (I saw no example in your list there..)

simply straightforward: 622h for ADF 622KHz, 321h for 321KHz

Jeff
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,884
Country
netherlands
OK, updated, you don't have any knowledge about the extended ADF frequency variable I found in the SDK?
 
Messages
152
Arno,
extended variable is just a decimal value. I guess it goes from 0 to 9, but I am not sure.
 
Messages
611
Country
switzerland
So, I tested some values for the ADF extended version.
The complete ADF freq is split up into 2 variables: 7BCh (3 digit) and 7C6h (1 digit after the decimal sign).

7C6 is used like this: for XXX.3 MHz, value is 3h.

To check the whole Freq, you can use the IFIN2 command to check both variables.

So I think all the frequency vars are intended to be used in Hex-Format. (better readability)

I tested also the Transponder variable 7C4h:
it's true...for Transponder = 1427 , the value is 1427h!

Thanks for keeping it simple MS!
:teacher:

Jeff
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,884
Country
netherlands
Thanks for looking into this, I have updated the list again :).
 
Messages
317
Country
unitedkingdom
So, I tested some values for the ADF extended version.
The complete ADF freq is split up into 2 variables: 7BCh (3 digit) and 7C6h (1 digit after the decimal sign).

7C6 is used like this: for XXX.3 MHz, value is 3h.


A rather late addition, but I wasn't aware of this list before.

I don't know Scenery, but the internal value from which the 7C6h variable is derived form also holds the 1,000's digit, where used in ADF frequencies (many in South America I believe).

i.e. for XYYY.Z MHz value in 7C6h is 0X0Xh.

e.g. 1234.5 gives 0123h in 7BCh and 0105h in 7C6h.

The offsets relating to ADF in FSUIPC are this way so i doubt they are changed for scenery.

Regards

Pete
 
Messages
3
Country
philippines
I am trying to find the visibility variable for airport lighting in low visibility. Maybe the variable is already found but I could not find any information regarding this variable.

Using FSInterrogate that came with FSUIPC, I found that the address for visibility are either:
0e8a for Current visibility and
0f8c for just visibility

But these are FSUIPC returned addresses. How do I convert these to FS9 addresses to get the visibility variable? for example:

From FS2000 SDK:
global_winds_surface_velocity 0x0c72 wind velocity on the ground
global_winds_surface_direction 0x0c74 wind direction on the ground
global_winds_surface_turbulence 0x0c76 wind turbulence on the ground

While FSInterrogate returns:
Surface wind speed 0EF0
Surface wind direction 0EF2
Surface wind turbulence 0EF4

The difference between the two is 027E which can return a calculated address for visibility of 0C0C. This obviously did not work, which showed that my conversion is flawed.

How should the addresses returned by FSInterrogate be converted to an FS variable?

Thank you in advance. :)
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,884
Country
netherlands
Hi,

I think these weather variables are simply not accessible from the scenery, they can only be read from other parts of FS (things like the weather system :)). Most of the weather variables listed in the Fs2000 SDK no longer seem to work.

So please try to find a working variable, I am sure a lot of us would like to know. But as far as I know it might not be possible to find one.
 
Messages
3
Country
philippines
I think the variables as listed in the FS2000 SDK are actually addresses in the FS modules. If these can be accessed by FSInterrogate then these should also be accessible by the scenery as long as we have the right address.

As I mentioned, FSInterrogate which works with FSUIPC accesses the visibility variable through the FSUIPC address of 0E8A or 0F8C. Just as the other wind variables 0C72, 0C74, and 0C76 are accessed by FSInterrogate/FSUIPC and returned at FSUIPC address of 0EF0, 0EF2, and 0EF4, so I thought there would be no reason why the visibility address @ 0E8A and 0F8C returned by FSInterrogate is no longer accessible provided we know what is the equivalent of those hex numbers in FS9.

Well, maybe a simple gauge to test the continents of this 0Cxx variable series can give clues as to the whereabouts of the visibility variable. ;)
 
Messages
29
Country
france
Hello

Maybe a fix for the altitude. It seems to be AGL and not MSL because for example on airport at 200 ft, if you set a bounding box with altitude between 0 and 5, trigger works.

Do you have further information about the use of the beacons variables ?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,884
Country
netherlands
Hi Michel,

Maybe a fix for the altitude. It seems to be AGL and not MSL because for example on airport at 200 ft, if you set a bounding box with altitude between 0 and 5, trigger works.

A bounding box (I assume you are talking about CAT style bounding box here) does not use the altitude variable listed above. So I am pretty sure that the variable is above MSL.

Do you have further information about the use of the beacons variables ?

Simply said they are just variables that are increased by 1 at a certain rate. For example beacon variable that rate is slightly different, so that allows you to make animations at different speeds. Currently the tick18 variable is most used for this, the other beacon variables are used less nowadays.
 
Messages
18
Country
russia
Hello Arno! I'm sorry for awakening this topic, but I've searched all over and can't find an answer to following question: Is there any way to monitor aircraft's speed and flight time? I do need first one to track pushback and second to find out if the flight is ending or just beginning. Thank you.
 
Messages
149
Arno,

I think I have found another variable that works with scenery:

038eh - time zone offset
0...1440 minutes West of GMT


I have successfully used this to compensate for daylight savings time in a time-based condition that relies on zulu time. My runway approach lighting is set up to display only during dawn, dusk or night. But it also turns off between 9:00PM and 7:00AM local time because the tower is closed. During the hours when the tower is closed, the pilot can activate the lighting by tuning in 119.0 on COM1. Here is the code for my REIL strobes:

Code:
IFIN1 nolight, 028ch, 2, 4  ; time of day is not daytime
IFIN1 DSToff, 038eh, 420, 420  ; DST if offset is 7 hr x 60 min West of GMT
IFIN1 lightson, 0389h, 4, 13  ; GMT from 4:00 to 13:59:59 (21:00-07:00 PDT)
BGL_JUMP_32 DSTend

DSToff label BGLCODE
IFIN1 lightson, 0389h, 5, 14  ; GMT from 5:00 to 14:59:59 (21:00-07:00 PST)

DSTend label BGLCODE
IFIN2 nolight, 07beh, 1900h, 1900h, 033bh, 0, 5000  ; COM1 on 119.0 within 5 km

lightson label BGLCODE

SEPARATION_PLANE nolight, -21926, 0, 24351, 32768
VAR_BASE_OVERRIDE VAR_BASE_GLOBAL
IFMSK blinklight, 05FCh, 000Fh
BGL_JUMP_32 nolight

blinklight label BGLCODE
BGL_LIGHT LIGHT_STROBE, -0.017, 0.517, 0.0, 40, 0.60, 0.40, 0FFFFFFFFh, 0, 0, 1
BGL_LIGHT LIGHT_STROBE, -70.017, 0.517, 0.0, 40, 0.60, 0.40, 0FFFFFFFFh, 0, 0, 1

nolight label BGLCODE

With the time zone offset, I can now shut the lights off at 9:00PM Pacific time regardless of whether it is daylight savings or standard time.

Taylor
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,884
Country
netherlands
Thanks, I have added it to the list.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,884
Country
netherlands
The value is between 0 and 65535. Where 65535 is heading 360 and 0 is heading 0.
 

Bambi_007

Resource contributor
Messages
908
Country
germany
Arno thank you so much.

You made my night, because its late now and dark outside my Home.
 
Top