Skip to navigation


Flight model: ProcessLanding (Part 5 of 7)

Name: ProcessLanding (Part 5 of 7) [Show more] Type: Subroutine Category: Flight model Summary: If we are taxiing with the undercarriage down, restrict pitching and tilt the plane backwards Deep dive: Take-offs and landings
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file

If we are taxiing with the undercarriage down, then the plane gets set to the default tilt of 9.84 degrees (as the undercarriage is taller than the rear tail wheel).
.clan9 \ If we get here then we are on the ground and the \ undercarriage is down LDX xRotationHi \ If the high byte of the plane's rotation in the x-axis BMI clan8 \ is negative, jump to clan8 to return from the \ subroutine as the plane is already tilted backwards CPX #7 \ If the high byte of the plane's rotation in the x-axis BCC clan8 \ is positive and less than 7, jump to clan8 to return \ from the subroutine LDA #7 \ Set (xRotationHi xRotationLo) = (7 0), which is the STA xRotationHi \ default tilt of the plane - the undercarriage is LDA #0 \ taller than the rear tail wheel, so the whole plane STA xRotationLo \ points up by 7/256 = 9.84 degrees when its wheels are \ on the ground LDX xTurnTop \ If the high byte of the xTurn rate is positive, jump BPL clan7 \ to clan7 to stop the plane from pitching and return \ from the subroutine RTS \ Return from the subroutine