TwinFan / LiveTraffic

LiveTraffic is an X-Plane multiplayer plugin, which fills your sky with live air traffic based on public flight tracking data.
https://twinfan.gitbook.io/livetraffic/
Other
99 stars 24 forks source link

Planes are created and immediately removed when reaching number of plane limites #201

Closed TwinFan closed 3 years ago

TwinFan commented 3 years ago

Describe the bug When LiveTraffic shows the maximum allowed number of planes (e.g. 100, I hit that limit quite frequently at KLAX), then only the planes closest to the camera are shown. That works fine. In DEBUG logs it can be seen, though, that LiveTraffic tries to create additional father away planes only to remove them immediately again because they are father away than the closest 100 planes. This might not even be noticeable to the user, but is a waste of resources and also means (with current implementation) that the entire track record of that plane is thrown away.

To Reproduce Steps to reproduce the behavior:

  1. Go to KLAX, maybe reduce max number allowed planes in Advanced Settings
  2. Switch logging level to DEBUG
  3. Wait for the number of planes to hit the configured max
  4. Check Log.txt

Expected behavior

Technical Info:

Log.txt

1:13:07.926 LiveTraffic INFO  LTAircraft.cpp:1270/LTAircraft: Added aircraft ICAO A7A0E8 (BE33 N5908S), operator '', a/c model 'BB_GA BE20_BGT', flight model [GA], bearing 128, distance 55.1nm, from channel OpenSky Live Online
1:13:07.926 LiveTraffic INFO  LTAircraft.cpp:1286/~LTAircraft: Removed aircraft ICAO A7A0E8 (BE33 N5908S)
1:13:07.926    LT/XPMP2 INFO  CSLModels.cpp:1216/CSLFindMatch: MATCH INPUT: Type=BE9L (WTC=L,Class=L2T,Related=128), Airline=EJA, Livery=N620QS
1:13:07.926    LT/XPMP2 INFO  CSLModels.cpp:1322/CSLFindMatch: MATCH FOUND: Type=BE20 (WTC=L,Class=L2T,Related=128), Airline=JEI, Livery= / Quality = 16 -> BB_GA BE20_DIKOB
1:13:07.926 LiveTraffic INFO  LTAircraft.cpp:1270/LTAircraft: Added aircraft ICAO A817AC (BE9L 1I620), operator '', a/c model 'BB_GA BE20_DIKOB', flight model [MediumJets], bearing 12, distance 47.5nm, from channel OpenSky Live Online
1:13:07.926 LiveTraffic INFO  LTAircraft.cpp:1286/~LTAircraft: Removed aircraft ICAO A817AC (BE9L 1I620)
1:13:07.926    LT/XPMP2 INFO  CSLModels.cpp:1216/CSLFindMatch: MATCH INPUT: Type=AS50 (WTC=L,Class=H1T,Related=183), Airline=N66, Livery=N66103
1:13:07.926    LT/XPMP2 INFO  CSLModels.cpp:1322/CSLFindMatch: MATCH FOUND: Type=B06 (WTC=L,Class=H1T,Related=183), Airline=TXB, Livery= / Quality = 16 -> BB_Heli B06_GHSDW
1:13:07.926 LiveTraffic INFO  LTAircraft.cpp:1270/LTAircraft: Added aircraft ICAO A8BA64 (AS50 N66103), operator '', a/c model 'BB_Heli B06_GHSDW', flight model [Heli], bearing 87, distance 43.2nm, from channel OpenSky Live Online
1:13:07.926 LiveTraffic INFO  LTAircraft.cpp:1286/~LTAircraft: Removed aircraft ICAO A8BA64 (AS50 N66103)