Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Debugging Lights Issues (video + Tool)

Featured Replies

2 hours ago, vcaptain747 said:

Sorry for the typo, its just one tool, the one that I created a while ago and shared in this forum.

 

 

30 minutes ago, vcaptain747 said:

 

@kiekYou are right! I just tested that and confirm that for AIG, it makes a diffrance if the aircraft is injected on the ground or in the air . I'm unable to get any AIG aircraft in the air with lights  using original package with  no light fix.

Does it works in flight with your light fix ?

I just trying it, do you know if it works for IVAO MTL also ? 

I give it a try .

I confirm with 8.2, all Just flight AI have lights correct.

But for IVAO MTL not so I try with the fix..

  • Replies 57
  • Views 7k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • new AIG model update is online that reenabled the lagacy lights in our models. So any 3rd party application should be able to set them now again with the default SimConnect options 🙂

  • See 8.2.1: Added an extra delay of two seconds between aircraft injection and setting of lights. PSXT sends in that delay period, live aircraft only, a “toggle all lights” command after half a

  • mike stryczek
    mike stryczek

    That was really quite impressive to find out such a hidden and difficult problem You guys are quite amazing with your knowledge and persistence. Thank You for doing all that

So I tested now with the LIGHT FIX and 8.2.0.

Only IVAO MTL to be sure.

Most all aircrafts I seen have lights and accurate lights.

I saw very few AI without, one during taxi no light then after take off full lights (may be AI bug as MTL are not perfect)

So its goin better and better happy with that now can flight by night and see the traffic around me !

Hewpilot 

 

Another strange thing: If I, in  Amine's tool, inject the AIGAIM_Air Canada Boeing 787-8 - Wifi dome with a delay of 3 seconds, all lights show after 3 seconds, looking from a distance. However, if I zoom in at the aircraft the landing lights go off....

And this: in PSXT with MSFS if I zoom in at an aircraft, the Logo lights switch on, and when I zoom out the Logo lights go off...

Is there a configuration parameter in MSFS that causes this?

 

I have just released 8.1.1. with max 2 aircraft injections per second, but without an extra delay.

Sofar I'm not convinced a delay (larger then my dedault 35 ms) makes any difference (with 2/sec). I see almost all aircraft with lights, the problems that remain are in the AIG aircraft models. FSLTL and JustFlight are perfect.

3 hours ago, kiek said:

I have just released 8.1.1. with max 2 aircraft injections per second, but without an extra delay.

Sofar I'm not convinced a delay (larger then my dedault 35 ms) makes any difference (with 2/sec). I see almost all aircraft with lights, the problems that remain are in the AIG aircraft models. FSLTL and JustFlight are perfect.

So just tested 8.1.1. at VTBS, lot of traffic with MTL IVAO and JUST FIRST TRAFFIC. 

Also with traffic lights fix .

I can say that most of AI have lights, I see some AI just injected by psxt with light on then immediat off.

So it confirms Amine works on delays between AI spawn and lights. But very difficult to tell which values is good or better....

And also confirm Just flight FS TRAFFIC fully work with lights. So issue also come from model used as I think MTL are very old one..

Cheers.

Hewpilot 

2 hours ago, HewPilot said:

So it confirms Amine works on delays between AI spawn and lights.

Don't think so. I suspect the AIG aircraft model. Even with 2 seconds delay you have several AIG aircraft that cannot start with lights in the air.

  • Author
12 hours ago, kiek said:

And this: in PSXT with MSFS if I zoom in at an aircraft, the Logo lights switch on, and when I zoom out the Logo lights go off...

That's a LOD issue in the model.xml of some AIG aircrafts. For example, for 777-200 , you need to go to \Community\aig-aitraffic-oci-beta\SimObjects\Airplanes\AIGAIM_TFS_B777-200_PW\model.pw\TFS_Boeing_777-200PW.xml and  change this:

<LODS>
        <LOD minSize="60" ModelFile="TFS_B772PW_LOD0.gltf"/>
        <LOD minSize="45" ModelFile="TFS_B772PW_LOD1.gltf"/>
        <LOD minSize="35" ModelFile="TFS_B772PW_LOD2.gltf"/>
        <LOD minSize="25" ModelFile="TFS_B772PW_LOD3.gltf"/>
        <LOD minSize="20" ModelFile="TFS_B772PW_LOD4.gltf"/>
        <LOD minSize="10" ModelFile="TFS_B772PW_LOD5.gltf"/>
        <LOD minSize="5" ModelFile="TFS_B772PW_LOD6.gltf"/>
        <LOD minSize="1" ModelFile="TFS_B772PW_LOD7.gltf"/>
        <LOD minSize="0.5" ModelFile="TFS_B772PW_LOD8.gltf"/>
    </LODS>

to this instead:

<ModelInfo>

   <LODS>
        <LOD minSize="10" ModelFile="TFS_B772PW_LOD0.gltf"/>
        <LOD minSize="5" ModelFile="TFS_B772PW_LOD6.gltf"/>
        <LOD minSize="1" ModelFile="TFS_B772PW_LOD7.gltf"/>
        <LOD minSize="0.5" ModelFile="TFS_B772PW_LOD8.gltf"/>
    </LODS>

 

  • Author
14 hours ago, kiek said:

Don't think so.

On my end, when using FSLTL or Just Flight models with PSXT version 8.2.0, all aircrafts --whether parked or in flight—have proper lighting. This is not the case with version 8.1.1. I understand the reason, but it seems I haven’t quite succeeded in convincing you yet (I knew from the start it wouldn’t be easy 😄).

I'll make one more try.

Let's say PSXT is injecting these aircrafts in this order when it first starts:

1. FSLTL B737 KLM

2.FSLTL B787 ACA

3. FSLTL B767 DHL

4. FSLTL B787 KLM

5. FSLTL B737 AFR

6. FLSTL B777 ACA

7. FSLTL B777 KLM 

With version 8.1.1, the results on my end would be like this:

1. FSLTL B737 KLM  : NO LIGHTS as this is the first time the aircraft model B737 is loaded , so it load with a delay and light commands have no effect except on simvar)

2.FSLTL B787 ACA : NO LIGHTS as this is the first time the aircraft model B787 is loaded

3. FSLTL B767 DHL :NO LIGHTS as this is the first time the aircraft model B767 is loaded)

4. FSLTL B787 KLM :PROPER LIGHTS, because a B787 have been loaded already (model is in cahe), so there is no loading delay and light commands are received after the model is fully loaded) 

5. FSLTL B737 AFR : PROPER LIGHTS, because a B737 have been loaded already (model is in cahe),

6. FLSTL B777 ACA NO LIGHTS as this is the first time the aircraft model B777 is loaded

7. FSLTL B777 KLM : PROPER LIGHTS, because a B777 have just loaded (model is in cahe)

Now, imagine that the last two B777s take off and go beyond the lateral range, so they get removed from the sim. About 10 seconds later (on my system), the B777 model gets removed from cache (likely due to MSFS memory management or another process. See 2:50 in the video for proof ).

The next time a new B777 is injected (say, a landing aircraft), it won’t have proper lights. This happens because the B777 model is no longer in cache, and the sim needs to load it from the Filesystem again, causing a delay.

With version 8.2.0, this issue is resolved, not a single aircraft with no light. Regardless of whether the aircraft is in cache or not, the 2-second delay allows enough time for the model to fully load, ensuring all aircraft have proper lighting. I can make a video comparing both versions live if needed.

 

14 hours ago, kiek said:

I suspect the AIG aircraft model. Even with 2 seconds delay you have several AIG aircraft that cannot start with lights in the air.

Yes, I confirm that no delay would work with the original AIG package without the light fix. Again , i'm was able to figure out why, but the explanation might sound absurd, so please be patient and bear with me.

The reason the delay has no effect is that because  AIG are by default loaded with their lights ON since they use the new lights system, same as IVAO. FSLTL and justFlight use the old model so they load with all lights off. 

If AIG models are in cache, you will see them come up with all lights on, but only if youinject them with the onground =1 or with altitude less then 391 above ground altitude

If the model is not in cache or 390 feet above ground altitude , then they load with lights OFF visually , but still all light SIMVARs are ON. 

The thing is, when the simvar are set to ON already, trying to set them ON again won't have any effect (tested with another tool). This is why the light are not showing even with a 2 seconds or any other delay value . 

The only way i'm able to inject AIG aircrafts with propoer lighting at any altitude was is cycle the simvars OFF then ON  , then set the desired lights value. 

Spoiler

case REQUEST_ADD_AIRCRAFT:
            newId = pObjData->dwObjectID;
            printf("\nCreated D id = %d", newId);
           
            hr = SimConnect_TransmitClientEvent(hSimConnect, newId, EVENT_ENGINE_OFF, 0, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);

            

           //REQUIRED FOR AIG model (with no light fix) to cycle light OFF and ON. Won't work without the sleep(50)

           Sleep(50);
            hr = SimConnect_TransmitClientEvent(hSimConnect, newId, ALL_LIGHTS_TOGGLE, 0, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_FAST_REPEAT_TIMER);
            Sleep(50);
            hr = SimConnect_TransmitClientEvent(hSimConnect, newId, ALL_LIGHTS_TOGGLE, 0, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_FAST_REPEAT_TIMER);

           

 

          // REQUIRED To allow proper model loading 

           Sleep(2000);
            hr = SimConnect_TransmitClientEvent(hSimConnect, newId, EVENT_FREEZE_LATLON, 1, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
            hr = SimConnect_TransmitClientEvent(hSimConnect, newId, EVENT_FREEZE_ALT, 1, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
            hr = SimConnect_TransmitClientEvent(hSimConnect, newId, EVENT_FREEZE_ATT, 1, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);

            hr = SimConnect_AIReleaseControl(hSimConnect, newId, SIMCONNECT_UNUSED);

           
                hr = SimConnect_TransmitClientEvent(hSimConnect, newId, NAV_LIGHTS_SET, nav, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
                hr = SimConnect_TransmitClientEvent(hSimConnect, newId, LANDING_LIGHTS_SET, landing, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
                hr = SimConnect_TransmitClientEvent(hSimConnect, newId, TAXI_LIGHTS_SET, taxi, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
                hr = SimConnect_TransmitClientEvent(hSimConnect, newId, STROBES_SET, strobes, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
                hr = SimConnect_TransmitClientEvent(hSimConnect, newId, BEACON_LIGHTS_SET, beacon, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
                hr = SimConnect_TransmitClientEvent(hSimConnect, newId, CABIN_LIGHTS_SET, cabin, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
                hr = SimConnect_TransmitClientEvent(hSimConnect, newId, LOGO_LIGHTS_SET, logo, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);


              
            
            break;

  

 I know the 390 feet  sounds absurd, but thats where all my testing led me to. Tried it in diffrent airports in the results is the same. At EHAM, ground altitude is -12ft if you inject with altitude= -12+390 = 378 lights show up, beyond that no light. At LULKA, ground elevation is 9330ft, so inject at altitude 9720 you will have light, 1 feet more and no  light, and this goes on at every other airport i tested at.  Using the code above, You can have proper lights at any altitude with AIG.

Please give it a try. Also hoping the explanation above convinces you to bring the 2 seconds delay back, it's really making a diffrence on my end.

I know it’s not the easiest post to read, so thank you for taking the time!

Amine.

Edited by vcaptain747

Hi there !

Much appreciate Amine!

Hey Nico I confirm its better with 8.2.0 :

All my Just Flight models have light.

For IVAO MTL + light fix, most of them as Amine expérience.

So please give it a try 😉

Take care

Hewpilot 

Yes in today flight with 8.2.0

also by day I confirm I see lights 

So please keep it on 8.2.0

Thank you very much Amine

See 8.2.1:

Added an extra delay of two seconds between aircraft injection and setting of lights.
PSXT sends in that delay period, live aircraft only, a “toggle all lights” command after half a second and after one second (to help fixing problems with the lights).

 Lights should work perfectly now 😊 Thanks goes to Amine!!!!
 

Edited by kiek

6 hours ago, kiek said:

See 8.2.1:

Added an extra delay of two seconds between aircraft injection and setting of lights.
PSXT sends in that delay period, live aircraft only, a “toggle all lights” command after half a second and after one second (to help fixing problems with the lights).

 Lights should work perfectly now 😊 Thanks goes to Amine!!!!
 

Yeah Nico I see the lights now everywhere . Keep this please !!

Good time to have night flight with PSXT.

Thank you so much Amine thats impressive work !

Take Care.

Hewpilot 

That was really quite impressive to find out such a hidden and difficult problem
You guys are quite amazing with your knowledge and persistence.
Thank You for doing all that work so we can have amazing experiences
mike

Sim,PC, monitor,prescription glasses, chair.

11 hours ago, mike stryczek said:
That was really quite impressive to find out such a hidden and difficult problem
You guys are quite amazing with your knowledge and persistence.
Thank You for doing all that work so we can have amazing experiences
mike

Agree amazing to find it out.

But Nico has to admit I was True 😅

vcaptain747 thank you for your time and effort researching the lights issue, and thank you Nico for implementing changes to bring us lights on AIG traffic - it is glorious to see aircraft lights again!

The work each of you has done here really is next-level and a perfect example of the value of persistence.

Steven_Miller.png?dl=1

i7-6700k Gigabyte GA-Z170X-UD5 32GB DDR4 2666 EVGA FTW ULTRA RTX3080 12GB

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.