Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upFix: Fix bugs in airport finite state machines #7710
Conversation
This comment has been minimized.
This comment has been minimized.
i haven't looked at the code, but my first guess would be some kind of |
This comment has been minimized.
This comment has been minimized.
I had a chance to look at the code and found that AirportFindFreeTerminal() uses 255 to denote terminal groups (for example, international airports have 2 groups of 3 terminals each as indicated by the first entry in _airport_terminal_international). I believe that the 255 is used to route an aircraft to a specific terminal group. AirportFindFreeTerminal() loops through each terminal in each terminal group until it finds a free terminal. When As far as I can tell, when |
This comment has been minimized.
This comment has been minimized.
This pull request is now ready for review. In summary:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Structurally this PR looks reasonable, but I'll have to dedicate some time to playtest it before giving a review. |
This comment has been minimized.
This comment has been minimized.
There seem to be a few changes that are just whitespace, make sure these are following our code style for indentation (difficult to judge from the github interface) |
This comment has been minimized.
This comment has been minimized.
I believe the only whitespace changes are in airport.h. I followed the style that was already there: a space after the equals sign, and then align the commas vertically (moving the numbers with them if necessary). Let me know if that's not appropriate. I couldn't find it in the coding style guide. |
Probably fine, can always be reverted if not :) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Squashed the realignment and reversion commits into 5db82f7 |
JMcKiern commentedAug 30, 2019
•
edited
Upon looking into #6219 I found that there were some issues with the finite state machines for the airports.
I have corrected the behaviour on a commuter airport of a helicopter in a hangar trying to takeoff while the helipads - actually only helipad2 - are/is occupied. With the first commit, it can now takeoff from just outside the hangar. Please let me know if this is not expected behaviour.
Note that there may be similar issues with the other airports that have helipads. I know that the international airport has the same issue.
This pull request is currently a WIP. I'm creating it now as I would be grateful for any feedback/assistance.
Additionally, with the pull request I would like to remove some of the magic numbers used:
heading
variable (TO_ALL)heading
variable (unsure)block
variable (unsure)Finally, if anyone could answer the following, that would be great:
heading
variable?