\ If we get here then we are on the ground but the \ undercarriage is up LDX landingStatus \ If bit 7 of landingStatus is set, skip the following BMI clan6 \ instruction ASL landingStatus \ Shift landingStatus left by one place .clan6 LDX xRotationHi \ If the high byte of the plane's rotation in the x-axis BPL clan8 \ is positive, skip the following LDX #&EA \ Set xRotation(Hi Lo) = 0 to set the plane to the JSR ResetVariable \ horizontal position (i.e. zero pitch angle) .clan7 LDX #&00 \ Set xTurn(Top Hi) = 0 to stop the plane turning around JSR ResetVariable \ the x-axis (i.e. stop the plane pitching) .clan8 RTS \ Return from the subroutineName: ProcessLanding (Part 4 of 7) [Show more] Type: Subroutine Category: Flight model Summary: If we are taxiing with the undercarriage up, restrict pitching Deep dive: Take-offs and landingsContext: 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 up, then if the plane is pitching forwards into the ground, the plane is made level and all pitching is stopped.
[X]
Subroutine ResetVariable (category: Utility routines)
Set a 16-bit in the variable workspace to 0
[X]
Label clan6 is local to this routine
[X]
Label clan8 is local to this routine
[X]
Variable landingStatus in workspace Main variable workspace
The current landing status
[X]
Variable xRotationHi in workspace Main variable workspace
Plane rotation angle around the x-axis (high byte)