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

Question about BGL_SCALE command

Firestriker

Resource contributor
Messages
238
Country
us-oregon
For FS2002, I am trying to imbed effects in my _0.ASM using the BGL_EFFECT command. It appears that either a BGL_SCALE (effect does not have to be on the ground but specified at MSL) or BGL_SCALE_AGL (effect must be on ground) command must preceed the effect command. Can someone break it down in plain english and how do you convert Lat. Lon. to hex or can you use standard DD:MM:SS or decimal degrees instead of hex.

Lou
 

arno

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

It is described rather nice in the Fs2000 scenery SDK.

The longitude is a 48 bit angle. So you take the two values as stored in the ASM code (for example E38E38E3h 8E39h). Combined these give a 48 bit hex value. If you divide that by 2^48 and multiply it by 360 you will get an angle. In my example the result is 320 (my longitude was -40).

For the latitude it is a certain amount of meters. The 32 bit value gives you the main value and the remaining 16 bit is the fractional part (for example 43D426h 38E4h). If you take the 32 bit part and convert it to decimal you get a number of meters from the equator. To that you need to add the 16 part, divided by 2^16 (to get a fraction). This total amount of meters is then divided by the radius of the earth (6367310 meters) to give you an angle in radians. Divide this by pi and mulitply by 180 to get it in degrees (40 in my example).

Hope this helps :).
 
Top