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

Auto-land aircraft disappear upon touch-down, no roll out #208

Closed TwinFan closed 3 years ago

TwinFan commented 3 years ago

Describe the bug Auto-landing aircraft (those with no data leading down to ground) do approach a runway correctly, flare, but then disappear immediately upon touch-down.

Observed while analyzing #207. Recently, user complains about disappearing aircraft had increased...but i didn't get that they talk about disappear upon touch-down as opposed to disappear after roll-out.

To Reproduce Enforce auto-land by switching off the feeding channels while some planes are already in the air approaching runways.

Expected behavior After touch-down the plane shall roll out on the runway, decelarate to a full stop, and only then disappear.

Technical Info:

Log.txt Log - Copy (2).txt

This one has two examples with full position logging: "A0B316 (T6 N144RU)" and "A24757 (B737 WN3031)". The part of the log around touch down looks similar. Here for A0B316 (T6 N144RU) - ordered in a way that makes sense, original log file position was a bit scrambled as entries are written from different threads in parallel:

2:02:58.601 LiveTraffic DEBUG LTFlightData.cpp:1829/TryFetchNewPos: DEBUG POS DATA: a/c A0B316 N144RU SimTime: 1611527533.0 - 2021-01-24 22:32:13
a/c ICAO A0B316 (T6 N144RU)
<undefined>  <- turn
1611527533.0: (39.55473, -104.85012)  6006.6ft  GND_OFF        Final              {h 358 , p   0, r   0} Y: 5884.0ft 95kn -510ft/m Phase: 61 Final
posList:
1611527524.0: (39.55078, -104.84990)  6083.4ft  GND_OFF        Final              {h 358 , p   0, r   0} <h 358,   464m @  95kt, -510ft/m>
1611527533.5: (39.55496, -104.85013)  6002.2ft  GND_OFF RWY    Final              {h 358*, p   0, r   0} <h 358,   500m @  70kt, -510ft/m>
1611527547.4: (39.55945, -104.85034)  5884.0ft   GND_ON RWY    Touch Down         {h 358*, p   5, r   0}
posDeque:
<empty>
posToAdd:
<empty>
2:02:59.117 LiveTraffic DEBUG LTAircraft.cpp:1620/CalcPPos: DEBUG A/C SWITCH POS: a/c ICAO A0B316 (T6 N144RU)
<undefined>  <- turn
1611527533.5: (39.55496, -104.85013)  6002.2ft  GND_OFF RWY    Final              {h 358 , p   0, r   1} Y: 5884.0ft 70kn -510ft/m Phase: 61 Final
posList:
1611527533.5: (39.55496, -104.85013)  6002.2ft  GND_OFF RWY    Final              {h 358 , p   0, r   1} <h 358,   500m @  70kt, -510ft/m>
1611527547.4: (39.55945, -104.85034)  5884.0ft   GND_ON RWY    Touch Down         {h 358*, p   0, r   0}
2:03:11.234 LiveTraffic DEBUG LTAircraft.cpp:2172/CalcFlightModel: DEBUG A/C FLIGHT PHASE CHANGED from 61 Final to 71 Flare
2:03:11.991 LiveTraffic DEBUG LTApt.cpp:2584/LTAptFindRwy: Found runway KAPA/35R at 39.5595 N / 104.8503 W for a/c ICAO A0B316 (T6 N144RU)
<undefined>  <- turn
1611527546.4: (39.55913, -104.85032)  5892.5ft  GND_OFF RWY    Flare              {h 358 , p   2, r   0} Y: 5884.0ft 70kn -510ft/m Phase: 71 Flare
posList:
1611527533.5: (39.55496, -104.85013)  6002.2ft  GND_OFF RWY    Final              {h 358 , p   0, r   1} <h 358,   500m @  70kt, -510ft/m>
1611527547.4: (39.55945, -104.85034)  5884.0ft   GND_ON RWY    Touch Down         {h 358*, p   0, r   0}
2:03:11.991 LiveTraffic DEBUG LTFlightData.cpp:966/CalcNextPos: A0B316 N144RU: Added final 39.5550 N / 104.8501 W
2:03:11.991 LiveTraffic DEBUG LTFlightData.cpp:971/CalcNextPos: A0B316 N144RU: Added touch-down 39.5595 N / 104.8503 W
2:03:11.991 LiveTraffic DEBUG LTFlightData.cpp:1539/IsPosOK: A0B316 N144RU: Invalid vector <h 178,   500m @ -70kt,  infft/m> with headingDiff = 0 (max vsi = 2500ft/min, max speed = 280kn, min speed = 50kn, max hdg diff = -111)
2:03:11.991 LiveTraffic DEBUG LTFlightData.cpp:1539/IsPosOK: A0B316 N144RU: Invalid vector <h   0,     0m @ infkt,  infft/m> with headingDiff = 0 (max vsi = 2500ft/min, max speed = 280kn, min speed = 50kn, max hdg diff = 0)
2:03:11.991    LT/XPMP2 ERROR Aircraft.cpp:749/SetInvalid: Aircraft 0xA0B316 set INVALID
2:03:11.991 LiveTraffic DEBUG LTFlightData.cpp:671/DataCleansing: DEBUG A0B316 N144RU: Removed a/c due to invalid positions
2:03:11.991 LiveTraffic DEBUG LTFlightData.cpp:1293/CalcNextPos: DEBUG POS DATA: a/c A0B316 N144RU SimTime: 1611527546.4 - 2021-01-24 22:32:26
a/c ICAO A0B316 (T6 N144RU)
<undefined>  <- turn
1611527546.4: (39.55913, -104.85032)  5892.5ft  GND_OFF RWY    Flare              {h 358 , p   2, r   0} Y: 5884.0ft 70kn -510ft/m Phase: 71 Flare
posList:
1611527533.5: (39.55496, -104.85013)  6002.2ft  GND_OFF RWY    Final              {h 358 , p   0, r   1} <h 358,   500m @  70kt, -510ft/m>
1611527547.4: (39.55945, -104.85034)  5884.0ft   GND_ON RWY    Touch Down         {h 358*, p   0, r   0} <h 178,   500m @ -70kt,  infft/m>
posDeque:
1611527533.5: (39.55496, -104.85013)    -infft  GND_OFF RWY    Final              {h 358*, p   0, r   0} <h 358,   500m @  70kt,  infft/m>
1611527547.4: (39.55945, -104.85034)  5884.0ft   GND_ON RWY    Touch Down         {h 358*, p   5, r   0}
posToAdd:
<empty>
2:03:12.012    LT/XPMP2 DEBUG Aircraft.cpp:621/DestroyInstances: Aircraft 0xA0B316: Instance destroyed
2:03:12.072 LiveTraffic INFO  LTAircraft.cpp:1280/~LTAircraft: Removed aircraft ICAO A0B316 (T6 N144RU)

Rough guess: It looks like Final and Touch-Down positions are added again, although the position queue already contains both. That leads to a position validation error resulting in immediate aircraft removal.

TwinFan commented 3 years ago

After a number of quite significant changes to position handling throughout LiveTraffic (in the course of fixing #207 and #210) I am not currently able to reproduce this auto-land problem any longer. Asked one user to provide me with an airport to try.

TwinFan commented 3 years ago

...and just when I wanted to give up the last still flying plane did not even reach the touch-down but disappeared shortly before.

Looking at the log what happened was:

0:17:44.839 LiveTraffic DEBUG LTFlightData.cpp:985/CalcNextPos: A479D8 N388JP: Added final 40.2982 N / 104.2363 W
0:17:44.839 LiveTraffic DEBUG LTFlightData.cpp:990/CalcNextPos: A479D8 N388JP: Added touch-down 40.2997 N / 104.2308 W
0:17:44.839 LiveTraffic DEBUG LTFlightData.cpp:1325/CalcNextPos: DEBUG POS DATA: a/c A479D8 N388JP SimTime: 1612304739.1 - 2021-02-02 22:25:39
a/c ICAO A479D8 (DA40 N388JP)
<undefined>  <- turn
1612304739.0: (40.29781, -104.23980)  4566.3ft  GND_OFF        Final              {h  75 , p   2, r   0} Y: 4476.0ft 80kn -352ft/m Phase: 61 Final
posList:
1612304720.0: (40.29595, -104.24872)  4678.2ft  GND_OFF        Final              {h  75 , p   2, r   0} <h  75,   824m @  80kt, -352ft/m>
1612304740.0: (40.29791, -104.23935)  4560.7ft  GND_OFF        Approach           {h  75 , p   2, r   0} <h  82,   258m @ 112kt, -352ft/m>
posDeque:
1612304744.5: (40.29823, -104.23634)  4534.5ft  GND_OFF RWY    Final              {h  71*, p   0, r   0} <h  71,   500m @  70kt, -352ft/m>
1612304758.3: (40.29970, -104.23076)  4453.0ft   GND_ON RWY    Touch Down         {h  71*, p   5, r   0}
posToAdd:
<empty>
0:17:45.310 LiveTraffic DEBUG LTFlightData.cpp:2025/TryFetchNewPos: DEBUG POS DATA: a/c A479D8 N388JP SimTime: 1612304739.6 - 2021-02-02 22:25:39
a/c ICAO A479D8 (DA40 N388JP)
<undefined>  <- turn
1612304739.5: (40.29785, -104.23960)  4563.9ft  GND_OFF        Final              {h  75 , p   2, r   0} Y: 4475.8ft 80kn -352ft/m Phase: 61 Final
posList:
1612304720.0: (40.29595, -104.24872)  4678.2ft  GND_OFF        Final              {h  75 , p   2, r   0} <h  75,   824m @  80kt, -352ft/m>
1612304740.0: (40.29791, -104.23935)  4560.7ft  GND_OFF        Approach           {h  75 , p   2, r   0} <h  82,   258m @ 112kt, -352ft/m>
1612304744.5: (40.29823, -104.23634)  4534.5ft  GND_OFF RWY    Final              {h  71*, p   0, r   0} <h  71,   500m @  70kt, -352ft/m>
posDeque:
1612304758.3: (40.29970, -104.23076)  4453.0ft   GND_ON RWY    Touch Down         {h  71*, p   5, r   0}
posToAdd:
<empty>
0:17:45.819 LiveTraffic DEBUG LTAircraft.cpp:1620/CalcPPos: DEBUG A/C SWITCH POS: a/c ICAO A479D8 (DA40 N388JP)
<undefined>  <- turn
1612304740.0: (40.29790, -104.23936)  4560.9ft  GND_OFF        Final              {h  75 , p   2, r   0} Y: 4475.5ft 80kn -352ft/m Phase: 61 Final
posList:
1612304740.0: (40.29790, -104.23936)  4560.9ft  GND_OFF        Final              {h  75 , p   2, r   0} <h  82,   259m @ 112kt, -352ft/m>
1612304744.5: (40.29823, -104.23634)  4534.5ft  GND_OFF RWY    Final              {h  71*, p  -0, r   0} <h  71,   500m @  70kt, -352ft/m>
0:17:45.819 LiveTraffic DEBUG LTAircraft.cpp:455/StartSpeedControl: CONSTANT SPEED due impossible speeds (start=41.2,avg=57.8=259.4m/4.5s,target=50.3) for a/c ICAO A479D8 (DA40 N388JP)
<undefined>  <- turn
1612304740.0: (40.29790, -104.23936)  4560.9ft  GND_OFF        Final              {h  75 , p   2, r   0} Y: 4475.5ft 80kn -352ft/m Phase: 61 Final
posList:
1612304740.0: (40.29790, -104.23936)  4560.9ft  GND_OFF        Final              {h  75 , p   2, r   0} <h  82,   259m @ 112kt, -352ft/m>
1612304744.5: (40.29823, -104.23634)  4534.5ft  GND_OFF RWY    Final              {h  71*, p  -0, r   0} <h  71,   500m @  70kt, -352ft/m>
0:17:45.819 LiveTraffic DEBUG LTAircraft.cpp:2173/CalcFlightModel: DEBUG A/C FLIGHT PHASE CHANGED from 61 Final to 50 Descend
0:17:45.819 LiveTraffic INFO  LTAircraft.cpp:1280/~LTAircraft: Removed aircraft ICAO A479D8 (DA40 N388JP)
0:17:45.819    LT/XPMP2 DEBUG Aircraft.cpp:622/DestroyInstances: Aircraft 0xA479D8: Instance destroyed