Skip to content

FIXED: helicopters take-off crashing the program.

just-claudio requested to merge just-claudio/atc-pie:helos-fix into master

Trying to make a helicopter take-off would give the following error:

Traceback (most recent call last):

File "...\ATC-pie-1.8.8\session\managers\teacher.py", line 397, in tickSessionOnce

fgms_packet = acft.fgmsLivePositionPacket()

              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "...\ATC-pie-1.8.8\base\ai\baseAcft.py", line 163, in fgmsLivePositionPacket

elif self.statusType() == Status.RWY_TKOF and self.params.ias.diff(self.nose_lift_off_speed().tas2ias(self.params.altitude)) > 0:

                                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^

File "...\ATC-pie-1.8.8\base\ai\baseAcft.py", line 114, in nose_lift_off_speed

return Speed(lift_off_speed_factor * stall_speed(self.aircraft_type).kt)

                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

AttributeError: 'NoneType' object has no attribute 'kt'

The easy fix is to return a Speed object with 0 as the stall speed. The next issue is that now the approach speed of helos is 5kts gradually decreasing to 0, making the approach slow and painful. I might look into that later.

Cheers and thanks for this amazing project!

Edited by just-claudio

Merge request reports