plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

ImpulseSimulations avatar image
ImpulseSimulations asked ImpulseSimulations commented

Custom PAPI / VASI Lights

Hi All,
I have been working on our canberra project and they have a Offset PAPI that we'd like to recreate, I've spent hours trying to figure out the values for the lighting preset is there any way we can get the default values for PAPI's to recreate our own?

scenerysamples
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

ImpulseSimulations avatar image
ImpulseSimulations answered ImpulseSimulations commented

Thanks @Boris_ . After many days of trying to work this out I finally managed to do it. The code is below for anyone wanting to add it to their projects, I found that you have to use 4 Different presets as the angles for each light to change are slightly different.

Code:

<LightPreset name="PAPI0" phase="0.000000" mesh="{6ECA826B-2FFC-4561-9572-68BFF41C3479}">
<Light relativePosition="-0.150000 0.760000 -0.250000" direction="90.000000 90.000000 180.000000" direction2="0.000000 -1.000000 0.061163" type="ANGLEDIRECTIONAL" fade="NO_FADE" radius="4.000000" color="255 0 0" intensity="1000.000000" duration="0.000000" period="0.000000" phase="0.000000"/>
<Light relativePosition="-0.150000 0.760000 -0.250000" direction="1.000000 1.000000 180.000000" direction2="0.000000 1.000000 -0.061163" type="ANGLEDIRECTIONAL" fade="NO_FADE" radius="4.000000" color="255 255 255" intensity="1000.000000" duration="0.000000" period="0.000000" phase="0.000000"/>
</LightPreset>
<LightPreset name="PAPI1" phase="2.000000" mesh="{6ECA826B-2FFC-4561-9572-68BFF41C3479}">
<Light relativePosition="-0.150000 0.760000 -0.250000" direction="1.000000 1.000000 180.000000" direction2="0.000000 1.000000 0.055909" type="ANGLEDIRECTIONAL" fade="NO_FADE" radius="4.000000" color="255 0 0" intensity="1000.000000" duration="0.000000" period="0.000000" phase="0.000000"/>
<Light relativePosition="-0.150000 0.760000 -0.250000" direction="1.000000 1.000000 180.000000" direction2="0.000000 1.000000 -0.055909" type="ANGLEDIRECTIONAL" fade="NO_FADE" radius="4.000000" color="255 255 255" intensity="1000.000000" duration="0.000000" period="0.000000" phase="0.000000"/>
</LightPreset>
<LightPreset name="PAPI2" phase="3.000000" mesh="{6ECA826B-2FFC-4561-9572-68BFF41C3479}">
<Light relativePosition="-0.150000 0.760000 -0.250000" direction="1.000000 1.000000 180.000000" direction2="0.000000 1.000000 0.048908" type="ANGLEDIRECTIONAL" fade="NO_FADE" radius="4.000000" color="255 0 0" intensity="1000.000000" duration="0.000000" period="0.000000" phase="0.000000"/>
<Light relativePosition="-0.150000 0.760000 -0.250000" direction="1.000000 1.000000 180.000000" direction2="0.000000 1.000000 -0.048908" type="ANGLEDIRECTIONAL" fade="NO_FADE" radius="4.000000" color="255 255 255" intensity="1000.000000" duration="0.000000" period="0.000000" phase="0.000000"/>
</LightPreset>
<LightPreset name="PAPI3" phase="4.000000" mesh="{6ECA826B-2FFC-4561-9572-68BFF41C3479}">
<Light relativePosition="-0.150000 0.760000 -0.250000" direction="1.000000 1.000000 180.000000" direction2="0.000000 1.000000 0.045410" type="ANGLEDIRECTIONAL" fade="NO_FADE" radius="4.000000" color="255 0 0" intensity="1000.000000" duration="0.000000" period="0.000000" phase="0.000000"/>
<Light relativePosition="-0.150000 0.760000 -0.250000" direction="1.000000 1.000000 180.000000" direction2="0.000000 1.000000 -0.045410" type="ANGLEDIRECTIONAL" fade="NO_FADE" radius="4.000000" color="255 255 255" intensity="1000.000000" duration="0.000000" period="0.000000" phase="0.000000"/>
</LightPreset>

Add the above to your xml and PAPI0 will be the closest to the runway and work your way out. Enjoy and I hope I have helped anyone that wanted to do this.

4 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

WombiiActual avatar image WombiiActual commented ·

The reason you're seeing slightly different angles is probably because the angle masking is done as if a flat plane is rotated around the center of the light instead of a plane staying horizontal and being lifted away from the light. That's a bit hard to visualize without a drawing, I know. But the result is that the angle is only correct straight ahead of the light. As soon as you move away from straight center the angle will be lower, until it's on the horizon when you're looking at it 90 degrees from the side. This makes the directional light presets less than ideal for approach guidance light setups.

0 Likes 0 ·
ImpulseSimulations avatar image ImpulseSimulations WombiiActual commented ·

Checking with a few pilots I know, the multiple angles matches the real world. there is only one that would match almost exactly 3 degrees and that is the second from the runway, the other angles are so that you get different results per lamp if that makes sense.

0 Likes 0 ·
Boris_ avatar image Boris_ ♦ commented ·

Thank you @ImpulseSimulations for your feedback and for sharing the code.
That's very nice of you :)

@WombiiActual, I have forwarded your comment to the developer in charge of this part

Have a nice day,


Regards,
Boris

0 Likes 0 ·
ImpulseSimulations avatar image ImpulseSimulations Boris_ ♦ commented ·
Hey @Boris_,

It looks like the above code no longer works correctly as per the SU10 Beta.
Has something been changed and left un-noted?

has rotated them all by about 45 degrees and the value that should bring them back into place breaks them entirely.

0 Likes 0 ·
FlyingsCool avatar image
FlyingsCool answered ImpulseSimulations commented

Did you see the other post on PAPI spacing below?

Moving it around relative to the runway can be done today. The spacing between the lights in the row of a PAPI will be modifiable in SU10

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

ImpulseSimulations avatar image ImpulseSimulations commented ·

Here's what I mean. Thought a photo may help, they're sort of at a 15 degree angle


1657006180342.png

0 Likes 0 ·
1657006180342.png (2.1 MiB)
Boris_ avatar image
Boris_ answered Boris_ edited

Hi @ImpulseSimulations

I checked the Bing and Google satellites and I think the problem is more with the aerial imagery.

What's the runway number ?

Regards,
Boris

3 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

ImpulseSimulations avatar image ImpulseSimulations commented ·

Hi @Boris_,

The angle of these PAPI Lights is correct. The above attached photo is our own CGL.

I have also provided another photo from our mapping provider to show you that as of the 15/02/2022 These PAPI Lights are formed that way. Would like to know if there is a way we can do this.
Airport: YSCB

Runway: 35

Thank you.

1657022601237.png

0 Likes 0 ·
1657022601237.png (1.3 MiB)
Boris_ avatar image Boris_ ♦ ImpulseSimulations commented ·

Hi @ImpulseSimulations


Indeed, it seems that this airport has some particularities concerning the PAPI.

We did not find an official statement in the FAA or EASA documentation or other website, maybe you have more information about this ?

In the case of an exemption made for this airport only, we will not be able to do anything about it.

In the meantime, if you really need to have the same offset, I think you can use the light preset to make custom PAPI


Regards,
Boris

1 Like 1 ·
mamudesign avatar image mamudesign Boris_ ♦ commented ·

I have also tried (with no luck) to understand how some values of the presets work to make angled light


I have only manage to create directional light

(By the way, the docs talk about vector Direction in meters, while my findings are that the direction can be in degrees-confirm that relative pos is in meters)

Maybe providing a sample of your data can better help to understand (also adding axis to the drawings!)


https://docs.flightsimulator.com/html/Developer_Mode/Scenery_Editor/Objects/Airport_Objects.htm?rhhlterm=Preset&rhsearch=Preset


img-20220705-171910.jpg

0 Likes 0 ·
ImpulseSimulations avatar image
ImpulseSimulations answered

Only reason I noticed was because the airport mentioned it during our discussions.
Can your team share the default PAPI Values as it appears the custom light presets don't seem to work too well as per the SDK documentation.

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Boris_ avatar image
Boris_ answered Boris_ edited

Hello @ImpulseSimulations,
Light presets are not using the same implementation as the PAPI that's why I can't give you the default values.
You will have to calculate vectors values (between -1 and 1) that needs to be set into Direction and Direction 2 of Light Presets (we are still doing tests in order to update the documentation about this part)


Note that this feature is a work in progress so you may find bugs and missing features

Workflow (Example) for a VASI system :

1. Create a preset
-- Create the first light
- Create a preset "Vasi" -> select your mesh -> and set the type / intensity / color (red in my example and ANGLEDIRECTIONAL ).


1657182097078.png the values for direction / direction 2 are only examples


- set the Direction / Direction 2 (That's the hardest part when you need to input a vector value)

-- Create the second light (the color should be white and type ANGLEDIRECTIONAL ) and set the Direction / Direction 2


1657182110400.pngthe values for direction / direction 2 are only examples



2. Use a light row object and select your preset created in the step one
1657182276840.png


I hope this will help


Regards,
Boris


1657182097078.png (176.9 KiB)
1657182110400.png (90.8 KiB)
1657182276840.png (425.5 KiB)
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.