SCASM Runway Overlays

From FSDeveloper Wiki
Jump to: navigation, search

Sometimes we need to create a flat runway that embeds certain lights elements that speed-up the design of a new airport.

Instead to create rwy lights and PAPI with custom techniques, we can use the old opcode 0xAA (NEW_BGL_RUNWAY) that is a legacy of FS8 opcodes to create a runway equipped with edge lights, PAPI and CALVERT, that lits automatically at night or in adverse weather conditions, and sits on top of our groundpolys or photoreal scenery. This runway has indeed layer number 24.

To do this we can use a SCASM command that helps to create a single bgl that contains all NEW_BGL_RUNWAY informations to create a runway that can overlay our photoreal or GMAX created runway.

The basic code to do this is:

Header( 0  N40:54 N40:52 E014:16 E014:18 )
LatRange(  N40:52 N40:54 )

Area( 5 40.3425265999 014.6089375666 12 )

Runway( 40.3425265999 14.6089375666
Alt 99.974 ; in meters
Heading 58.01
Length 5002 ; in feet
Width 150 ; in feet
Markers 00
Lights 03
Surface 1
Threshold 0
ThrOffN 0
ExtN 0
ExtF 0
ThrLightsN 1
AprLN 03
Strobes 5
VasiBarsN 8
VasiSpaceN 0
VasiDistN 1681
VasiSideN 125
VasiSlopeN 3.0
ThrLightsF 01
VasiBarsF 8
VasiSpaceF 0
VasiDistF 1681
VasiSideF 125
VasiSlopeF 3.0
)
EndA

Some caring must be payed to the parameter:

Heading

We need to take care of values of this parameter, because it can lead to frame rate drops and lights big-bulb effect in FSX-A and P3D.

FS2002/FS2004/FSX+SP2(NOT ACCELERATION PACK)

The parameter Heading can be declared with any values from range 0 to 359, integer or decimal

FSXA/P3D

The parameter Heading must be declared in range 0.00 to 179.99 and only non integer values are allowed (i.e. 120.00° must be at least 120.01° or 119.99°). For example, the Naples Capodichino runway has a 06/24 (056°/236° as per AIP Italy) orientation, so to declare it in the SCASM source file we need to do this trick:

...
Runway( 40.3425265999 14.6089375666
Alt 99.974 ; in meters
Heading 58.01 ;non integer value between 0.00° and 179.99°
Length 5002 ; in feet
Width 150 ; in feet
...

note the parameter:

Heading 58.01 (i've added +2° degrees of magnetic declination, so 56° (Rwy True Heading) + 2° (MagDec) + 0.01°)

Note that i add a 0.01 degrees rotation to comply with the rule stated above. Declaring only 058.00 is not enough to prevent the "big-bulb" light effect that lead to dramatics drop in frame rates.

Counter-effects

SCASM created runways have the problem that FSX/P3D AI traffic (with FS2004 native models) disappear when the "Ground cast scenery shadows" is activated in the preferences. No workaround exists at the moment.

AI Traffic with FSX native model does not suffer of this problem.