While vertical velocity is negative, this code compares DistanceLeft and AGL to control the throttle. When the craft is decellerated enough so vertical velocity is higher than VelocityCritical, it sets the throttle to 0 and break.

Problem is, even though the break block is in the if block, it breaks the code when the condition isn't met.

image1
image2
image3

Bug Rejected Found in 0.8.500.0
Sandbox View

5 Comments

  • Log in to leave a comment
  • Profile image

    @AnotherFireFox Okay, thanks for letting me know :)

    4.8 years ago
  • Profile image

    @AndrewGarrison Ooops you're right! I set the wait block before the while/if block incorrectly so the program has entered the while block before the craft is falling faster than VelocityCritical, which results premature program break. Sorry for the inattentive error report!

    4.8 years ago
  • Profile image

    All it takes is one frame for the condition to be met and the break to be executed. That would be too quick to notice if you are just looking at the throttle in the flight scene UI, but if you add a display instruction instead of a break (or set a global variable to a specific value), then I think it is very likely you will see that the condition is being met, if only for a single frame.

    4.8 years ago
  • Profile image

    @AndrewGarrison yup the condition is displayed throughout the fall, and even if the display is incorrect I can determine if the condition is met by looking at throttle

    4.8 years ago
  • Profile image

    I have a hard time believing the break instruction is executing when that if condition is not true. Have you tried replacing the break instruction with a display instruction in that If block to ensure that its condition is not true?

    4.8 years ago

No Upvotes

Log in in to upvote this post.